# altering an output over a period of time

hi there
im trying to make an output that goes from 0 to 255 (or vise versa) over a period of time such as 20 mins ?
and ideas or example would be helpful
thanks Joe

Whilst the actual output mechanism is pretty incidental, do you mean a parallel eight bit port or a PWM?

bit port

basically what im trying to do is have a o-10v output i know i can only get a 0-5v out of the arduino but i will have to figure something to convert to when i get there.

So figure out how many seconds in your time period, divide by 256. For better accuracy, maybe use a 16.16 fixed point accumulator to provide your eight bits. Take out any non linearities in your conversion with a look up table.

Joes: bit port

basically what im trying to do is have a o-10v output i know i can only get a 0-5v out of the arduino but i will have to figure something to convert to when i get there.

You can get 0V or 5V, but you can't output any intermediate voltages unless you add an additional circuit to convert the digital output to an analog value.

So figure out how many seconds in your time period, divide by 256. For better accuracy, maybe use a 16.16 fixed point accumulator to provide your eight bits. Take out any non linearities in your conversion with a look up table.

any examples of this as it sounds a bit technical lol

You can get 0V or 5V, but you can't output any intermediate voltages unless you add an additional circuit to convert the digital output to an analog value.

o ok well il tell you what im trying to do, im trying to dim a high frequency floourescent that has a 0-10v pair on it so basically if i short those pair out it is at its dullest and broken apart at its brightest so what do we think the best is the best way to get around this?

thanks all

look up digital potentiometer.

I don't know how a 'high frequency floourescent' works but I suppose it may be possible to use PWM to modulate the brightness, using a frequency high enough to avoid visible flicker and low enough to avoid confusing the light's own controller.

If you want to control it using a varying DC output voltage, you will need to provide some form of digital to analog conversion circuit.

Sounds like pretty traditional analog dimmer control. PWM into a transistor or opti should bridge the connection for ya. Look around for DMX to analog conversion as your looking for the analog side. This was a pretty common theatrical dimming control back in the 80's and not that uncommon to find house dimmers still using it.

i tried playing around with analog output/PWM and it didnt really work so i think i might have a go with digital potentiometer. http://arduino.cc/en/Tutorial/DigitalPotentiometer