Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Control an LED strip from teensy 3.6

  1. #1

    Control an LED strip from teensy 3.6

    I recently was able to control a 3 meter (60 leds) strip with an arduino uno.

    For the Uno project:

    • I used this tutorial.
      Here's the fritzing diagram from the tutorial
    • I ONLY connected the RED LEDs.
    • My LED strip had 60 led's
    • 9V battery to power LED's, (you can use this to power the arduino uno too. For the teensy I'm using the serial port because 9V is too high)
    • I used a p30N06le mosfet | amazon link | spark fun data sheet |

    The same setup isn't work with teensy.

    I have RED led's/mosfet connected to pin 9.

    using the blink code
    void setup() {
      pinMode(9, OUTPUT);
    void loop() {
      digitalWrite(9, HIGH);
    But nothing happens.

    I know 9V is too high to power a teensy. But I am powering the teensy from the computer serial port. I only need the 9V for the LED strip. Not sure if this is ok.

    I'm wondering if I need a different mosfet but in the amazon reviews people say this works with 3.3V. I'm a little confused about what to look for in the data sheet, but it says that Gate to Threshold Voltage is min 1V and max 2V.

    Are there any glaringly obvious changes I need to make? Is this possible to accomplish? Does what I describe seem like it should work?

  2. #2
    I just forgot to connect the battery ground to the teensy ground. Now it's working.Still a little confused if this is ok to do because the battery is 9v. But, just like in the fritzing, the battery power isn't connected to the teensy. Just the ground. I'm a bit too newbish to understand if this is ok.

  3. #3
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Yes, you need a common ground between Teensy GND and battery negative terminal.
    The Teensy, the source pin of the MOSFET and the battery must share the same ground for the circuit to work.
    The positive terminal of the battery only goes to the LED strip, not to the Teensy. The Teensy is powered by the USB cable.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts