# Need 64Hz square wave green LED driver for a mosquito zapper

I have several 10 watt COB (Chip-on-Board) green LEDs which apparently are the best color to attract mosquitoes if driven at an ideal pulsing square wave frequency of 64 Hz.

I was going to use a transformer power supply with a half-wave rectifier but that would give me 60Hz half sine wave, not the preferable square wave.

Can anyone show me a simple circuit with off-the-shelf components that I can assemble or buy?

• even if 64 is ideal, 60 sounds a pretty good second best, and worth trying for the simplicity May 20, 2022 at 14:22
• One beginner-friendly approach would be a 555 timer set up for 64 Hz 50% duty-cycle driving a MOSFET to power the LEDs. Search for those words and you will find hundreds of examples on the web. May 20, 2022 at 14:22
• Do you have a datasheet for the LEDs? 12V sounds like they may have some circuitry on board. May 20, 2022 at 15:13
• Please provide a datasheet for your LEDs. There's some important stuff needed to figure out a solution, namely nominal voltage and current. These influence the approach taken to drive them. May 20, 2022 at 15:39
• @MissMulan That sounds like the opposite of what they want. They want square wave pulses, not smooth lighting. May 20, 2022 at 16:16

You have a few problems to solve besides making the square wave.

LED Drive

Let's talk about your LEDs for a moment. You state they are 10W COB type, nominally 12V. You didn’t provide a datasheet, but we can do some estimating anyway.

This class of high-power LED needs about 800-900mA of regulated current, with a forward voltage of about 12V for each LED COB set.

Problem is, like all LEDs, these large high-wattage COB units are current devices, and their forward voltage varies from unit to unit as well as with temperature and forward current. Because of these characteristics, you cannot connect them to a supply without current limiting, otherwise you will destroy the LEDs.

Next problem: how to drive them efficiently? The trick is to minimize IR drop losses as much as you can. One way is to connect them in series and feed them with a higher, yet current-controlled voltage.

Say you want to run 3 of these for a 30W light (that's pretty bright. is that your intention?) Connect them in series, then drive them together with a 36V LED dimmable driver rated for 800mA or so. These modules are available with a variety of voltage inputs, 9-15V boost up to 36V is common, as are supplies that work directly off AC power. I'll leave the searching and shopping up to you. Meanwell is a quality vendor for this.

Now, why dimmable? Because we will use the LED driver's dimming input to switch this thing on and off at your desired 64Hz.

Making 64 Hz

So now we get to your question: How to make 64 Hz? The NE555 timer (or even better, the LMC555 CMOS version) can do this easily. The 555 frequency is set with just a simple RC network. It can also be easily adjusted for duty cycle with the appropriate circuit - this might be worth experimenting with to reduce power consumption. Finally, the 555 can run directly off 12V, which could simplify your power supply.

Could you use a microcontroller? Sure, but why? It's definitely more work. Software, power supply, support circuits… more than is needed.

The simplest solution in my opinion is to use an Arduino board with a FET switch. Using this solution does only require minor shopping, coding skills and tools.

Recommendation: In my opinion you should opt for this solution. I did do a quick search for you.

#define pinToUse 5
#define delayToUse 1000
#define Busywait(n){while(volatile unsigned int_32t cnt = 0; cnt<n; cnt++){asm("nop");}

void setup(void){
pinMode(pinToUse ,OUTPUT);
}

void loop(void){
digitalWrite(pinToUse ,HIGH);
Busywait(delayToUse);
digitalWrite(pinToUse ,LOW);
Busywait(delayToUse);
}


Here is you code.

Here is your controller - IDE is easy to use, free an well documented

Here is your power supply providing 12V for the LEDs and 5V for the Arduino

Here is your switch. Did select a high-side as it was the cheapest

Connect like:

Image of initial schematic removed

Please be careful when handling mains wiring!

EDIT 1: As per comment from @hacktastical current limiting and balancing is needed to connect multiple LEDs in parallel. The current limiting is also required with a single LED. This can be done by using a series resistor.

U_drop = 12V - V_Led (Consult the datasheet to select the voltage drop across the diode at your desired current flow - current sets the brightness)

I_led = The active forward current you selected.

R = U_drop/I_led. Connect between High-Side switch and LED

Take care: P = U_drop x I_Led. This will waste a lot of power in heat tough - you could consider to use a 5V supply for the LEDs too - this will simplify the power supply requirements and reduce the voltage drop and therefore power loss across the resistors.

Take care: The minimum Voltage is 4V as this is required for the high-side switch module.

Huge shoutout to @hacktastical !