Generate a + and - power supply from a single battery

Thread Starter

Dominick00

Joined Mar 27, 2025
31
No.
It may work in the simulation but it won't work in a real circuit.
The (+) input of U2 needs a DC path for its bias current as MrChips stated.
Do you not believe that?

To minimize the output offset, you can provide a U2 DC gain of one by connecting a capacitor (Cx) of appropriate size for the lowest AC signal frequency, in series with R6 to ground.
Then the DC gain for offset will be 1 but the AC gain above the R6Cx rolloff is 161.

Your plots are useless to us without knowing where those signals are coming from.
Give the nodes a label (Label Net) on the schematic (e.g. In, Out, etc.) so we can tell.
Hi, thank you for your help

this is the whole circuit; I've added a capacitor in series with R6 at ground as you said, but in the result the 2nd OpAmp won't work anymore (the final signal is equal to the signal produced by the first OpAmp, while i need the last signal to have wave of amplitude around 6V or something like it).
can you maybe send a drawing of what should i do? thanks
1744269032018.png
 

Irving

Joined Jan 30, 2016
5,188
this is the whole circuit; I've added a capacitor in series with R6 at ground as you said, but in the result the 2nd OpAmp won't work anymore (the final signal is equal to the signal produced by the first OpAmp, while i need the last signal to have wave of amplitude around 6V or something like it).
can you maybe send a drawing of what should i do? thanks
R5 is too big, capacitors are way to small for that low frequency. Putting C= 1000u, 300uV in will drive output into saturation. However, the gain is only flat from about 1Hz up, If your input frequencies are lower than 1Hz this circuit is not optimal.

1744283599670.png

1744284580275.png

[edit] Corrected capacitor values
 
Last edited:

Irving

Joined Jan 30, 2016
5,188
I've reached out with this in the end in easy eda to give the arduino a dig. The big question is: would it work?

View attachment 346475

I've just noticed two big problems with your proposed solution in post #19:
1. The way you are using that A2D converter won't work for several reasons due to the way you have it connected and because you exceed a number of constraints on the device.. Is there a reason for using that specific device, as there are much simpler and easier devices you could use, as well a being smaller and cheaper - you don't need a 28pin 8 input differential device when a 16pin 4-input single-ended device would work just as well.

2. Your output from the second opamp is symmetrical about the virtual ground. Most A2D converters, this included, only work with analogue signals that are +ve with respect to ground. If you want to measure both the positive and negative transitions you need to offset your signal midway between the A2D analogue ground and the maximum voltage you expect to convert, usually the VREF. On this device VREFP and VREFN define the conversion range, but they must be within 2.5v of each other, the actual VREF = VREFP-VREFN where VREFP>VREFN and 0 < VREFP-VREFN <= 2.5v. Typically VREFP would be connected to +2.5v and VREFN to AGND and the conversion range would be 0 - 5v or -2.5v - +2.5
 

Thread Starter

Dominick00

Joined Mar 27, 2025
31
I've just noticed two big problems with your proposed solution in post #19:
1. The way you are using that A2D converter won't work for several reasons due to the way you have it connected and because you exceed a number of constraints on the device.. Is there a reason for using that specific device, as there are much simpler and easier devices you could use, as well a being smaller and cheaper - you don't need a 28pin 8 input differential device when a 16pin 4-input single-ended device would work just as well.

2. Your output from the second opamp is symmetrical about the virtual ground. Most A2D converters, this included, only work with analogue signals that are +ve with respect to ground. If you want to measure both the positive and negative transitions you need to offset your signal midway between the A2D analogue ground and the maximum voltage you expect to convert, usually the VREF. On this device VREFP and VREFN define the conversion range, but they must be within 2.5v of each other, the actual VREF = VREFP-VREFN where VREFP>VREFN and 0 < VREFP-VREFN <= 2.5v. Typically VREFP would be connected to +2.5v and VREFN to AGND and the conversion range would be 0 - 5v or -2.5v - +2.5

Hi again,
I've studied a bit about this circuits, now I have reached something out, something works and something not.
I've changed a bit my circuit and also tried with board and arduino.
1745500323645.pngIMG_4485.jpeg
I have this circuit: a piezoelectric element connected with a 1Mohm resistor in parallel and a 0.47microF capacitor in parallel; the negative terminal of the piezo is then connected to a current divider, so it's connected between two 10kohm resistors, one connected to ground and the other to 5V (Arduino). the positive terminal of the piezo, instead, is connected to pin 3 of an LT1366. the VCC (pin 8) of the LT1366 is connected to 5V (Arduino); the ground (pin 4) of the LT1366 is connected to ground (=Arduino ground). pin 2 of the LT1366 (negative input) is connected with a 1kohm resistor to ground and has a 1kohm resistor connected to pin 1 (I also tested without the resistor and with larger resistors) to function as feedback. pin 1 is connected to the A0 of the Arduino to read the signal and to pin 2 via the feedback resistor to pin 2. problem: first multimeter measurement: multimeter post piezoelectric (with parallel resistor and capacitor)-> I measure 0.0002V and I see the variations when loading the piezoelectric element. I move forward in the circuit with the multimeter measurement-> I measure current at the operational amplifier output: I put the negative terminal to virtual ground and the positive terminal to the op-amp output and I measure about 2.3V which doesn't change if I touch the piezo (op-amp has 1kohm feedback to pin 2 from pin 1 and at pin 2 I have 1kohm to ground). measuring with the Arduino instead: it measures unstably (around 0-5) and when I give a (even light) tap to the piezoelectric element, the Arduino immediately goes to 1020.
(I've tried many value for resistor and so on, the one in the photo may not be the one I'm speaking about)
 

Irving

Joined Jan 30, 2016
5,188
I'm not sure I'd trust the accuracy of that 200uV reading, as it a very high-impedance circuit and it could be upset by the meter. What multi-meter are you using & on what range setting? For the second reading you say you're measuring current but if you're measuring from opamp output to ground that cannot be true, it must be voltage.

For a start the 1k resistor to ground from -vin should go back to the junction of the two 10k resistors for the output to sit at VCC/2. With it connected to actual ground your output will be at 5v and measuring Vout to vg will give approx 2.5v AND WON'T CHANGE. The Arduino is measuring from Vout to its ground and therefore reads full scale.

Secondly, that 470nF capacitor is way too big. It shouldn't be much bigger than say, 10nF, IMHO.
 

Thread Starter

Dominick00

Joined Mar 27, 2025
31
I'm not sure I'd trust the accuracy of that 200uV reading, as it a very high-impedance circuit and it could be upset by the meter. What multi-meter are you using & on what range setting? For the second reading you say you're measuring current but if you're measuring from opamp output to ground that cannot be true, it must be voltage.

For a start the 1k resistor to ground from -vin should go back to the junction of the two 10k resistors for the output to sit at VCC/2. With it connected to actual ground your output will be at 5v and measuring Vout to vg will give approx 2.5v AND WON'T CHANGE. The Arduino is measuring from Vout to its ground and therefore reads full scale.

Secondly, that 470nF capacitor is way too big. It shouldn't be much bigger than say, 10nF, IMHO.
The problem you are talking about were true and solved this in the last days the circuit works as expected.

now a new problem comes in.I would have to put this inside a box so without the 5V from the computer (I'll send the data out).

I came out with a double voltage solution so that I won't lose half of the arduino power (with the virtual ground at 2,5V I register only around 2V of values.

So I've tried this circuit but I have problems: not smooth out signal; variation in piezo saturate the signal and don't go back to the initial signal.

Screenshot (I didn't put the zener part D1 and R2 yet and I'm still powering my arduino from computer right now)
1745932568264.png
1745932705569.png
(the part of the cables out of the image are for the batteries series, are just connected black to red for all the couple)
 

Irving

Joined Jan 30, 2016
5,188
Well the zener part won't work; Arduino needs considerably more current than the 2.4mA a 1k resistor will allow. Use another 3-pin fixed-voltage (5v) regulator.

I'm guessing R1 should be 1Meg rather than 1milliOhm.

Is your piezo currently loaded or just free-standing, ie are you testing with your stated static load of 3kN? How are you generating the test force?

What is your intent with C3 and R3/C2?
 
Last edited:

Thread Starter

Dominick00

Joined Mar 27, 2025
31
R
Well the zener part won't work; Arduino needs considerably more current than the 2.4mA a 1k resistor will allow. Use another 3-pin fixed-voltage (5v) regulator.

I'm guessing R1 should be 1Meg rather than 1milliOhm.

Is your piezo currently loaded or just free-standing, ie are you testing with your stated static load of 3kN? How are you generating the test force?

What is your intent with C3 and R3/C2?
3, C3, R2 are for stabilizing the signal, I think.
I'm actually pressing my piezo by hand without any static load.
for the arduino I'll use another fixed voltage regulator, thanks.
The piezo actually isn't my problem anymore because with the last circuit it works perfectly; now the big problem is that the signal isn't stabilized anymore (note that right now in my configuration there's no zener so this isn't the problem). How can i fix it?
 

Irving

Joined Jan 30, 2016
5,188
R3, C3, R2 are for stabilizing the signal, I think.
They effectively are a low pass filter ruling out any signals above about 200Hz and smoothing out rapid changes (so impulses will not be faithfully represented in the output)

I'm actually pressing my piezo by hand without any static load.
for the arduino I'll use another fixed voltage regulator, thanks.
The piezo actually isn't my problem anymore because with the last circuit it works perfectly; now the big problem is that the signal isn't stabilized anymore (note that right now in my configuration there's no zener so this isn't the problem). How can i fix it?
It may have 'worked', but I don't think it was actually working the way you think it was, or producing robust & repeatable measurements. There are fundamental issues with what you are trying to do:
1. A piezo device has a charge, not voltage, output, so any voltage derived from it represents the rate-of-change of force, not the actual force itself. To get a true force measurement you need a charge integrator/amplifier (as per earlier discussions), not a voltage amplifier as the first stage.
2. The output of your device is 21pC/N, i.e. a force of 100N applied for 1 second generates 2.1nA of current, which is swamped by the 10nA of input bias current for that opamp, which is also generating a 10mV static input voltage to the amplifier. You need a much better amplifier with input bias currents in pA rather than nA! Additionally, the breadboard isn't a good place for these very low charges/currents; surface contaminants, etc, can 'leak' charge and give erroneous readings.
3. The piezo device is capacitive in nature, so the voltage it generates (remember Q = CV), depends on the capacitance of the cables etc connecting it to the amplifier. The change in output voltage you measure is probably as much, or even mainly, to do with the change in capacitance of your setup and your hand movements nearby as it is to the force being applied. Use of a voltage amplifier (and integrating elsewhere, eg in software) only works reliably if it is integrated with the sensor with no loose connecting cables.

See these AAC articles, and the TI design note attached.
https://www.allaboutcircuits.com/te...charge-amplifiers-for-piezoelectric-sensor-s/
https://www.allaboutcircuits.com/te...sign-charge-amplifiers-piezoelectric-sensors/

Here are some reference examples from Analog Devices and TI; note the common theme of a charge integrator/amplifier front end; the feedback capacitor (C2, CF) and input resistor (R4, Rin) have to be selected to match the sensor - for that you need full electrical and mechanical details of the sensor.

1746009477004.png


1746009542027.png
 

Attachments

Thread Starter

Dominick00

Joined Mar 27, 2025
31
They effectively are a low pass filter ruling out any signals above about 200Hz and smoothing out rapid changes (so impulses will not be faithfully represented in the output)


It may have 'worked', but I don't think it was actually working the way you think it was, or producing robust & repeatable measurements. There are fundamental issues with what you are trying to do:
1. A piezo device has a charge, not voltage, output, so any voltage derived from it represents the rate-of-change of force, not the actual force itself. To get a true force measurement you need a charge integrator/amplifier (as per earlier discussions), not a voltage amplifier as the first stage.
2. The output of your device is 21pC/N, i.e. a force of 100N applied for 1 second generates 2.1nA of current, which is swamped by the 10nA of input bias current for that opamp, which is also generating a 10mV static input voltage to the amplifier. You need a much better amplifier with input bias currents in pA rather than nA! Additionally, the breadboard isn't a good place for these very low charges/currents; surface contaminants, etc, can 'leak' charge and give erroneous readings.
3. The piezo device is capacitive in nature, so the voltage it generates (remember Q = CV), depends on the capacitance of the cables etc connecting it to the amplifier. The change in output voltage you measure is probably as much, or even mainly, to do with the change in capacitance of your setup and your hand movements nearby as it is to the force being applied. Use of a voltage amplifier (and integrating elsewhere, eg in software) only works reliably if it is integrated with the sensor with no loose connecting cables.

See these AAC articles, and the TI design note attached.
https://www.allaboutcircuits.com/te...charge-amplifiers-for-piezoelectric-sensor-s/
https://www.allaboutcircuits.com/te...sign-charge-amplifiers-piezoelectric-sensors/

Here are some reference examples from Analog Devices and TI; note the common theme of a charge integrator/amplifier front end; the feedback capacitor (C2, CF) and input resistor (R4, Rin) have to be selected to match the sensor - for that you need full electrical and mechanical details of the sensor.

View attachment 348114


View attachment 348115
Thank you, these are helping me a lot! I'll let you know if I have other problems but with the charge to voltage configuration the signal is perfect
 
Top