Tag Archives: hb9tko

Beacon Keyer

This is likely the first ham radio related project that I document here on this blog. But my very first PIC project was a beacon keyer that I made for my father, HB9BBD. That was was in 2013. A beacon keyer is a great project to get started with microcontrollers since it’s not much more than a fancy way of blinking an LED.

At that time I didn’t even use Eagle yet and so the layouts were based on a software called Sprint Layout. These were all very simple circuits, all based on a PIC16F688, and therefore perfectly suited for making some of my first homemade PCBs as well. The very early versions like the one in the picture above even used the DIP version of the PIC in a socket. All the resistors and capacitors are 1206 size not 0805 like of my later designs.

In fall last year, HB9MPU asked me if I could make some keyers for his new 10GHz beacon. That was a great oportunity to design a new one from scratch and this is what this post is about.


These were the requirements:
– 12V operation
– Open drain outputs, i.e. a transistor to ground
– 2 outputs, one of them inverted


I decided to use a PIC16F18325 this time. Like the 688 it is a 14-pin PIC but a much more recent addition to the PIC16 family. It’s fully featured with I2C, remappable pins, an onboard voltage reference, plenty of timers and a whole bunch of other features. And it’s widely available a very low price. So I tend to use this PIC whenever I need a low pin count micro somewhere. Like for my fan controller.


Instead of using discrete transistors and protection diodes I’ve used a Texas TPL7407. That’s a 7-channel low-side driver, basically 7 mosfets to ground together with an on-board voltage regulator for the gate voltage and protection diodes all in a SOIC16 package. It sinks up to 600mA (with a maximum of 2A total) per channel and operates from 8.5 to 40 volts. Perfect to drive relays, small motors, powerful diodes or just about anything else that doesn’t require that much current. Some of you may be familiar with the ULN2003 which does the same thing but using bipolar transistors (as darlington pairs) instead of mosfets.

Power supply

The power supply is based on a Texas LM2931, basically a rugged LM7805 that operates all the way up to 26 volts and survives up to plus/minus 50V. While the LM2931 is reverse polarity protected, the diodes in the TPL7407 will short any negative input voltage to ground which is obviously a bad idea. I’ve added a 60V, 2A schottky diode at the input so the device is truely reverse protected. Minimum operating voltage of the TPL7407 (after a diode drop)  and maximum operating voltage of the LM2931 result in an input voltage range of the final device of 9 to 26 volts.

Speed control

There’s a small pot on the board that lets you control the speed of the keyer. The PIC measures the wiper voltage with its built-in 10-bit ADC and sets its speed accordingly.

Fan output

As mentioned, the TPL7407 has 7 channels but I only really needed two for the beacon keyer outputs, one normal and the other one inverted. The PIC also has an on-board voltage reference module and a temperature sensor so I decided to use all that functionality to add a fan controller. Beacons often have fans that run constantly even when there’s absolutely no need for cooling such as in winter which only wears out the fan’s bearings.

So the pic also measures the temperature and turns the fan output on and off according to software-defined threshold temperatures. Since the PIC’s temperature module is rather inacurate I’ve added an inexpensive but much more accurate LMT86 analog temperature sensor.

I’ve used 4 TPL7407 channels for the fan output so the current is limited by the total allowable current of 2 amps. Of course, you can also use this output to control a relay and use, for example, a 230V fan.

There are also 3 LEDs on the board so you can immediately see what’s going on.  And just in case you care, the board measures 45x45mm.

As always, programming is done with a PicKit3 or similar via a 100mil in-circuit programming header.

That’s pretty much all that is to say about this little device. As always, I appreciate any feedback and let me know if you need one of these.

And as always, everything from Eagle files to firmware is on Github: