1-Wire controllable LEDs

An interesting thing I learned from the 1-Wire workshop was that each 1-Wire device has a unique ID, and any number of 1-Wire devices can be controlled independently from a single wire. I’ve been looking for such a technology for controlling LEDs, as I have a project in mind where the WS2811/2812/NeoPixel LEDs do not suffice.

My goal is to have a set of LEDs connected to power, ground, and a single continuous control wire, and for the LEDs to be individually dimmable by a microcontroller. As far as I understand, the WS28** LEDs won’t work, because they have a Data In and a Data Out pin; my situation requires that the data line not be split like that. The end goal will look something like the Chibitronics LED Circuit Stickers.

Upon googling 1-Wire LED, I came across a few options:

owRGB - 1-Wire RGB driver board - way too big (meant to power an LED strip) but right sort of idea.
Maxim DS2890 - (Discontinued) 1-Wire digital potentiometer, used by the above board.
Maxim DS2413 - 1-Wire dual-channel addressable switch.
NXP PCA9901 - 1-Wire single LED driver.
ON Semi LV52204MU - 1-Wire LED Boost Driver with PWM.

If anyone has experience or recommendations on any of this, advice is greatly appreciated. Tips on what might be easiest to get samples for would be useful as well. Thanks!

1 Like

Can you go into more detail about your wiring and it’s topography? Based on your comment about not being able to “split” the wire I assume it may be some existing cabling that you don’t want to cut. Keep in mind that the 1-Wire can be pretty picky about it’s cabling for long runs so existing cabling may present issues…

WS28** LEDs have 2 pins, but they’re for daisy chaining them. You attach the input on one LED to the output of the previous one.

From the microcontroller you only have the one data wire. I believe with the right board (teensy 3.1) you can control up to 512 LEDs on one line. With the OctoWS28 breakout board you can do 8 lines on a teensy 3.1 for over 4000 LEDs.

These are all individually addressable with 3 bytes of RGB data.

If you’d like to do something like the LED circuit stickers, I would suggest seeing if you can come up with a clever way to daisy chain the data signal.

What I want to try doing is a sort of track lighting using three parallel lines of conductive copper tape, and then use magnets, z-axis tape, or thumb tacks to place something like those LED circuit stickers anywhere along the tape. Is that likely to cause issues with the 1-Wire chips? For my use, 2-4m length would be acceptable.

I have not come up with a clever way of daisy chaining the data line, aside from cutting the copper tape data line at every position where you want to mount an LED.

If you put an attiny at each location you could use low baud rate async serial to control the firmware in each. They don’t have an internal serial # afaik so you’d need to tell each one it’s address, probably via the eeprom.

Seems like you want something more mass market, so you could hang a 1 wire id chip (dust spec) off each tiny but you’d need to come up with a way of reading the id back, that seems non trivial since you need that info to address the chip. You could blink it out the led and read it with a phone camera I guess.

BTW the design work behind circuit stickers was huge - Introducing chibitronics « bunnie's blog.

After visiting the factory, we decided the next step was to do a process capability test. The purpose of this test is to push the limits of the manufacturing process — intentionally breaking things to discover the weak links. Our design exercised all kinds of capabilities — long via chains, 3-mil line widths, 0201 components, 0.5mm pitch QFN, bulky components, the use of soldermask instead of coverlay, fine detail in silkscreening, captive tabs, curved cut-outs, hybrid SMT and through hole, Z-tape lamination, etc.

When I first presented the design to the factory, it was outright rejected as impossible to manufacture. However, after explaining my goals, they consented to produce it, with the understanding that I would accept and pay for all the units made including the defective units (naturally). Through analyzing the failure modes of the defective units, I was able to develop a set of design rules for maintaining high yield (and therefore lowering cost) on the circuit stickers.

How about using I2C? You would need 4 wires instead of 3 but all devices connect in parallel. I have driven a bunch of BlinkMs ( BlinkM — ThingM ) via a 3 meter I2C bus but I used ribbon cable so you may have issues using what you want. The BlinkMs are nice but pricey, however there an open source replacement so that you can easily rig up hardware using a ATTiny and some LEDs.Check out ( Matteo Caprari: CYZ_RGB alpha - blinkm alternative firmware ) and this Instructable ( http://www.instructables.com/id/Ghetto-Pixels-Building-an-open-source-BlinkM/#step0 )

Actually the firmware says it supports 1 Wire (not sure if that’s for it’s bus connect to the master or for a device connected it as a slave) so it might be a good thing to investigate…

One other issue with 1-Wire is that it is quite slow. This may impact the refresh rate of any LED modules you build using it…

How about this? You use 4 pieces of conductive tape, but the middle two are composed of 1" (or whatever regular length interval) segments, like alternating dotted lines.

You use WS28** leds with 4 contacts, top rail is power, bottom is ground, the two are data in and out.

When you place an led on the track, you have a data line on one middle rail up to the end of the segment. Then you place another led module flipped so that the data continues on the other rail. If you don’t want to place an led at that interval, you just jump the data rails with a magnet or non-led module connector.

Another thing you could do is make the segments really small, like <0.5" but instead of using a magnet to jump, use another piece of conductive tape that goes over and connects both data rails. Then you can place LEDs wherever you want.

Thanks for all the good suggestions. :slight_smile: Using an ATtiny might be a good idea, as I could program a simple arduino sketch for it to read Serial and autonomously perform PWM fade commands or whatever I want (removing the concern of being limited by the communication rate). And yeah, storing an ID in the EEPROM would work, and I could even do something where the master sends the LED an ID when it’s first powered up, so all you need to do is connect the lights in order.

That is an interesting article about the circuit stickers, thanks!

Yeah, I2C would work, but I’d prefer to keep it to as few wires/strips as possible. I think, with Serial, I could make it work over a single wire. Will have to experiment with that. The BlinkM’s and their DIY eqivalents are similar to what I’m looking at building (but they are more general-purpose).

@Gonazar, I appreciate your mspaint efforts. :stuck_out_tongue: I don’t really see the need for the brown segments if you’re going to have to lay down conductive tape anyway, and I am looking for a solution that is relatively simple to install, simple to manufacture, and aesthetically pleasing. Magnets are a good idea (and something I’ll try out), but I have my doubts that they’ll stick reliably to copper tape.

Not that this isn’t pretty much a solved problem, I started on something fairly similar recently. The idea being to have 4 ADC channels and 4 LED strips controlled by each board via RS485. The boards were based on ATtiny841. Chosen because it has 4 16-bit PWM channels and is small/cheap.

My design only used 4 bit addresses, but the basic idea is pretty much what you’re describing, plus bidirectional (master/slave) communication. You might be able to get something out of it, the code and Kicad project can be found here: GitHub - ktims/myosuit

For now the project has sort of fallen off the radar of me and the friend I was working with, but I built boards and the basic design is sound.

Hey everyone, I’ve done some experimenting with this project, currently with one ATtiny84 (to control an LED) and one Teensy 3.1, to program the ATtiny and send Serial commands to it.

I think I’ve got a proof of concept working whereby only using a MOSI serial line, the Master sends a variety of commands to the Slave (ATtiny with LED), and the Slave occasionally responds (simple acknowledgement) by pulling the MOSI line to LOW.

There is a protocol for assigning ID’s to each Slave. Remember that this involves a single serial communication wire that all Slaves are connected to. Some trigger (i.e. button press) begins Master’s Configuration routine:

Master polls all LEDs, asks for Slave #1 to respond until it does, then asks for Slave #2 to respond, etc.
While Master is polling, the user shines a flashlight at the LED of the first Slave. It will see the light, reply to Master by pulling MISO low, and then Master will tell it to blink. The user will see it blink, then move the flashlight to the next LED in the sequence. Every Slave will store the ID that it responded to in EEPROM.

I think this all works, but I only have one ATtiny at the moment, so I have to fake some of my testing. I’ll be getting ATtiny85’s, and was only prototyping with an 84 because more pins = more freedom.

Please let me know if this sounds silly or unlikely to work! :stuck_out_tongue:

1 Like

That’s a very clever method of enumerating unique IDs to each node!

1 Like