Adafruit Industries, Essential service and business: NYC – Executive Order 202.6 - Read more. Accepting essential orders - here's how.
0

Trinket 5v and powering a single Neopixel
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Trinket 5v and powering a single Neopixel

by lockdown1101 on Sun Feb 23, 2020 6:04 am

Hey all, I'm having a bunch of trouble trying to get a single NeoPixel
https://www.adafruit.com/product/1612

to light up when connected to my Trinket.
https://www.adafruit.com/product/1501

According to everything I've read, the individual NeoPixel requires between 20-60mA.

According to the Trinket specifications, the Trinket's 5V PIN is supposed to output ~150mA and the USB PIN is supposed to output ~500mA.
https://learn.adafruit.com/introducing-trinket/pinouts

Whenever I plug the NeoPixel into the PIN 1, 5V, and GND, I get no response. The only thing that happens is that the status Red LED gets very dim.

I tried using my multimeter to measure the mA on the 5V pin and it appears to actually be 0.01 mA. This appears to be the case with both USB and 5V pins.
Am I doing something wrong?
trinket_low_amps.jpg
trinket_low_amps.jpg (225.42 KiB) Viewed 99 times


Do I actually need to have a dedicated power supply in addition to the USB that is powering the Trinket for a single NeoPixel?

lockdown1101
 
Posts: 18
Joined: Sun Feb 23, 2020 5:54 am

Re: Trinket 5v and powering a single Neopixel

by dastels on Sun Feb 23, 2020 9:31 pm

What you are doing should work. I've driven a couple of 16 pixels rings from a Trinket 5v.

Can you post a photo of the wiring on the pixel and on the trinket.

Dave

dastels
 
Posts: 1958
Joined: Tue Oct 20, 2015 3:22 pm

Re: Trinket 5v and powering a single Neopixel

by lockdown1101 on Sun Feb 23, 2020 9:39 pm

Definitely, here's the NeoPixel wired to the 5V, PIN 1, and the GND.

I'm currently running code from the neopixel samples, adjusted to say I have 1 LED and on PIN 1.

trinket_not_powering.jpg
trinket_not_powering.jpg (371.57 KiB) Viewed 90 times

lockdown1101
 
Posts: 18
Joined: Sun Feb 23, 2020 5:54 am

Re: Trinket 5v and powering a single Neopixel

by dastels on Sun Feb 23, 2020 10:02 pm

Red LED gets dim.. that makes sense... that's being driven by the data going to the NeoPixel..

Connections look right. Have you double checked the soldering on the neopixel board? Changed the hole on the breadboard the wires are going in?

Have you checked the voltage at the NeoPixel? Check on the board pads.. and ideally on the neopixel itself.

Dave

dastels
 
Posts: 1958
Joined: Tue Oct 20, 2015 3:22 pm

Re: Trinket 5v and powering a single Neopixel

by lockdown1101 on Sun Feb 23, 2020 10:06 pm

Forgot to also post the pixel wiring; Here's the lead connections on the two I've tried.

pixel_wiring_1.jpg
pixel_wiring_1.jpg (211.57 KiB) Viewed 90 times


pixel_wiring_2.jpg
pixel_wiring_2.jpg (349.52 KiB) Viewed 90 times

lockdown1101
 
Posts: 18
Joined: Sun Feb 23, 2020 5:54 am

Re: Trinket 5v and powering a single Neopixel

by lockdown1101 on Sun Feb 23, 2020 10:13 pm

dastels wrote:Connections look right. Have you double checked the soldering on the neopixel board? Changed the hole on the breadboard the wires are going in?

Have you checked the voltage at the NeoPixel? Check on the board pads.. and ideally on the neopixel itself.

Dave


I've tried so many different pins. I've moved it to basically every hole on the row, on both sides of two different breadboards.

I'm pretty inexperienced with debugging electronics. What pins do I put the multimeter leads on to determine voltage at the pixel?

I did determine that the voltage is ~4.89v with the red pin on 5v and black on GND. (On the trinket)
The same observation is made putting the black to the - lead and the red to the + lead on the pixel (On the pixel).

lockdown1101
 
Posts: 18
Joined: Sun Feb 23, 2020 5:54 am

Re: Trinket 5v and powering a single Neopixel

by dastels on Sun Feb 23, 2020 10:18 pm

Hmmm... what's the voltage on the trinket (5v/gnd) with the neopixel disconnected?

Also, kudos for using appropriate wire colors.

Dave

dastels
 
Posts: 1958
Joined: Tue Oct 20, 2015 3:22 pm

Re: Trinket 5v and powering a single Neopixel

by dastels on Sun Feb 23, 2020 10:19 pm

A close look at the connections of the pixel to the board should suffice in checking whether they might be a problem. But again, 2 pixels largely rules that out.

Dave

dastels
 
Posts: 1958
Joined: Tue Oct 20, 2015 3:22 pm

Re: Trinket 5v and powering a single Neopixel

by lockdown1101 on Sun Feb 23, 2020 11:23 pm

Last time I tried, it said ~5v.

That's when I was testing the amperage as well. I realized after the fact that amperage is probably based on draw.

I tried testing the mA in the chain with the pixel and it was a solid 0. :(

lockdown1101
 
Posts: 18
Joined: Sun Feb 23, 2020 5:54 am

Re: Trinket 5v and powering a single Neopixel

by dastels on Mon Feb 24, 2020 11:20 am

Can you post the code you're using?

Dave

dastels
 
Posts: 1958
Joined: Tue Oct 20, 2015 3:22 pm

Re: Trinket 5v and powering a single Neopixel

by lockdown1101 on Mon Feb 24, 2020 2:17 pm

Code: Select all | TOGGLE FULL SIZE
// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// Released under the GPLv3 license to match the rest of the
// Adafruit NeoPixel library

#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
 #include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif

// Which pin on the Arduino is connected to the NeoPixels?
#define PIN        1 // On Trinket or Gemma, suggest changing this to 1

// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 1 // Popular NeoPixel ring size

// When setting up the NeoPixel library, we tell it how many pixels,
// and which pin to use to send signals. Note that for older NeoPixel
// strips you might need to change the third parameter -- see the
// strandtest example for more information on possible values.
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

#define DELAYVAL 500 // Time (in milliseconds) to pause between pixels

void setup() {
  // These lines are specifically to support the Adafruit Trinket 5V 16 MHz.
  // Any other board, you can remove this part (but no harm leaving it):
#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)
  clock_prescale_set(clock_div_1);
#endif
  // END of Trinket-specific code.

  pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
}

void loop() {
  pixels.clear(); // Set all pixel colors to 'off'

  // The first NeoPixel in a strand is #0, second is 1, all the way up
  // to the count of pixels minus one.
  for(int i=0; i<NUMPIXELS; i++) { // For each pixel...

    // pixels.Color() takes RGB values, from 0,0,0 up to 255,255,255
    // Here we're using a moderately bright green color:
    pixels.setPixelColor(i, pixels.Color(0, 150, 0));

    pixels.show();   // Send the updated pixel colors to the hardware.

    delay(DELAYVAL); // Pause before next pass through loop
  }
}

lockdown1101
 
Posts: 18
Joined: Sun Feb 23, 2020 5:54 am

Re: Trinket 5v and powering a single Neopixel

by dastels on Mon Feb 24, 2020 4:04 pm

The code looks fine.

Something to try is move to another pin. Does the red LED still go to a dim light? (It shouldn't)

Dave

dastels
 
Posts: 1958
Joined: Tue Oct 20, 2015 3:22 pm

Re: Trinket 5v and powering a single Neopixel

by lockdown1101 on Mon Feb 24, 2020 4:41 pm

Yep, done that. When I move it to PIN 2, the red light doesn't light up during code execution and goes full bright when in bootloader mode.

When on PIN 1, the bootloader mode shows the red LED super weak in comparison.

Seems like sharing the pin causes the red LED to not get enough power.

lockdown1101
 
Posts: 18
Joined: Sun Feb 23, 2020 5:54 am

Re: Trinket 5v and powering a single Neopixel

by dastels on Mon Feb 24, 2020 6:19 pm

The red LED goes dim because it's being driven by the NeoPixel data signal, so it's not on all the time. It's the same effect that PWMing it would have.

I assume that on pin 2, the NeoPixel still doesn't work?

dastels
 
Posts: 1958
Joined: Tue Oct 20, 2015 3:22 pm

Re: Trinket 5v and powering a single Neopixel

by lockdown1101 on Mon Feb 24, 2020 6:25 pm

dastels wrote:I assume that on pin 2, the NeoPixel still doesn't work?

Yep, that's correct.

lockdown1101
 
Posts: 18
Joined: Sun Feb 23, 2020 5:54 am

Please be positive and constructive with your questions and comments.