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?

  • 4
    \$\begingroup\$ even if 64 is ideal, 60 sounds a pretty good second best, and worth trying for the simplicity \$\endgroup\$
    – Neil_UK
    May 20, 2022 at 14:22
  • 9
    \$\begingroup\$ 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. \$\endgroup\$ May 20, 2022 at 14:22
  • 4
    \$\begingroup\$ Do you have a datasheet for the LEDs? 12V sounds like they may have some circuitry on board. \$\endgroup\$ May 20, 2022 at 15:13
  • 2
    \$\begingroup\$ 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. \$\endgroup\$ May 20, 2022 at 15:39
  • 5
    \$\begingroup\$ @MissMulan That sounds like the opposite of what they want. They want square wave pulses, not smooth lighting. \$\endgroup\$ May 20, 2022 at 16:16

2 Answers 2


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);
  digitalWrite(pinToUse ,LOW);

Here is you code.

Here is your Arduino quick-start

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 !

EDIT 2: Did change the schematic to adapt the suggestions received.

Schematic Rev2

  • 4
    \$\begingroup\$ The two secondary circuits need to share a common ground. Also, the AC needs to be rectified for both, and regulated for the Arduino. \$\endgroup\$ May 20, 2022 at 16:07
  • 3
    \$\begingroup\$ No power supply shows up in your schematic. That is why I mentioned it. \$\endgroup\$ May 20, 2022 at 16:13
  • 2
    \$\begingroup\$ Lots of issues here. Current limiting? Enough drive for multiple 10W FETs (about 800mA each)? The fact that a p-JFET needs its gate biased above source? Please revisit. \$\endgroup\$ May 20, 2022 at 16:53
  • 4
    \$\begingroup\$ J271 is an obsolete JFET capable of -6mA. \$\endgroup\$ May 20, 2022 at 16:56
  • 3
    \$\begingroup\$ @ElectronicsStudent If your intention was to show a high-side load control switch, then draw it as a box. In the big picture, you're getting a lot of negative feedback here from some very experienced people. That should be a pretty strong indication that your answer needs work. \$\endgroup\$ May 20, 2022 at 17:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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