A Frequency Generator For Not A Lot

There are many ways to generate a square wave, and given the availability of phase-locked-loop-based clock generator chips, it’s easy enough to do so from a microcontroller. But the microcontroller can be persuaded to make a square wave on its own, and and this is what [Alun Morris] has done with his Mega Hurts frequency generator. It’s a pocket square wave signal generator, powered from a USB-C socket.

At its heart is the inexpensive CH32V203F6P6 microcontroller mounted on a small dev board in a 3D printed case. There’s an OLED display and a rotary encoder to provide a user interface. The maximum frequency achievable is 30 MHz, with variable duty cycle. The generation is achieved using the chip’s 16-bit timer operating as a PWM peripheral, and the output reaches the world through a BNC socket. We can see it could be a useful little instrument, even if it’s limited to square waves alone.

We quite like the very simple prototyping technique used here, dead-bugging SMD parts without the need for a custom PCB. IT proves that sometimes, just going ahead and making the thing with what you have is the way forward.

One thought on “A Frequency Generator For Not A Lot”

  1. Nice project. I personally would just use an OpAmp for an inverting Schmitt-Trigger circuit and use a feedback pot and an offset voltage divider to change frequency and duty cycle.

    This one is more flexible and has the advantage of the nice display. Otherwise I’d have to either play by ear or hook up an external frequency counter to it. I’ll keep this one bookmarked!

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.