# Designing a square wave circuit

I require assistance in designing a circuit for driving LCD ND filters. These filters necessitate a 1000 Hz square wave with a variable voltage ranging from 0-20 V (-10 to +10 volts). I would prefer the circuit to have a compact size and be powered by a battery.

I've previously constructed a similar circuit using a 555 timer and a CD4069UBE inverter. However, this setup struggles to handle the load and exhibits flickering issues.

Could someone kindly provide me with guidance?

My initial plan was to utilize an Arduino Nano for generating the waveform and an LM741 to amplify the voltage. Nevertheless, the components aren't behaving as intended, leading me to a standstill.

• How much current does your load require? Commented Aug 7, 2023 at 12:12
• Welcome! How much output current do you need? Both LM741 and 555 are not what you would call battery-friendly in 2023. There should be several MOSFET drivers you could (ab)use as is unless your current requirements are too high. Commented Aug 7, 2023 at 12:12
• Mandatory read: electronics.stackexchange.com/questions/304521/… Commented Aug 7, 2023 at 12:13
• @winny There should be a second one for the 555 timer.
– pipe
Commented Aug 7, 2023 at 13:34
• @pipe this one? Commented Aug 8, 2023 at 8:11

Using a microcontroller to generate the square wave is pretty much a standard method for driving LCDs. Some microcontrollers have all the circuitry needed to drive your LCD integrated, including the generation of a higher voltage from battery. If you choose one of these, you're done (and can stop reading here).

Most microcontrollers have a (deep) sleep mode where the PWM unit continues to work, so that you really only spend the energy needed to drive the "step-up" stage. Most microcontrollers' PWM units also have the means to directly drive an H-bridge (namely, they can output a square wave and its inverse, with an adjustable dead time to avoid accidental shorts). That's really all you need. An H-bridge is 4 transistors, typically 2 N-channel and 2 P-channel MOSFETs, but can also be bought as IC (which solves the high-side switch problem).

As step-up, you would usually avoid having to deal with a +- 10 V dual supply – instead, just use a single 20 V supply, as your LCD filter has no notion of what "0V" is, that's physically just identical.

Since LCDs typically consume very little current, a typical way of creating such a higher voltage from a lower (say, 3.7 V) battery voltage is a charge pump. When you go to the websites of the larger chip manufacturers (TI, diodes, ST, NXP, Microchip…), you'll find some dedicated chips that implement such charge pumps in a regulated fashion.

You can also use a PWM unit (not necessarily the same – most microcontrollers have multiple of these) as the square wave input to a Cockcroft-Walton voltage multiplier to generate your 20V. That's probably a bit less efficient than using a dedicated IC for it.

In any case: A (BJT) 555 IC and a 741 Opamp are obsolete, power-hungry technology and probably are going to be the source of more problems than they solve.

• Sounds like you have the perfect knowledge of this, do you mind help me with a cricut to achieve this? So the output voltage can be controlled with a trimpot? (A) I would really appreciate that Commented Aug 8, 2023 at 7:34