• 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

Thread starter #1
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.
 

JimB

Super Moderator
Most Helpful Member
#2
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
 
Thread starter #3
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

alec_t

Well-Known Member
Most Helpful Member
#4
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.
 

Nigel Goodwin

Super Moderator
Most Helpful Member
#5
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.
 

JimB

Super Moderator
Most Helpful Member
#6
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
 

JimB

Super Moderator
Most Helpful Member
#7
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
 

alec_t

Well-Known Member
Most Helpful Member
#8

JimB

Super Moderator
Most Helpful Member
#9
Current change, as a consequence of resistance change.
Agreed.
I was thinking that this thing was more sophisticated than it may actually be.

JimB
 
Thread starter #11
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!
 

Latest threads

EE World Online Articles

Loading

 
Top