I found these $5 gauges on ebay (see http://stores.ebay.com/Asia-Engineer ). By replacing the internal 30k resistor with a 4.7k resistor, you can turn the 30 volt gauge into a 5 volt gauge, and then control it with PWM from a boarduino. This demo uses the same software used in my other videos which walks the PWM duty cycle up and down in a linear fashion (see http://youtube.com/watch?v=6U5GhjDC3dw and http://youtube.com/watch?v=tTchk4pEHQg ).
In order to convert PWM into an analog voltage we have to filter out the
pulses and store the average voltage. The resistor/capacitor combination
in Figure 5.31 will do the job. The capacitor will hold the voltage set by
PWM even after the instruction has finished. In order to hold the
voltage relatively steady, a program must periodically repeat the PWM
instruction to give the capacitor a fresh charge.
RandyThePilot 1 year ago
Hi, this is great! I have a bunch of these gauges and ones similar that I want to use with a Basic Stamp 2. I am wondering if I would be able to use PWM to make it read a steady value of say 10, and then with the logic change it to read a steady value of 20. I want to tie the gauges into my project and put different scales behind to suit my needs. Do you think that would work? I know how to program the BS2, but I am not experienced with PWM and these indicators.
RandyThePilot 1 year ago