PDA

View Full Version : Amateur radio repeater voltage monitor



pictographer
09-16-2013, 03:24 AM
Just finished my Morse code voltage monitor! It's intended to help a friend maintain an amateur radio repeater by letting him know the state of the radio's battery.

Documentation, photos, schematics, and code are available at http://pictographer.com/didah

I'm very interested in feedback. I'm new to circuit design and somewhat new to embedded development. The ADC gave me fits, but eventually with some serious filtering I was able to get a stable reading from it. I think there might be some code worth stealing if anyone needs to create command line interfaces or work with Morse code. I'd like to know how to make the circuit (and everything else) better.

Eventually, I'd like to incorporate ideas/code from the projects here to build data loggers, especially improving the ADC and reducing the power consumption. I'd like to have a circuit board made next time.

I'm very grateful for the T3, Paul's help, and this community.
933934

Derangedgamer123
09-24-2013, 07:36 PM
This is amazing you also are not using the AVR port are you? Also are you using the arduino.h?

pictographer
09-25-2013, 02:57 PM
Didah does use Arduino.h, digitalRead(), analogWrite(), etc. Most of the AVR/Arduino stuff is collected in a single file and my code doesn't use interrupts (not directly anyway), so it would be easy to replace the AVR stuff, but why? Arduino has three parts: a library, a very simple template that replaces the classic C/C++ main(), and a light-weight IDE.

Paul's AVR/Arduino library is handy for this application. I don't see any advantage in trying to do better than his very expert code.

The Arduino (or Processing) setup() and loop() functions are harmless. Sure I could write my own main() but such a tiny bit of syntactic sugar really doesn't matter after you've written a few programs. And if it makes this code more inviting to a new programmer, that would be great.

A full-featured IDE would be nice, but I've used Emacs for so long I've got most of what I need there. When I needed to reorganize the code, I ran it through Doxygen to get call graphs. It's 5000 source lines. Not much code. Not hard to navigate or reorganize. Maybe at some point I'll install Eclipse. It's definitely nice when it works, but a pain to setup.

Derangedgamer123
09-25-2013, 03:31 PM
I just didnt see them is all I have no issues with anyone using the code Paul created I just thought I noticed something off (because I didnt see the relations to arduino.h)

I like what you have done! Keep up the great work :-)