I believe what you want is a DAC (digital to analog converter). This blog listed the DAC solutions that were available in 2011: http://embeddednewbie.blogspot.com/2011/02/review-of-arduino-dac-solutions.htmlThe new Due has 2 DAC's built in (though evidently there was a library bug that you could only use 1, but that will be fixed shortly).
Of course it will take some time before you can buy a Due from a vendor that has it in stock.
Running a LED with 50% the current is significantly more efficient that using a PWM to run it at 100% of the current and flickering it on and off 50% of the time.
QuoteOf course it will take some time before you can buy a Due from a vendor that has it in stock.Do you mean a few days or a few years?
Really? The total power consumed (watt-hours) is the same in either case.
(I don't know if the perceived brightness is the same, but I'd assume so.)
If you just want two ranges, you don't need a full DAC. I haven't got the details completely figured-out in my head, but you can simply use two Arduino outputs.... One switching-on 5V, and another switching-on 10V.
Or, you can low-pass filter the regular PWM to get a smooth DC signal. (You'd need an op-amp to linearly double the filtered 0-5V output.)
If I had to guess, by January time frame it should be easily available like the Uno is now.
even switching between 0 and 5V on the same output that carries my PWM could work.
How does the PWM output work? Is there an input that corresponds to the output? For example, can I just hook 10V somewhere and output a 0-10V PWM signal? Or I am forced to output at 5V and someone how need to turn this into 10V?
If you are using PWM from an Arduino it will be the same voltage level as what is powering the microprocessor IC (usually 5 VDC but sometimes 3.3 VDC. You will need some type of amplifying or level shifting circuitry to increase the signal to a higher voltage level.
PWM is a square wave, so a digital input would read it either LOW or HIGH depending upon what part of the waveform the signal is on the pin at any given time. If you have the proper logic, either software or hardware-based), you could determine things like frequency and duty cycle. ADC is intended for true analog signals, not digital pulses, but most of the time would read close to the extremes of the range of numbers used for the conversion (e.g. around 0 for when the signal is LOW and for HIGH around 2n - 1, where "n" is the number of bits of resolution). The only time you'd see a number toward the middle is if the ADC managed to catch some part of the near instantaneous transition between the two extremes. So generally nothing is gained by using ADC on a PWM signal, unless it is coupled with some sort of buffer or record of past values (like in a digital oscilloscope).
The Uno advertises: Digital I/O Pins 14 (of which 6 provide PWM output). Does this mean I get 6 separate PWM outputs? Or do I only get 3 (if a negative and positive pin are needed for each) or some other number?Even if I get 6 PWM signals, that isn't enough. Can someone suggest which Arduino I would want?
The Mega 2560 provides 15 PWM pins, the recently announced Due has 12 PWM pins. The teensy 3.0 has 10 PWM pins.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16