Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PWM to Analog converter

Status
Not open for further replies.

Thein Zaw Htun

New Member
Could someone please help me how to convert PWM signals to analog voltage using pic16F676 ? I'd like to take constant analog voltage output from PWM.
 
The quick answer is that to convert a PWM signal to a DC analogue signal, you just need a low pass filter which has a time constant which is long compared with the period of the PWM.
A simple RC network will do the job. You don't need a PIC to do the conversion.

However, the devil is in the detail.
Where does the PWM signal come from?
What does the PWM signal represent?
What does the analogue signal feed into?

Some more information would be useful.

JimB
 
Thanks for your attention Sir, I'm planning to get analog voltage value from a PWM type fuel sensors. The vehicle's Body Control Module send PWM with 10 Hz frequency to vehicle's fuel sender unit (which actually was a rheostat). I want to convert this PWM signals to analog voltage which will change by the fuel level. I draw a sketch and uploaded.
 

Attachments

  • pwm-analog-1.pdf
    9.8 KB · Views: 298
Are you sure it's PWM, not just fixed-width pulses at 10Hz? I'm struggling to understand why PWM would be needed for a fuel sender.
 
Old car 'electronics' used a crude electro/mechanical 'regulator' to provide a regulated voltage for the instrument panel - but this is only the power supply for the instruments, and not an actual data signal. To add any actual electronics to the instrument panel you need to replace the crude pulsed 'regulator' with a proper DC electronic one.
 
Are you sure it's PWM, not just fixed-width pulses at 10Hz?

If they are fixed width pulses at a fixed frequency, what is changing?
What can change the reading on the meter?

JimB
 
The vehicle's Body Control Module send PWM with 10 Hz frequency to vehicle's fuel sender unit (which actually was a rheostat).
Old car 'electronics' used a crude electro/mechanical 'regulator' to provide a regulated voltage for the instrument panel

As I said earlier, more information needed.

It looks as though the "PWM" may be just a crude stabilised supply for the traditional crude vehicle instrumentation.
What sort of car is this?
How old is it?

JimB
 
Current change, as a consequence of resistance change.
Agreed.
I was thinking that this thing was more sophisticated than it may actually be.

JimB
 
Here easier to look at and think about
Screenshot from 2017-12-06 15-05-15.png
 
Thanks you all for your times and attention, it's was a Suzuki , Ertiga 2017 model. As I already posted, this car take the fuel sender unit status using a pulse with 10 Hz which comes from Body Control Unit. I haven't enough knowledge to manipulate the BCM to get the fuel status and so , I tried to convert this pulse signals to analog voltage and then , calibrate fuel amount with converted analog voltage. I've to admit that I have tested it wrongly and one of my colleagues messed some wiring and the result was built-in fuel gauge gone!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top