0

Can the Trinket M0 power a NeoPixel Jewel
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Can the Trinket M0 power a NeoPixel Jewel

by mattcarp on Mon Mar 25, 2019 6:06 pm

I just purchased a Trinket M0 and NeoPixel Jewel from a local retailer.

I powered the M0 from my computer's USB port and the DotStar LED rotated through colors normally, and the CIRCUITPY disk drive appeared as expected.

I then unplugged the M0 and then connected the Trinket M0's "USB", "GND", and "4" pins to 5VDC, GND, and Data In, respectively. When I plugged the M0 back into my computer's USB port, no NeoPixels on the Jewel illuminated. The DotStar LED and CIRCUITPY disk drive appeared as normal.

I tested the voltage on the Jewel's input and it was 5V as expected. In main.py I changed the number of NeoPixels constant in the program to 7 (which is what is on the Jewel), but still no luck.

I suspect the NeoPixel needs more current than the M0 can source?

Does anyone know if the M0 can power a Jewel? I know the tutorial shows a beefy 5V supply and goes into level shifters....

I did find one thread in this forum about a NeoPixel library update from ~Feb 2018 needed for Jewel NeoPixels (which are RGBW instead of RGB) - maybe that's it? My M0 may be pre-library update. Any way I can tell which library I have?

mattcarp
 
Posts: 24
Joined: Sun Jul 10, 2011 7:40 pm

Re: Can the Trinket M0 power a NeoPixel Jewel

by rcwilcox on Tue Mar 26, 2019 8:33 am

Use the 3.3v output on the M0 to power the Jewel. The data and power lines should be near the same voltage as the data input needs to be 70% of Vcc of the Neopixel power rail. My 8 LED Neopixel RGBW stick works fine with my M0. The M0 3.3v output can source 500 mA which is a little tight for worse case (7 x 80 mA = 560 ma) of the Jewel, run it at less than full brightness (c.f. Finer Points (Gamma) link below) to be safe.

Driving 5V NeoPixels from 3.3V Microcontrollers

Neopixel Finer Points

rcwilcox
 
Posts: 33
Joined: Thu Jun 06, 2013 4:33 pm

Re: Can the Trinket M0 power a NeoPixel Jewel

by mattcarp on Wed Mar 27, 2019 2:17 pm

Thank you for confirming that to me!

I was able to get it to work and can confirm that the M0 does run the Jewel, no problem!

So, I'm plugging the M0 into my laptop USB, and connecting the Jewel's +DC into the M0 3V pin, the Jewel's ground to M0 ground (Gnd), and the Jewel's Data In to the M0 pin 4.

This works.*

In the course of experimenting, I did corrupt my main.py file and possibly my circuitpy disk volume. This was probably from using Notepad++, which is not recommended in the Adafruit CircuitPython guide. I also noted that my M0 had files dated 2017. Using REPL from the Mu editor/tool, I saw that my board had CircuitPython 2.x. So, I decided to reinstall CircuitPython to the latest version (3.1.2), and updated copies of the Python libraries that come with the M0.

For others who may need to do this (to save some searching):

1/ Install the current (updated) version of CircuitPython: https://learn.adafruit.com/welcome-to-c ... cuitpython
of course, this requires a double-press of the reset button to get into the "TRINKETBOOT" volume, then copy over the new uf2 file
2/ Add files that come on the M0 from factory: https://learn.adafruit.com/adafruit-tri ... /downloads
3/ After that, you'll update the libraries (just copy into CIRCUITPY:\lib newer files): https://learn.adafruit.com/welcome-to-c ... -libraries


* Once I had the M0 and Jewel working, I saw the demo program (main.py) had a constant for the number of pixels. I changed it down to "7", since that's what the Jewel has. Curiously, when it's at 7, the 7th (last) pixel doesn't illuminate. When it's set to 8, the last pixel doesn't illuminate either. It does work when I set it to 9 or higher. I need to look into pixel addressing to better understand what is happening there.

I have one of those handy USB power meters that plugs between your USB power source (my laptop) and the load (M0) and let's you know power consumption. When driving all 7 neopixels from the M0, the current draw from the 5V USB port was 0.03A (~30 mA) - much less than I anticipated.

Again, thanks for your help. It was also awesome that Adafruit included a neopixel as part of the built-in default program!

mattcarp
 
Posts: 24
Joined: Sun Jul 10, 2011 7:40 pm

Please be positive and constructive with your questions and comments.