# Convert 0 5V PWM signal to +2.5V -2.5V signal

Discussion in 'Embedded Systems and Microcontrollers' started by hengis, Sep 9, 2011.

1. ### hengis Thread Starter New Member

Sep 9, 2011
3
0
I wish to take a 1kHz PWM signal and create a symmetrical 2.5V signal from it. I do not want to have polarisation effects altering my measurements. The frequency if that is the correct term is about 1kHz Any help would be appreciated

2. ### SgtWookie Expert

Jul 17, 2007
22,183
1,729
Do you have +2.5v and -2.5v supplies available?

If not, do you have at least a negative supply available that is <= -2.5v?

3. ### hengis Thread Starter New Member

Sep 9, 2011
3
0
Thanks for your quick reply. No to both questions. I would have to add a circuit to create such a voltage.

4. ### mik3 Senior Member

Feb 4, 2008
4,846
63
A virtual ground might be a solution.

Why do you need a +2.5V and a -2.5V signal?

5. ### hengis Thread Starter New Member

Sep 9, 2011
3
0
I want to measure water content (wetness) in plant pots. A dc signal causes polarisation about the electrodes. Using an alternating +2.5V pulse followed by a -2,5V pulse gets over this problem. Using a MCU is more practical in a greenhouse particularly as I am reluctant to "play" with mains voltages in a greenhouse with water and dampness all around.

6. ### ErnieM AAC Fanatic!

Apr 24, 2011
7,447
1,628
Just insert a series capacitor. That keeps out the DC but for the small leakage current of the cap itself.

7. ### John P AAC Fanatic!

Oct 14, 2008
1,639
225
But if it's PWM you'll have more charge transfer in one direction than the other, unless the duty cycle is exactly 50%, i.e. a square wave.

8. ### ErnieM AAC Fanatic!

Apr 24, 2011
7,447
1,628
That is not true.

9. ### John P AAC Fanatic!

Oct 14, 2008
1,639
225
I don't see how it can not be true. Suppose you have +2.5V feeding through a resistance to Gnd for 9 seconds, followed by -2.5V through the same resistance to Gnd for 1 second, i.e. a very slow PWM signal. Won't the ratio of the amount of charge transfered be the same as the ratio of time intervals, 9:1? Note that I'm talking about "charge" rather than "current" because while it's flowing, the current is constant. And I assume it's integrated charge that affects the electrodes chemically.

10. ### ErnieM AAC Fanatic!

Apr 24, 2011
7,447
1,628
As a capacitor is incapable of passing a DC current then the " integrated charge that affects the electrodes chemically" is zero irregardless of the driving signal.

Aside: While it is possible to get a constant current to flow thru a capacitor, you need to drive it in a very special way to accomplist this, or in other words, the current in a cap is only a constant in very special circumstances. A linearly changing voltage can accomplish this.

11. ### John P AAC Fanatic!

Oct 14, 2008
1,639
225
Oh, you're assuming that a capacitor is in the circuit. I was assuming it wasn't. Mystery solved.