analog out 0-10V With Arduino for lighting control

Hi. I have an easy question ?
I want to use the arduino to control a 0-10V light system (0-10 V lighting control - Wikipedia) so that I can dim fluorescent lights. Basically you control the system (the ballast, ej: Philips HF-regulator) with a DC signal between 0V (min) and 10V (max). I have to control independently 30 lights

I imagine that the easiest way is to use PWM outputs to make a continuous analog signal between 0-5V, right?. How can I amplify that signal to a 0-10V range?. I imagine using transistors, but how?
Any thoughts are welcome! Thanks!
F
pd: forget about dmx - dali or other systems, i need 0-10V

Hi. I have an easy question ?

Those have a way to turn to to be the hardest.

I imagine that the easiest way is to use PWM outputs to make a continuous analog signal between 0-5V, right?. How can I amplify that signal to a 0-10V range?. I imagine using transistors, but how?

PWM doesn't output a continuous analog signal, it output a series of full voltage pulses and varies the duty cycle. If you were to try to power a fluorescent bulb with a signal like that, it would be very bad. I think (and maybe someone can correct me or confirm this) the bulb would be very dim, flicker, and be so hot it's a real fire hazzard. What you can do is use a filtering circuit to smoth the PWM into an analog voltage.

Are you trying to power the fluorescent bulb off this signal or is it a control signal? The arduino can only output 40mA on an IO line.

As far as changing the 0-5V level to a 0-10V level, it's a fairly simple opamp circuit to linearly double the voltage.

Hi Oracle.
I didn't explain myself correctly, the pwm is the control signal (I'm not trying to power the fluorescent bulb with this signal) which controls a 0-10V ballast who powers the fluorescent lamp .
Can you send me info (schematics) about «simple opamp circuit to linearly double the voltage»?.
Many Thanks,
F

Ok, i suppose i have to apply a non-inverted amplifier to the 0-5v pwm signal, with a Ri and Rf of for example 10KOhm:

I'll start from here
thanks
F

You might find this document to be useful ...

http://instruct1.cit.cornell.edu/courses/bionb440/datasheets/SingleSupply.pdf

You will need a low pass filter circuit to smooth out the PWM pulses to DC.

Mike

Ok, i suppose i have to apply a non-inverted amplifier to the 0-5v pwm signal,

Exactly, you need a non-inverting amp circuit.
I was going to give you Op Amp Non-Inverting Amplifier

But remember, you're not applying your PWM signal directly to the op-amp, you need to smooth it into a true analog level first.

And how should i «smooth it into a true analog level first»?.
Mike sais that i need a low pass filter the circuit to smooth out the PWM pulses to DC.
Any Schematics? ...
Many Thanks
F

Hard to say if it's right for you, but perhaps X10 would be a better choice for control? I believe the arduino talks to it through serial, which would make it far easier to control 30 lights individually. And not too expensive either from what I understand. I haven't used it, but I've been considering it.

Arduino X10 tutorial: http://www.arduino.cc/en/Tutorial/X10

This should get you in the ball park.

V1 is supply for the OP-AMP. V2 is the PWM output from the Arduino. The OP-AMP must be a single supply rail to rail type.

A simpler way to do it would be to take the output through a simple common emitter transistor stage with the collector load of the transistor connected to +10V. Then smooth that with an R & C or two. In that way you are already dealing with a 10V signal to start with and there is no need for a precise gain on the amplifier.

A simpler way to do it would be to take the output through a simple common emitter transistor stage with the collector load of the transistor connected to +10V. Then smooth that with an R & C or two. In that way you are already dealing with a 10V signal to start with and there is no need for a precise gain on the amplifier.

In which case this will get you in the ball park

And how should i «smooth it into a true analog level first»?.
Mike sais that i need a low pass filter the circuit to smooth out the PWM pulses to DC.
Any Schematics? ...

The schematics for a low pass filter are in the pdf I linked to:

http://instruct1.cit.cornell.edu/courses/bionb440/datasheets/SingleSupply.pdf

Regards,

Mike

Hi,
I'm going to try both schematics that Delta uploaded, they are very clear! Thanks!
I can't find the LT1466 (single supply rail to rail op-amp) where I live (Brussels).
There are tones of references for single supply rail to rail op-amps on the net; I'm a little bit lost.
At the shop I use to go, they have the TL081 and LM741, but I don't know if they are rail to rail (I don't see any info about it in the datasheet).
Could anyone tell me other “typical” single supply rail to rail op-amps to replace the LT1466 in this schematics?
For the transistor's schematic I was going to use a tip 120, is it ok?

Sorry for my ignorance.
Felix

Hi,
I'm going to try both schematics that Delta uploaded, they are very clear! Thanks!
I can't find the LT1466 (single supply rail to rail op-amp) where I live (Brussels).
There are tones of references for single supply rail to rail op-amps on the net; I'm a little bit lost.
At the shop I use to go, they have the TL081 and LM741, but I don't know if they are rail to rail (I don't see any info about it in the datasheet).
Could anyone tell me other “typical” single supply rail to rail op-amps to replace the LT1466 in this schematics?
For the transistor's schematic I was going to use a tip 120, is it ok?

Sorry for my ignorance.
Felix

Ignorance is fine, not everyone is good with electronics. You really should use a single supply style op-amp but rail to rail is not necessary if you increase the V1 voltage to say 12V. You could use an LM124 (or LM324 they tend to be more common) which is single supply but only goes to about 1.5V of supply so at 12V it should be capable of 10.5V max. I don't know what type of lighting controller your using, or what it will do if you exceed 10V, so be careful.

A TIP120 should be ok, also note that the transistor circuit will work in the reverse manner to expected. IE the op amp circuit will output high voltages for high duty cycle, but the transistor one will output low values for high duty cycle.

You might also take a look at a device like this: Analog Output Card

I've used their ADC input modules before, it's pretty solid stuff. Of course it's much cheaper if you buy a DAC chip and make your own board. But this is a proven design, which counts for a lot if you actually want to finish projects.

I use a simple lm358 configured as a x2 amplifier

with an rc filter I smooth out the arduino PWM signal then i feed it into the amp powered at 12v
if you dont have motors connected to the arduino, you can increase the pwm speed and get smoother signals
i get pretty good results

massimo

I try the Delta schematics with the LM324N. Works fine!.
Many thanks to all for the help!
F

Hi,
I just wanted to know if someone can confirm that the delay I'm getting when dimming a 0-10V ballast is normal (has nothing to do with the arduino). I'm using a Philips HF-R 118 TL-D (18w). This ballast makes big fades when diming the tube, so I can't make quick transitions. You can see the delays I'm talking about in this youtube video:

Has anyone better results? Maybe with Osram dimmable ballast or with other brands and models?
Any comments are welcome ?
F

The delays seem normal, if you are using big capacitors for the RC filter.

i was wondering...
as for the initial 10V question, if we power the arduino with an external 12V, why cant we just get the pwm to drive a small npn transistor, powered by the 12V VIN pin?
the dimmable ballast application does not need great linearity. is there another issue i am missing?

is there another issue i am missing?

No, that should work. However as already posted, using a single common emitter transistor will result in a reversal of control action. That is at 0% duty cycle in software the control voltage will be full Vin voltage output and 100% duty cycle will result in near zero voltage output. Just makes the software a little more tricky, but not that big a deal. Biggest concern is if Vin is over 10vdc then the control voltage to the ballast will also be over 10vdc, does this cause any harm to the ballast controller?

Lefty