Go Down

Topic: How to measure a PWM-Signal (Voltage / Frequency )? (Read 427 times) previous topic - next topic

GerritF

Hey guys,
i have a question.

I need to measure a PWM-Signal that comes from an Electric Vehicle Charge Control.

The PWM-Signal looks like in the picture: PWM-Signal.

Depends on the Status and the Resistors an the end of the electric circuit the upper Voltage changes from 12V to 9V to 6V and to 3V. ( Pircture: Circuit)

S1, S2, S3 open should give me : 12V / 0V
S1 closed , S2 open, S3 open should give me: 9V / -12V
S1 closed, S2 closed, S3 open should give me: 6V / -12V
S1 closed, S2 open, S3 closed should give me: 3V / -12V

With the Ltspice Simulation everything works fine.

I can measure the upper voltage but I cant get the lower voltage. :/

I also cant get the frquency by using pulseIn()-function.

Any Ideas?



Southpark

#1
Jun 18, 2019, 09:50 pm Last Edit: Jun 18, 2019, 09:51 pm by Southpark
You're getting negative voltages in this particular kind of PWM signal. Is that what you really want?

GerritF

Yes it is wanted because the PWM-Signal is a communication signal betwen Electric Vehicle und Electric Vehicle Supply Station.

WattsThat

You cannot measure a negative voltage with an Arduino.

Please post your LTSpice schematic as your diagram and statements make no sense.
Vacuum tube guy in a solid state world

GerritF

Well why it makes no sense? O.o

This one is the official circuit.
I just want to measure the EV Side. (Voltage and Frequency)

The voltage divider at the previous schematic is because the Arduino cant measure voltages above 5V and the diodes were to let through the positive and negative voltage.

Southpark

#5
Jun 19, 2019, 01:58 am Last Edit: Jun 19, 2019, 01:58 am by Southpark
Oh I see. Ok.... thanks. Maybe you are right.... voltage divider to reduce the voltage down to some manageable level ... such as +/- 2 volt. And then into a unity gain buffer, and apply a DC offset to get the voltage to be entirely positive, so that that arduino can take some measurements.

What's the time scale of your graph there? Time scale.

GerritF

Hmm..is there any other option? I really only want to measuer the Peak-Voltage and the Frequency.

herbschwarz

Hi All,
I must be missing something here. The wave forms indicate
that they are generated by a (split) +12v and -12v power supply
but the diagram showing how the signal is used shows only two
output terminals! That indicates that the output is uni-polar, doesn't
it? The world does not see the mid-point (0v) of the power supply.
So there is no minus voltage peak to measure. We should look only at
the peak-to-peak instantaneous voltages.
Herb

MarkT

You cannot measure a negative voltage with an Arduino.
Why not, resistive dividers can divide to the 5V rail, not just to ground you know?
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up