Author Topic: How should I wire up a neopixel ring?  (Read 22255 times)

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: How should I wire up a neopixel ring?
« Reply #15 on: December 08, 2013, 03:06:32 am »
yep, thats right!

MichaelMeissner

  • Full Member
  • ***
  • Posts: 166
Re: How should I wire up a neopixel ring?
« Reply #16 on: December 08, 2013, 11:56:22 am »
Easy solution: power the digispark through usb (programming tool) and power the lights from their own power source. Connect the lights gnd and data to the digispark, and the lights gnd and 5v to their own power source. Connect the digispark as usual, and then the spark can restart freely without being powered by the lights.
The problem is where I want to use 2 rings (in steampunk goggles, where I need to hide the microprocessor/battery somewhere in the hat band or in the goggles), adding the requirement of separate power means another board that I have to incorporate somewhere.  I don't want to use digispark shields, because the height of the risers makes it harder to conceal the microprocessor, so likely I have to have a small board that has either a USB power plug or lipo connector + step-up voltage converter, and the wiring to split off the power before it gets to the micro processor (or use the Adafruit perma proto that fits in a mini Altoids tin).  If I have to wire up a board, it becomes the same amount of work to use a raw ATtiny85 chip, instead of a digispark.

Sure, it isn't rocket science, but it is annoying to have to wire it up this way.  Experience has shown that the less interconnects I have, the less time I will spend looking for faults in the wiring, etc.  So having the battery directly connected to the microprocessor helps reduce the number of wires, etc.

The Gemma is now my processor of choice for this particular application.  The Gemma has a lipo battery plug as well as the USB socket, so I can connect the battery directly to the microprocessor.  I can wire up the rings, connecting the ring power to Vout, the lights connected to PB1, and the ground to the ground wire.  I had originally hoped to use a spark plugged directly into a USB plug connected to AA/AAA/lipo batteries.

Mark

  • Full Member
  • ***
  • Posts: 196
Re: How should I wire up a neopixel ring?
« Reply #17 on: December 09, 2013, 11:31:34 pm »
If you've finished the programming, there's no reason you can't short out the diode, and power it via the USB Battery pack.
The diode is there to stop any external voltage being fed back into the computer/laptop.

You could also just cut a USB lead and wire it to the 5v and ground.

Mark

MichaelMeissner

  • Full Member
  • ***
  • Posts: 166
Re: How should I wire up a neopixel ring?
« Reply #18 on: December 10, 2013, 05:22:13 am »
For most things that I do, I am never 'finished' programming.  I build something and use it for a particular application, and then it usually morphs into something new, gets new functionality, or I tear it down and make something else.  So I tend to be reluctant to make 'permanent' changes like cutting traces.  Particularly on microprocessors where I have multiple units, I would have to mark somehow the boards that have been modified.

dougal

  • Sr. Member
  • ****
  • Posts: 289
Re: How should I wire up a neopixel ring?
« Reply #19 on: December 10, 2013, 06:17:17 am »
You wouldn't necessarily have to have two separate power sources. You could have one 5V source powering both the Sparks and the Rings. Just tap directly into the power for the Rings, without passing through the Spark's circuitry. You'd just have to make sure you have 5V available externally, without relying on the Spark's power regulator.

This is just one of those things you'll have to deal with in many projects where external components need lots of current (LEDs, motors/servos, etc), and not only on the Digispark. If you're powering via USB, you'll often run into power supplies or supporting power regulation components limited to 500mA. You're sometimes going to have to use a separate buck/boost circuit. You might be able to get away with a 9V battery and a couple of resistors as a voltage divider for 5V.

MichaelMeissner

  • Full Member
  • ***
  • Posts: 166
Re: How should I wire up a neopixel ring?
« Reply #20 on: December 10, 2013, 06:42:11 am »
You wouldn't necessarily have to have two separate power sources. You could have one 5V source powering both the Sparks and the Rings. Just tap directly into the power for the Rings, without passing through the Spark's circuitry. You'd just have to make sure you have 5V available externally, without relying on the Spark's power regulator.

Yep.  Though in the particular case I was wanting to solder permanent wires to the neopixel rings.  Unfortunately, my soldering station was across the room from the computer terminal, and I was trying to bring over a microprocessor with minimal components to test whether I had the 3 wires soldered correctly.  The spark with the headers mounted was the easiest to use (no breadboard, powered directly from the USB charger, and with headers, I could plug the wires directly into the headers).  Having to have the external power setup would have been more parts to move over to an already cramped setup.

This is just one of those things you'll have to deal with in many projects where external components need lots of current (LEDs, motors/servos, etc), and not only on the Digispark. If you're powering via USB, you'll often run into power supplies or supporting power regulation components limited to 500mA. You're sometimes going to have to use a separate buck/boost circuit. You might be able to get away with a 9V battery and a couple of resistors as a voltage divider for 5V.
I dislike non-rechargeable batteries, and tend to use 5v batteries with USB ports.  With the spark I don't need the cable, and for debug type stuff, I can plug the spark directly into the battery.  Wiring up 2-3 external wiring setups is on my to-do list, and I probably will tackle it during the Christmas holidays.  It is unfortunate (IMHO) that I can't get directly to the 5v power without going through the spark or providing an external setup that splits the power early.

One way to tackle the problem is to use the Programming Tool, and attach the wires where the USB is attached to the PCB to get the external power.  I ruined my previous Programming Tool PCB and I added a new PCB to my DigiX order,  just before it shipped.  So when I get some time, hopefully I can work on it.

dougal

  • Sr. Member
  • ****
  • Posts: 289
Re: How should I wire up a neopixel ring?
« Reply #21 on: December 10, 2013, 01:52:18 pm »
Hey Erik,

Any chance that there might be room on the Digispark Pro for some through-holes where we could solder a 2-pin header to tap directly into the USB 5V/Gnd before it goes through any other components? A power pass-through like that would be handy for this kind of thing. :)

Mark

  • Full Member
  • ***
  • Posts: 196
Re: How should I wire up a neopixel ring?
« Reply #22 on: December 10, 2013, 10:26:34 pm »
Quote
For most things that I do, I am never 'finished' programming.
I understand that.
I should have said .. when you are happy with the code, then solder a wire across the diode.

As an alternative, soldering the wires to a switch, might allow an easy way to make it 'non permanent'

The fact the Digispark only presents when repowered is the bit that makes this slightly tricky.
You could detect one of the pins state and decide to NOT turn the neopixels on, thereby allowing the programming to happen.

Mark

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: How should I wire up a neopixel ring?
« Reply #23 on: December 10, 2013, 10:30:34 pm »
Dougal - I'll look into that - the pro is already very cramped to get it all on the board - but I can probably squeeze out some space.

My solution - though I have to say I rarely use power at this level without just using a wings shield and hooking the external 5v up for everything - is usually just to bridge the diode and make sure if I re-program it that I do so through a cheap powered hub - protects my computer and I have yet to actually fry a hub with the diode bridged and external power on

Bluebie

  • Sr. Member
  • ****
  • Posts: 486
Re: How should I wire up a neopixel ring?
« Reply #24 on: December 11, 2013, 01:55:49 pm »
Remember also that despite labelling, the digispark is good down to about 3 volts (applied to gnd and 5v pins) if and only if you set the Board to Digispark 8mhz. With the ws2812 library from adafruit you can use 8mhz just fine and dandy. This will also give you slightly better battery life, though the code which calculates or loads the colours will run half as fast (delays still work properly, and the code which transmits colours to the lights is just as fast). This means you can hook up directly to a lipo/liion battery for power if you select 8mhz :)

MichaelMeissner

  • Full Member
  • ***
  • Posts: 166
Re: How should I wire up a neopixel ring?
« Reply #25 on: December 11, 2013, 02:26:24 pm »
Makes sense.  Thanks for reminding me of the 8Mhz option.  I can run a Gemma (8Mhz) well with a ring and a lipo battery, so it is good to have other options.

For the thing that I'm working on right now (Christmas ornaments), it won't matter about battery power, since I will be using a USB charging cable for power.  But I need to get the steampunk googles done shortly, and that needs to be battery powered.

pckcomeback

  • Newbie
  • *
  • Posts: 8
Re: How should I wire up a neopixel ring?
« Reply #26 on: May 20, 2019, 09:49:50 pm »