DIY Frequency Generator + Reader Toolkit (ESP8266 + OLED + 3D Printed Case)
by arhamsameel3 in Circuits > Electronics
219 Views, 3 Favorites, 0 Comments
DIY Frequency Generator + Reader Toolkit (ESP8266 + OLED + 3D Printed Case)

This is a small frequency generator + reader toolkit I built using an ESP8266 NodeMCU, OLED screen, and 6 tactile push buttons — all fitted inside a compact 3D printed enclosure.
It can generate square wave signals from 1Hz to 10kHz if you change 10000 variable in code to 50000 you get 50khz above 50khz is not recommented , and also read the frequency of an incoming signal. The OLED display shows live updates of frequency, mode, sweep, and output status.
It’s designed for learning, quick waveform testing, and low-voltage applications. I'm calling this Version 1 — still testing and improving!
Supplies

NodeMCU ESP8266 (any version)
0.96” OLED display (I2C)
6 × Tactile push buttons (6×6mm)
1kΩ resistor
3.3V Zener diode
Male headers (optional)
Jumper wires
Breadboard or perfboard
PLA filament (for 3D printing)
M2 screws (for enclosure assembly)
Soldering iron + solder
3D printer (or a friend’s printer )
i didnt add the reader protection circuit here but you can make it its for protection to your rx pin
Designing the Enclosure (Fusion 360)

I created a 3D printable enclosure with:
- Front panel: OLED display + 6 button cutouts
- Back panel: screw-on cover
- Wall thickness: 1.5mm
I used Fusion 360 for this. To save time, I was inspired by a great design by Depronized on Cults3D, but modified the layout for my version (no switch, added screw mounts, and slightly adjusted spacing).
((( STL files are in the Files section if you want to print your own! )))
Note: if your esp not fit in just break the pillers and just make hole and screw the esp
Wiring and Circuit

OLED (I2C)
- SDA → GPIO0 (D3)
- SCL → GPIO2 (D4)
Buttons:
FunctionGPIO
Mode: D2 (GPIO4)
Up: D1 (GPIO5)
Down: D5 (GPIO14)
Step: D0 (GPIO16)
Sweep Toggle: D6 (GPIO12)
Output Toggle: D7 (GPIO13)
note : you have to connect a 1k resister from D0 to 3.3V for pull up its importent to change step
All buttons use INPUT_PULLUP, so connect one leg to GND.
Output Signal:
- D8 (GPIO15) → Output Signal (to scope, circuit, etc.)
Input Frequency (for reading mode):
(( circuit in pinned file ))
The resistor + zener protects GPIO from high-voltage inputs.
Upload the Code
Upload the provided .ino file using Arduino IDE.
Libraries required:
- Adafruit GFX
- Adafruit SSD1306
Use NodeMCU 1.0 (ESP-12E Module) board in Tools > Board.
Connect via USB and flash.
Downloads
Button Features
ButtonAction
Mode : Switch between Frequency Generator, Frequency Reader, and Tone Generator
Up/Down : Increase/Decrease frequency or switch notes
Step : Change frequency step: 1Hz → 10Hz → 100Hz
Sweep : Enable sweep mode (automatically cycles frequency)
Output : Toggle signal output ON/OFF
Testing & Final Assembly
- Power the device with 5V micro-USB.
- Connect an LED to OUTPUT to see it blink below 10Hz. ( i used a buzzer )
- Use an oscilloscope or logic analyzer to verify signal shape and frequency.
- Use a signal generator to test Reader mode.
Then place the board + buttons + screen into the enclosure. Screw the case closed. You're done!
Pics of Product



Conclusion
This was a fun beginner-friendly project that combines embedded programming, electronics, 3D design, and basic signal processing. It’s not perfect — just Version 1, but it works reliably for generating test frequencies and reading square wave signals.
Let me know if you have ideas to improve the design or want a PCB version!
and if you have any queries just email me : arhamsameel3@gmail.com
Tags
#esp8266, #frequencygenerator, #signalgenerator, #diyoscilloscope, #3d printing, #makerproject, #electronicstoolkit, #arduino, #fusion360