0
\$\begingroup\$

My question reference's a problem I'm having with my eletronic solution. I'm using a CI LM3915N-1 to build a bargraph circuit, where I need to turn on a few LED's depending the voltage that my CI receives. The problem is the arduino just write PWM and not analog voltage. So how can I solve this? how can I convert the PWM to a analog voltage?

Here is a image of the Bargraph circuit: enter image description here

To understand better what I want, is to imagine that at Signal Source will be an arduino sending AC signal.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ See related: electronics.stackexchange.com/questions/12345/… \$\endgroup\$ Commented Nov 12, 2013 at 14:02
  • 2
    \$\begingroup\$ Why are you converting a digital signal to an analogue signal and then back to a digital signal (lit LEDs)? Wouldn't it be simpler, and more accurate, to use a digital solution? Shift register? \$\endgroup\$ Commented Nov 12, 2013 at 14:11
  • \$\begingroup\$ Thanks embedded.kyle and RedGrittyBrick, btw RedGrittyBrick, Im trying this solution because Arduino UNO only have 12 digital pins, and all my digital pins are used so far, so I need to use an analog pin ;x \$\endgroup\$ Commented Nov 12, 2013 at 14:56
  • 2
    \$\begingroup\$ Analog pins are digital pins in disguise. \$\endgroup\$ Commented Nov 12, 2013 at 14:58

2 Answers 2

3
\$\begingroup\$

There are 3 options:

  1. Put a low-pass filter on the PWM pin so that only the very low frequencies in the signal generated by the PWM, which will be at approximately the equivalent analog voltage, are allowed through.

  2. Connect a separate DAC to the Arduino, either serial or parallel, in either integrated or discrete resistor ladder form.

  3. Use an Arduino that has a DAC built-in, such as the Arduino Due.

\$\endgroup\$
0
\$\begingroup\$

If you are ok with limiting LED number to 8, you may have much simpler solution utilizing serial in parallel out register. 74HC595 will do the trick without any need for digital-analog-led conversion. You may chain shift registers to make longer led strips, that will certainly require additional ICs for each 8 bit group. As a bonus you will have individual control of every LED.

There are 12-bit registers also, although they may be harder to source. I'm not sure, maybe there are even longer one's somewhere.

\$\endgroup\$
2
  • \$\begingroup\$ HEF4894B is a nice 12-bit LED driver, chainable and with PWN brightness control if you'd wish to use it. \$\endgroup\$
    – x4mer
    Commented Nov 12, 2013 at 18:45
  • 1
    \$\begingroup\$ The TLC5940/5941 are 16-channel, high-voltage PWM drivers. \$\endgroup\$ Commented Nov 12, 2013 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.