I'm working on a car tacho. I'm using a Toyota OEM air-core meter and driving it with a CS8190 chip. An Arduino is used to generate a PWM signal. The needle moves when I connect the 12 V power supply, however it doesn't move when I use the Arduino to change the frequency. Does any one know why?
Because you need to change the duty cycle, not the frequency!
Because the frequency has nothing to do with changing the power. That is done by the PWM duty cycle.
See how PWM works here
PWM working
It does not use PWM. You need to input a signal with variable frequency not Pulse Width
Use the tone() function with different frequencies and see what happens.
Show the complete schematic of your circuit.
Which Arduino are you using?
@jim-p is correct. Looking at the data sheet for the chip that was mentioned, it takes a frequency signal input, not a PWM signal.
A problem with tone() might be that it can't go below 31Hz on many types of Arduino.
toneAC() does AFAIK.
Leo..
Thanks, I'll try a tone() function. And I'm using a Nano.
I see the circuit in the datasheet was designed for pulses with a max frequency of 350Hz.
So use the appropriate frequency range for your design
A schematic would help us diagnoise problems.
tone() won't go below 31Hz on Nano. If that's a problem, maybe try toneAC library as suggested by @Wawa.