Teensy 2++ Which pin for external power

Status
Not open for further replies.

markmandp

New member
To show I tried to google solve first, I did look here first, but this is not for a 2++ and the pinout diagram for Arduino does not show which pin is Vcc here.


I want to use the following code so that a touch sensor can trigger the flow of a small water pump. This will be used to cool the tip of my drill press bit.

Code:
// Teensy 2.0 has the LED on pin 11
// Teensy++ 2.0 has the LED on pin 6
// Teensy 3.x / Teensy LC have the LED on pin 13
const int ledPin = 6; //just used for testing
const int TriacPin = 7; //Gate pin for the Triac

// the setup() method runs once, when the sketch starts

void setup() {
  // initialize the digital pin as an output.
  pinMode(ledPin, OUTPUT);
  Serial.begin(38400);
  pinMode(12, INPUT);
}

// the loop() methor runs over and over again,
// as long as the board has power

void loop() {
  if (digitalRead(12) == LOW) {
    Serial.println("Button is not pressed...");  //just used for testing
    digitalWrite(TriacPin, LOW); // Do not run the pump
  } else {
    Serial.println("Button pressed!!!"); //used for testing
    digitalWrite(TriacPin, HIGH);  //turn the pump on
  }
  delay(250);

The code works, but I am unsure how to wire up the circuit. This should be easy, in that the Teensy 2++ can take an input voltage of 12V and the pump can take 12V. So I can have one power source for both the pump and the Teensy 2++.

I know that the Teensy cannot provide the amperage for the pump, so I am using pin 7 to trigger the gate of a BT126 Triac. The Triact would then pass the current to the pump. The touch sensor I'm using is 5v, but the teensy can output 5v, so this should not be a problem. Here is my breadboard setup. As shown, the 12v is going to the touch sensor, I changed that and now run it off of a permanent pin set to HIGH.

IMG_4065-edit.jpg

My main question is, how do I power the Teensy? Should I run the 12v input voltage to the pin marked "+5v"? The C# diagram for the 2++ calls this Vcc here, but the Arduino one does not.

When I plug 12V into that pin ("+5v") the Teensy gets hot. I used my multimeter, and the wall wart is 11.6v.

Thank you all in advance,
 
Status
Not open for further replies.
Back
Top