5V Trinket - Suitable DC Power Supply

Adafruit's tiny microcontroller platform. Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
YoungSoul
 
Posts: 20
Joined: Mon Sep 01, 2014 2:34 pm

5V Trinket - Suitable DC Power Supply

Post by YoungSoul »

Hi Everyone

I have a 5V trinket project driving a 30 Led NeoPixel strip and I would like to run the entire thing off of a single 5V supply.

Can I use this(below) 5V supply to drive both the NeoPixel strip and connect to the Bat+ on the trinket? I have read the the voltage on the Bat+ needs to be 5.5V and I am not sure that this power supply will provide that.

https://www.adafruit.com/products/276

Also, if I connect this supply to Bat+, can I still connect to USB and reprogram while power is supplied to the Bat+?

Thanks in advance.

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: 5V Trinket - Suitable DC Power Supply

Post by adafruit_support_bill »

2A should be enough to power the strip plus the Trinket. If you use this version. You can power the Trinket via the USB port; https://www.adafruit.com/products/1994

User avatar
YoungSoul
 
Posts: 20
Joined: Mon Sep 01, 2014 2:34 pm

Re: 5V Trinket - Suitable DC Power Supply

Post by YoungSoul »

thank you very much for the quick reply. Do you guys ever sleep?

Thanks for the pointer to the other adapter... as it turns out I have one of those!

Some follow up questions:

1) As I am developing the software for the neopixels, can I power the neopixels from the supply I have, also connected to Bat+ of the trinket AND have the trinket connected to my computer via a usb cable? OR Should I power the neopixels with the 5v/2A power adapter, but disconnect the Bat+ so that the trinket is powered via the usb connection but give them both a common ground.

2) I know the Amp rating is fine, my concern was the voltage rating. The info I have read says the trinket should have 5.5v at the Bat+ and I was wondering if the power supply I reference qualifies for that? the output says: ~5... it is that '~' I was concerned about.

3) My project is essentially the drum activated light project, but with a trinket, and the unit is actually inside the kick drum, so I just want a single supply line out as I cannot conveniently get to the control unit inside the kick drum. This is why I do not want one supply for the neopixels and one supply for the trinket - if I can help it.

Thanks again!

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: 5V Trinket - Suitable DC Power Supply

Post by adafruit_support_bill »

The best way to power the Neopixels and Trinket is to run power directly to the pixels and then run power from there to the Trinket.

The pixels are designed for 5v. They can run on less, but can be damaged if you try to run them with more.

User avatar
YoungSoul
 
Posts: 20
Joined: Mon Sep 01, 2014 2:34 pm

Re: 5V Trinket - Suitable DC Power Supply

Post by YoungSoul »

thanks for the quick response.

I am afraid I may not be asking my question very clearly. Forget about NeoPixels at the moment.

Question 1)
Is the DC power supply I mention in this post, sufficient to power the Trinket? Meaning will it provide 5.5V?

Question 2)
If it is sufficient, can I power a trinket via Bat+ ( using that power supply) AND still connect the trinket to my computer via usb for programming at the same time? Or is it the case that I should not apply power to Bat+ while connected to the computer via usb for programming.

Thank you again - the support everyone provides here is awesome!

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: 5V Trinket - Suitable DC Power Supply

Post by adafruit_support_bill »

Meaning will it provide 5.5V?
No. It is a 5v supply.
Or is it the case that I should not apply power to Bat+ while connected to the computer via usb for programming.
Generally, it is best not to power from both sources simultaneously. Connected regulated supplies in parallel tends to result the the regulators fighting each other. It is probably OK for short periods like programming. But don't leave it connected that way on a long-term basis.

User avatar
hiduino
 
Posts: 862
Joined: Sat Sep 01, 2012 7:05 pm

Re: 5V Trinket - Suitable DC Power Supply

Post by hiduino »

You can run with less than 5.5V to the Bat+ on the 5V Trinket. It means the CPU will run at a lower voltage also, but as long as you run it at 8MHz then you should be fine. I've done it myself running the 5V Trinket (8MHz) and Neopixels with 3.7V Lipo battery.

See, http://forums.adafruit.com/viewtopic.ph ... 95#p313667

User avatar
YoungSoul
 
Posts: 20
Joined: Mon Sep 01, 2014 2:34 pm

Re: 5V Trinket - Suitable DC Power Supply

Post by YoungSoul »

Thank you very much for adding to the conversation.

I currently am using a 5V/2A supply to ONLY power the 30 LED neopixel strip, and I am using USB power from my computer to power the trinket because I am programming it all of the time. ( yes shared grounds everywhere )

When I switch over to 'production' I will try to power the trinket with the same 5V/2A but I am also going to try to power the trinket with a 12V/2A supply, and then use a 7805/2A to regulate the voltage down for the neopixels and see how that goes.

Thanks again for the additional information.

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: 5V Trinket - Suitable DC Power Supply

Post by adafruit_support_bill »

but I am also going to try to power the trinket with a 12V/2A supply, and then use a 7805/2A to regulate the voltage down for the neopixels and see how that goes.
The 7805 is a linear regulator, so going from 12v to 5v it will need to burn off nearly 60% of the power as heat. At max output, your strip will be pulling about 1.8A. Your 7805 will need to dissipate 1.8A * 7v = 12.6watts. Even a heat-sink won't keep it from going up in flames at that point.

You would be better off with a switching regulator such as the UBEC: https://www.adafruit.com/product/1385

User avatar
YoungSoul
 
Posts: 20
Joined: Mon Sep 01, 2014 2:34 pm

Re: 5V Trinket - Suitable DC Power Supply

Post by YoungSoul »

Thank you so much for chiming in. Too bad my Adafruit order arrives today, and I just ordered my 7805's... I'm sure I will find a use for them somewhere.

This is one of those projects that I thought would be a slam dunk - and instead I have been schooled at every step and turn.

Here is a quick summary of what I am attempting to do, incase you see anything other fire hazards in my future.

I am trying to build the trinket version of the sound activated drum lights project. The difference is I want a mode that will fade the neopixels in/out from full brightness to off and back again. (that was the easy part).

To make the trinket happy, I am going to use the 12V/2A dc power supply, and now I am going to use the UBEC device feeding the thicker wires from the 12V/2A power supply and hooking up the connector end to the 30 LED neopixel strip. The trinket will use digitial 0, to drive the neopixel data line.

In the end I would like a single power supply for both the trinket and neopixel strip.

I am only using the DC supply so it will last for a 4 hour show, and because I want to go to max brightness for at least a little while.

Thank you again for saving me on this one. As soon as I get everything working I will post the final layout and video so others can learn from my schooling

User avatar
hiduino
 
Posts: 862
Joined: Sat Sep 01, 2012 7:05 pm

Re: 5V Trinket - Suitable DC Power Supply

Post by hiduino »

You can simplify your design and stick with the 5V/2A power supply. You can split the power to the 5V Trinket via the USB connector and Neopixels.

You can use this power splitter, https://www.adafruit.com/products/1351.
Then use this for to power the Trinket, https://www.adafruit.com/products/988

Or make your own USB Mini B power cable with, https://www.adafruit.com/products/1328 and https://www.adafruit.com/products/1825.

User avatar
YoungSoul
 
Posts: 20
Joined: Mon Sep 01, 2014 2:34 pm

Re: 5V Trinket - Suitable DC Power Supply

Post by YoungSoul »

Thanks for your reply. I am not sure I completely understand your suggestion.

Are you suggesting that instead of connecting the 5V to the bat+ (which requires 5.5V), connect it to the usb+ above digital pin 0? And of course feed 5V from the supply to the neopixels?

or are you saying to forget about the 5.5V 'requirement' and that 5V is good enough at the usb+ pin?

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: 5V Trinket - Suitable DC Power Supply

Post by adafruit_support_bill »

You can feed 5v via the USB port, or via USB+.
It would probably work feeding via BAT+, but that is not recommended.

User avatar
YoungSoul
 
Posts: 20
Joined: Mon Sep 01, 2014 2:34 pm

Re: 5V Trinket - Suitable DC Power Supply

Post by YoungSoul »

And just in case others were wondering, based on the post below in the url, it is ok to supply a regulated 5V to the usb+ pin. Essentially doing what hiduino suggested, but just going with a straight wire into USB+ instead of splitter.

http://forums.adafruit.com/viewtopic.ph ... 5v#p313545

I guess the key for me was that I did not fully realize you could source 5V at the USB+ pin. This seems to make using my single 5v/2A dc power supply work for both the trinket and the neopixels. If I am wrong I will update this post.

Thank you all very much for your support and patience.

User avatar
YoungSoul
 
Posts: 20
Joined: Mon Sep 01, 2014 2:34 pm

Re: 5V Trinket - Suitable DC Power Supply

Post by YoungSoul »

I just wanted to close the loop on this post of mine.

I did finally get it all to work and I thought I would share where I struggled in hopes it will help someone else along the way.

1) I did use the original power supply from the original post. It measured about 5.2V without a load, about 5.1 with a load and at the 5V output of the Trinket it was about 4.97V.
2) I ultimately connected it to Bat+, not USB+ because I found when I measured the voltage from that power supply it was almost 5.2V
3) Pin 0 (as marked on the trinket) was used as the data line for the NeoPixel Strip
4) Pin 1 (as marked on the trinket ) was used for a button to change the modes of the software. It goes from color fader / color switcher / mic triggered / theater chase / off
5) Pin 2 ( as marked on the trinket ) was used as the analog input from the mic
6) When the Trinket was powered from USB, and I issued the commands to turn off the trinket it would work. But using the power supply I had to add a small delay after turning off all of the pixels. ( about 50ms ). I do not know why, but without this, the NeoPixels did not behave well. Either blinked continuously, or just lit the first pixel.
7) Perhaps the Trinket does not have pull resisters on Pin 1 - but I had to add a pull resistor. Between this and (6) I would get very odd behavior, as you might imagine.
8) I used: http://www.adafruit.com/product/1063 and my first unit did not register vcc/2 at the output pin. It is very useful to check that!

In the end it turned out to be as easy as I thought it should have been - but my journey was a little circuitous.

If anyone is interested the code is here:
https://github.com/youngsoul/arduinoske ... plasma.ino
and a video showing it working is here:
In the drum: https://www.youtube.com/watch?v=CE3Vs2axCbE
On the bench: https://www.youtube.com/watch?v=U3aPw61369U

Thanks for all of your help.

Locked
Please be positive and constructive with your questions and comments.

Return to “Trinket ATTiny, Trinket M0”