BACK_TO_LOGS

Sonar Chronicles, Part 2: Ditching TinyGo, Bucket Testing, and Ghosts in the Wires 🪣👻

By AdminJul 20th, 20263 min read

Remember my perfect plan to build a DIY fish finder using TinyGo? Well, here’s the first rule of hardware development: your beautiful software fantasies will inevitably crash into the harsh reality of bare silicon. Week two turned out to be a wild ride, forcing a complete language stack pivot and leading to my very first tests inside a basic household bucket. Here’s how it went down.

# Surrendering to C++: When the Ecosystem Wins 💻

I honestly tried to make TinyGo cooperate with my board's hardware timers. But the absolute wall of limitations for this specific esp32-generic target became a dead end. When you are building a real-time device, you can't afford to spend forever fighting an immature language toolchain.

In the end, I made the executive decision to pivot back to good old C++ and the traditional Arduino IDE.

And you know what? It was the right call. It gives you everything out of the box: seamless flashing, serial monitoring, and a massive ecosystem of libraries. Within a single evening, I had the ESP32 configured as a local Access Point broadcasting its own Wi-Fi network, and successfully streaming stable data to a quick-and-dirty companion app I spun up in React Native. Everything is flying!

# The Hardware: Epoxy, Excalidraw, and Waterproofing 📐

Once the communications link was sorted out, it was time to build the physical rig. I mapped out the schematics in Excalidraw, fired up the multimeter, and prepped the 200 kHz piezoelectric transducer disk.

The front of the disk comes natively IP67-rated from the factory, which is plenty for partial water submersion. To protect the vulnerable electrical connections on the back, I completely sealed them in a thick layer of epoxy resin. I cut a plastic tube for the housing, dropped the piezo sensor inside, packed it with foam, and capped the whole thing with more resin. If I messed up any part of this process, I’ll be buying a new transducer 😅

# The "Bucket Test" and Ghost Echoes 🪤

I assembled the receiver circuit on my breadboard using the LM324N operational amplifier, hooked up the sensor, filled a utility bucket with water, and dropped the float in. That’s when real electrical engineering hell introduced itself.

Instead of clean, distinct pulses bouncing off the bottom of the bucket, the serial monitor exploded into pure chaos. The piezo sensor is completely losing its mind, capturing a massive wall of "ghost" signals that physically shouldn't exist.

Right now, I have two prime suspects:

  1. Wi-Fi Cross-Talk: The onboard ESP32 module is screaming data packets right next to a highly sensitive analog amplifier circuit.
  2. The Antenna Effect: My breadboard currently looks like a neon spaghetti factory. Nothing is soldered down yet, and those long, unshielded jumper wires are acting as perfect antennas, sucking up every bit of ambient electromagnetic noise in the room.

# Back to Electronics 101 🎓

It turns out that this project requires way less software architecture and way more fundamental electrical engineering than I originally anticipated.

My immediate roadmap is no longer about tweaking code, WebSockets, or UI components. I am diving back into textbooks to study transistors, tune resistor values, and figure out proper signal filtering. I need to find a way to shield the analog lines from the digital Wi-Fi noise.

The software guy is officially taking a crash course in hardware hardware. Stay tuned—it’s about to get painful, but it's going to be a fun ride! 📡⚡