简体   繁体   中英

Arduino and LM3914N

I have a pair of LM3914N wired and tested with a simple potentiometer, which seems to work with no problem at all. The thing is I want to use Arduino to drive it, since I'm trying to emulate a tachometer with Simhub. The problem is, whenever I try to drive the circuit with an arduino PWM output, the LEDs only flicker or stay fully on depending on the output.

So far I tried driving a transistor with the PWM output to drive the circuit and using an RC circuit to smooth out the PWM signal, but none of those seemed to work.

Edit: I don't have the code as I'm using the software Simhub, but as far as I know the outcome is simple Arduino PWM output based on program input.

This is the link for the schematic of the LM3914N (won't let me upload images yet). The arduino output is just wired to the analog in part of the schematic.

Thanks in advance.

The only way to achieve an analog output on an Arduino is to either use an external DAC -- as I think the ATMega328p and ATmega2560 MCUs that Arduino boards use only have PWM output capable "DAC" -- or to filter the PWM output with an RC circuit like you describe.


Here's a sample PWM-to-voltage IC that will offer the easiest solution to your problem: LTC2645

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM