Complete newbie needs help with Adafruit Trinket M0 and Powerboost 1000C

Hi everyone!

I find myself on the Pimoroni forums humbly looking for help. I’m a cosplayer looking to put lights into a prop. I’m also a programmer so am very comfortable with code, but electronics has always blown my mind and I am looking to get better at it.

I’ve managed to get pretty far into this project but I am falling at the final hurdle of soldering the final product together. Let me tell you what I’ve got - feel free to tell me if I’ve gone massively wrong somewhere.

I’m working with an Adafruit Trinket M0 and currently have 13 addressable LEDs (though I’m looking to add more later).

So far I’ve been testing using cables with alligator clips and have managed to get a successful setup going with:
Trinket GND > capactior negative > LED GND
Trinket USB > capactior positive > LED 5V
Trinket data 2 > 300ohm resistor > LED Din
When I attach this all, and plug the trinket into my computer via the micro USB port it works, happy days. (ChatGPT told me the capacitor and resistor were optional but advised. Feel free to tell me whether I’m wasting my time there or not)

However, since this is going into a prop I need to power it from a battery. I understand that I need a Powerboost to turn the 3.7V the standard lipo batteries provide into the 5V the LEDs need.

I got it working in a non-soldered version at one point, but somewhere along the really long journey of soldering it onto a PBC board I think I accidentally murdered either my trinket or powerboost or both. I’m not massively surprised or upset as I never felt like I truly knew or understood what I was doing. I’ll chalk it up to a learning experience, get myself a new Trinket and Powerboost and start fresh. However, before I do that, I want to make sure that this second time around I DO know and understand what I’m doing.

I would be forever indebted to any kind soul who could just straight up tell me what I need to connect to where to make this thing work. Bonus points if you explain like I’m 5 why I need to do that. I’ve had a look around online and really struggled to find anything, I don’t know how people learn these things.

Thanks in advance for answers to my questions, as well as any other comments you may deem helpful.

If you haven’t already, I would also post this on the Adafruit Forum.
adafruit industries - Forums Index
I’m thinking there will be a larger user base for the Trinket there.

As far as connecting the Power Boost to the Trinket
Downloads | Adafruit Powerboost 1000C | Adafruit Learning System
The pinouts are here,
Pinouts | Adafruit Powerboost 1000C | Adafruit Learning System
The pin marked 5V is your boosted 5V out to the Trinket, and the G next to it is Ground.
For the Trinket M0
Overview | Adafruit Trinket M0 | Adafruit Learning System
The pinout is here.
Pinouts | Adafruit Trinket M0 | Adafruit Learning System

  • USB - This is a voltage OUTPUT or INPUT pin - it is connected directly to the micro USB port +5V pin, so if you are powering over usb, this pin will give you 5V out at 500mA+. Or if you are using the Trinket as a USB host or you have a good reason, you can put 5V into this pin and it will back-power the USB port.

The Pin marked USB is VBUS, so that’s where your boosted 5V from the Power Boost connects, and Ground (G) to the Trinket Pin marked GRD.

I would turn the Power Boost OFF when connecting a USB cable. This will prevent the Boosted +5V from back feeding through the USB connector to the PC. You don’t want two power sources both trying to regulate the BUS.

1 Like

Adressable LEDs (Adafruit calls them neopixel) typically need 5V power and 5V signal levels. The Trinket M0, like most other MCUs, only has 3V3 signal levels.

But:

  • there is also a 5V version of the Trinket M0. So maybe you have the correct one and the other notes don’t apply to you
  • You can get away with powering short strands of neopixel with 3V3. In this case, the signal level from “data” has the correct level. Note that the 3V3 pin usually does not provide enough current to power many neopixel
  • You can also get away with powering the neopixels from 5V and having the data-line at 3V3. I usually do this until it stops working because I am lazy (and I already did this with the Trinket M0, see https://github.com/bablokb/xmas-music-box/blob/master/media/angel.png?raw=true)
  • You can add a level-converter to raise the signal level from 3V3 to 5V. Either use the pixel shifter from Adafruit or use one of the fully integrated Plasma2xxx boards from Pimoroni

I don’t think it is a good idea to run neopixels from a LiPo. They need a lot of current and you will be in the dark sooner than you want to be. But if you do want to run from a battery, just keep it simple and use a power-bank that plugs into your usb-socket of the Trinket. But all of this depends on how long your pixels need to run, so maybe in your case the LiPo-solution is just fine.

Another option: connect the LiPo directly to the BAT-pin of the Trinket M0, and power the neopixels directly from a 5V source. You don’t need the power-boost in this case.

Or: power the Trinket M0 directly from the LiPo, and power the neopixels directly from the LiPo. In this case the neopixels have 4.2V-3.3V (full - empty) and the signal line is 3V3. Not ideal, but maybe good enough.

Some further reading: The Magic of NeoPixels | Adafruit NeoPixel Überguide | Adafruit Learning System. Highly recommend, this covers everything.

So there is a lot to try. I always recommend to start as simple as possible and add components only when you run into troubles.

1 Like

Thank you, I shall go ask around on the Adafruit forums as well.

The pinout guides are helpful but I struggle with them sometimes to know what to connect to what.

Thanks for the helpful reply.

I believe that the Trinket I have is capable of 5V output. At any rate my LEDs seem to work fine and do what I want when I connect it via USB power. I was led to believe that I’d need the Powerboost to provide the LEDs they need when connected to a lipo battery, but feel free to correct me if I’m wrong about that.

Unfortunately space is at a premium since it’s going inside a prop. I’ve got the inside of a 9cm sphere to work with and I’ve not been able to find a USB power bank that will fit. There are several high-ish mAh lipo batteries on the market that will fit and ChatGPT (for what that’s worth) has informed me they should last as long as I need them to after having seen my code where the lights spend most of their time yellow and not at full brightness. Once I’ve got a setup that works I’m happy to charge the battery to full, leave the thing on and see what happens.

The USB pin will always output 5V. I am talking about the logic level of the normal GPIO pins. You connect the data-pin to your strip, but there is not much current flowing there, it is only a signal. But it makes a huge difference if this signal is between 5V and 0V or 3V3 and 0V.

Do you have a product number of your Trinket M0?