Require a bit of help driving some addressable LED's - Page 1
Forum section: electronics / projects

author: tron9000
author_rank: Frequent Contributor
timestamp: March 24, 2016, 04:40:37 pm
content: So for the past 2 days now I've been trying to figure out how to drive these addressable LEDs -Rapid: 72-9625 - addressable LED in 5mm BulbNow I don't think the data sheet is of much help really, it gives you the general jist of how to drive them but I'm stumped at how to generate the signalling required, it's like a sort of manchester coding - the best I've managed to do it this:So I have managed to get it into manchester coding form, but am stuck as to how to get it into the form required in the Datasheet.As you can see I've tried to exploit the time constant of C1 R2 & R3 and then use a schmitt trigger to make the waveform required, but as you can see from VOUT its not quite right. The Data should be 010010 and each bit is 400us long, as is the time period for one clock cycle.So: am I heading in the right direction in terms of design? - I can't find any other data on this LED other than the datasheet or even the manufacturers website, so am a bit stuck. I suppose a big help would be if anyone knows what this sort of communications is called?

author: ledtester
author_rank: Super Contributor
timestamp: March 24, 2016, 09:28:48 pm
content: I believe this is called polar RZ encoding. There is a discussion about driving this waveform here:https://forum.arduino.cc/index.php?topic=358916.0Just take two digital outputs connected by two 1K resistors. The input to the LED module is connected to the junction of the resistors. By making the pins either both HIGH, both LOW or different you can get Vdd, 0 or Vdd/2.Here is a data sheet with an application schematic (at the end):http://optosupply.com/UploadFile/PDF/ost4ml5b32a.pdfThe relevant part is pins 3 and 4 of the MCU.

author: tron9000
author_rank: Frequent Contributor
timestamp: March 29, 2016, 08:13:50 am
content: Thanks, was getting a bit frustrated as not being able to identify that type of protocol. Never heard of that one before - do now though.

author: Ian.M
author_rank: Super Contributor
timestamp: March 29, 2016, 08:30:51 am
content: You could also use an analog capable MCU I/O pin (so its input buffer doesn't draw excessive supply current if held between valid logic levels) and bias it to 1/2 Vdd with a potential divider. To get the high level, set it as a logic '1' output. To get the intermediate level, set it as an input. To get the low level, set it as a logic '0' output. To send a bit, load the bit into the pin's data register then toggle the direction from input to output, hold for the desired duration then back to input.Rather than bitbanging each byte, it could be offloaded to hardware on any MCU with a USART capable of synchronous master mode at an appropriate baud rate. Simply connect the USART synchronous Data pin to the input of a tristate buffer, and its Clock pin to the buffer output enable (an inverter *may* be required), with a potential divider network as already described on the buffer output. Then sending each colour byte would be as simple as writing it to the USART TXDATA register.

author: tron9000
author_rank: Frequent Contributor
timestamp: March 29, 2016, 03:42:53 pm
content: Thanks Ian.M, that sounds like a more streamlined way of doing it. Will find a 74HCT244 or similar with less buffers and might give it a whirl.

author: Ian.M
author_rank: Super Contributor
timestamp: March 29, 2016, 08:26:27 pm
content: You can also use a SPDT analog switch chip (e.g. 74HC4053) to switch between Sync. USART Data pin and the Vdd/2 voltage, controlled by the USART Clock pin. This has advantages if you have a long cable run to the first LED, because you can then use a rail splitter (e.g.http://www.ti.com/lit/ds/symlink/tle2426.pdf) for the Vdd/2 voltage to get much 'stiffer' drive - especially if you parallel all the channels of the analog switch chip to reduce the ON resistance.