remote controlled PWM generation

In a few words I'd like to make a few RGB LED lamps which can be remotely controlled/synchronized through a 1-wire microLAN by sending three bytes, corresponding to the usual 16.7M palette.

I've come up with a few ideas:

  1. Arduino acts as a 1-wire slave
  2. DS2408 (8 bit switch) to an Arduino digital inputs
  3. some PWM generator that can be managed through the 8 bit DS2408 output

I don't want to reinvent the wheel (I know, DMX already exists) but I'm looking for a quick way to integrate the lamps to my 1-wire network.

  1. I didn't find a sketch, but I've found some PIC based 1-wire LCD drivers, so it's possible but I should write the code

  2. This one seems the easiest, but also the less elegant. To lower costs I could program the ATmega chip on Arduino board, then put it alone with the crystal, as I don't need USB input or shields.

  3. This could be implemented in this way, but it has only 4-bit resolution and quite complex for my skills (three chips per color channel)

What about a voltage controlled pwm generator like this? Voltage Controlled PWM Generator
I could drive it by hooking several resistors values to the 8-bit output of DS2408

What do you think?

Another idea: I'm running my sensor network on CAT5 cables. I have some unused wires inside it. Can I transmit PWM signals from Arduino over long cables?

What about using a Rainbowduino (http://www.seeedstudio.com/blog/?page_id=187) as base? It is normally using a I2C/TWI or UART as interface and a default program, but it's up to you to change that.

It supports 3x8 LEDs with 120 mA and LEDs with 500 mA outputs.

MBI5168

MikeT

Thank you MikeT for the suggestion.
I didn't know the Rainbowduino. If I could adapt to my project I could discard all my work for driving the high power RGB LEDs.
However there's still 1) solution problem: need to write 1-wire slave code, as no one did it. There are only 1-wire master codes.

I think I'll use the schematic of solution 2), this is the only PWM generator design I've found accepting a parallel digital input.
Even if it's 4 bit, it would mean 64 colors which are quite enough for a LED lamp.
Do you think I can reduce chip count by using one frequency generator (74LS161 and 74HC14) and two 74LS373, since they are only used in half? It would bring chip count to 7 instead of 12

Even if it's 4 bit, it would mean 64 colors

Not sure where you get that from? Four bits is only 16 different levels (two to the power 4). If applied three such circuits to an RGB LED you would get
16 * 16 * 16 = 4096 colours.

Yeah Mike you're right, it's 2^12 after all... but probably yesterday night was already sleeping awake :smiley:

What do you think about that circuit? Should I replicate it three times as it is or can reduce the chip count?

Yes you only need one frequency generator for all 3 circuits, just feed the same outputs into each comparator. As for the latch if you used both halves then you would need twice as many pins from the Arduino. You could probably use two shift registers cascaded here and only clock in 12 bits.