3
\$\begingroup\$

The need to implement this circuit started in this post I made.

I could get a negative voltage by buying an ICL7660 like some user suggested, but it would take two weeks for the parts to be delivered. While I wait, I am trying to implement the circuit below to get things going:

enter image description here

The permanent response is what need. To create a square wave I used an ESP32 with the following code from the Arduino IDE:

enter image description here

When digitalWrite(32,High) happens 3.3V will appear at that pin. I am generating a square wave with an amplitude of 3.3V and a period of 100 micro seconds.

Below is a picture of the ESP32 microcontroller with gnd pin and pin 32 (pin where I output the 3.3V) exposed:

enter image description here

Here is a picture of the entire circuit. There are two breadboards, ignore the circuit on the breadboard where the microcontroller is at (it's not even supplied.)

enter image description here

Here is a closer picture of the circuit:

enter image description here

This is the result:

enter image description here

I'm reading Vout voltage and all the voltmeter displays is 0V.

The voltage at Vin is 1.62V. I would say that's because the voltmeter gives me the average voltage and because the duty cycle of that square wave is 50% i get half of 3.3V (~1.62V.)

enter image description here

What am I doing wrong? I'm using 1N4148 diodes, 47nF/100nF capacitors and a 10kohm resistor . Why am I not getting any results?

\$\endgroup\$
6
  • \$\begingroup\$ In your simulation you have a frequency of 20kHz, but you say your code is pulsing at 10kHz. Which one is the intended frequency? \$\endgroup\$
    – Aaron
    Oct 10, 2022 at 18:35
  • \$\begingroup\$ What is the value of your load resistor? \$\endgroup\$
    – Aaron
    Oct 10, 2022 at 18:35
  • \$\begingroup\$ I'm using a 10kohm resistor, the LTSpice results are the target but no matter what value i put in delayMicroseconds i always get 0V at the output. \$\endgroup\$
    – Scipio
    Oct 10, 2022 at 18:38
  • \$\begingroup\$ Change C1 to 1 uF and C2 to 100 uF. Careful of the capacitors' polarities. \$\endgroup\$
    – user173271
    Oct 10, 2022 at 18:46
  • 2
    \$\begingroup\$ The load voltage will be the input waveform amplitude minus two diode drops minus a bit of droop. Use shottkey diodes for a larger output voltage. \$\endgroup\$
    – user173271
    Oct 10, 2022 at 18:49

2 Answers 2

5
\$\begingroup\$

Well, dang it. I need to get my eyes checked (again.)

You have your multimeter connected to ground. Both probes are connected to wires that go to the ESP32 ground.

  • Connect the black probe to the black ground wire.
  • Connect the red probe to the junction of R1, C2, and D4.

I'd start by using the pulse width modulation (PWM) functions of the ESP32 instead of using the delayMicroseconds functions. It will be more reliable, and your ESP32 can do other things at the same time. Check out this description of using the PWM functions. That won't necessarily help with your current problems, but it is a good thing to learn about for future projects.

The circuit in LTspice looks OK. The simulation works, so it must be right.

Your circuit on the breadboard mostly looks OK, but one capacitor (C2 in your LTspice diagram) seems to be missing the ground connection.

I'd use Schottky diodes rather than the 1N4148. The voltage drop across the diodes will be less, giving you more voltage for the charge pump. You'll get a larger negative voltage output that way.

The final thing is that I wouldn't trust the pins of the capacitors and diodes to make good contact with the breadboards. Given how thin the legs are, it would surprise me if they are making contact at all. Disconnect power from the circuit, then use the ohmmeter function on your multimeter to check for connections between all the diodes and capacitors.

\$\endgroup\$
7
  • \$\begingroup\$ C2 seems connected to ground in the diagram. \$\endgroup\$
    – Amit M
    Oct 10, 2022 at 18:58
  • \$\begingroup\$ @AmitM: It is connected in the diagram, but in the real circuit it looks like it is not connected. \$\endgroup\$
    – JRE
    Oct 10, 2022 at 18:59
  • \$\begingroup\$ C2 is connected to that orange jumper cable, that cable is connect to ground \$\endgroup\$
    – Scipio
    Oct 10, 2022 at 19:08
  • \$\begingroup\$ OK. It was hard to see in the photos. \$\endgroup\$
    – JRE
    Oct 10, 2022 at 19:08
  • 1
    \$\begingroup\$ @G0tBlackOps: This blog post gives some details about voltage multipliers. Your charge pump is a single stage voltage multiplier. Use n=1 in the equations in the blog post. \$\endgroup\$
    – JRE
    Oct 10, 2022 at 20:23
0
\$\begingroup\$

You may need a low frequency signal perhaps like 1Khz or 250 Hz. if you are just generating a voltage signal, why make it a high frequency signal? Just stick to low frequency like 250 or 500Hz. The circuit seems to be working in the simulation. Maybe the pins of capacitors or something else are not properly connected to the circuit as JRE suggested.

\$\endgroup\$
6
  • 3
    \$\begingroup\$ The high frequency is fine. It makes it possible to use low value capacitors. This thing will never put out more than a few milliamperes because the ESP32 can only deliver a few milliamperes through the GPIO pins. \$\endgroup\$
    – JRE
    Oct 10, 2022 at 19:07
  • \$\begingroup\$ I was just thinking that the voltage build up would be faster with a low frequency signal. It may not make any difference though with pF or uF capacitors. \$\endgroup\$
    – Amit M
    Oct 10, 2022 at 19:16
  • \$\begingroup\$ For a 50 percent duty cycle square wave, the energy transferred per second is pretty much the same regardless of the frequency - as long as it is considerably faster than 1Hz. What matters is the amount of current you can deliver. That depends on what the source can deliver (only milliamperes for a GPIO pin) and the impedance of the capacitors. Impedance is lower for high frequencies. At low frequencies you have to use large value capacitors to get low impedance. \$\endgroup\$
    – JRE
    Oct 10, 2022 at 19:36
  • \$\begingroup\$ "There are frequent discharges in capacitor C2" - yes, but the recharges are just as frequent. \$\endgroup\$
    – JRE
    Oct 10, 2022 at 19:39
  • \$\begingroup\$ It seems that a high frequency signal would keep the discharge slope of voltage shorter. So it would make the voltage build up seem continuous. \$\endgroup\$
    – Amit M
    Oct 10, 2022 at 19:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.