Close

3. Finalizing the hardware

A project log for StrobeTuner

My version of the most accurate musical tuner idea.

eletraxeletrax 06/14/2016 at 14:140 Comments

Having settled on the motor and LED controlling circuits, we need to add some form of user interface. Hacker community popularized the PCD8544 LCDs as a cheap, readable display, perfect where HD44780 LCDs are just too limited, and small size is a nice benefit. To make things even better, lots of excellent libraries have been written for it, it takes 3.3V logic and power - same as STM32s, and Chinese sellers offer ready-made modules with built-in backlight LEDs for very good prices on eBay. We're going to need some controls for pitch being tuned - I chose a potentiometer, which will be read with STM32's ADC. It provides a simple, intuitive control. Another potentiometer will be used to control pitch offset in cents. Three pushbuttons will complete the UI part, allowing us to implement some menus in a simple, up/down/select fashion.

As the brains of the project, STM32F103C8 is just what the doctor ordered: It's fast (72MHz, 32 bit) so it will easily churn out the exact tone frequencies. It has lots of peripherals, out of which we need:

- 3 PWM channels for motor control

- 1 PWM channel for backlight control

- 2 ADC channels for potentiometer readout

- 1 SPI for LCD

- .. And a few GPIO's.

The microcontroller will be clocked from a 12MHz crystal, to function as an accurate frequency reference.

The power supply section is very simple, it consists of a rectifier/filter and a pair of voltage regulators, providing +12V and +3.3V for all the circuitry.

Discussions