Laguna Lathe + Propeller + Raspberry Pi Zero W = Gauge that displays river velocity in knots.

JohnR2010JohnR2010 Posts: 405
edited January 4 in Propeller 1 Vote Up0Vote Down
Just before Christmas I got my latest run of PCBs from Bay Area Circuits and thought I would share with the forum. The PCB uses a battery powered propeller to control a small automotive stepper. This allows me to put the PCB (gauge clock works) inside a custom gauge that can sit on a desk or hang on a wall. No wall-wart or external power required! The gauge’s clock works consist of a Propeller (P8X32A-Q44 microcontroller), a TB6612FNGSSOP motor driver, a TSOP38233 infrared receiver, and a small automotive stepper all soldered to one side. On the other side of the PCB you will find a 3 AAA battery pack, a LED, and a few headers.


I use two infrared LEDs to send commands to the Propeller from a Raspberry Pi Zero W. The Raspberry Pi is running a Node.JS application that pulls data from the Internet and converts it to a 32-bit packet to be sent to a gauge. Each gauge type has a unique address, so one Raspberry Pi can drive several gauges. The PCB for the Pi is the exact size of the expansion header, so it simply plugs into the top and fits with most cases.


Here is what a few finished gauges look like.


I created these on my Laguna lathe from a walnut tree the boys and I found on our farm. I have a long way to go on my woodworking skills, but it is pretty rewarding to stick a Propeller in a hunk of wood and have it look like this.

I appreciate the help and encouragement I have received in this forum. These posts from last year helped a great deal!
6211 x 3010 - 2M
5655 x 2175 - 1M
3688 x 2583 - 851K
3820 x 2968 - 811K


  • 8 Comments sorted by Date Added Votes
  • Wow! Those are pretty. Congrats for a project well-executed!

    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • Love the "old meets new" of this. Well done

    How long do they run on batteries for?
  • JohnR2010JohnR2010 Posts: 405
    edited January 5 Vote Up0Vote Down
    Tubular wrote: »
    How long do they run on batteries for?

    Depends on the data being displayed. For data like river level that changes very little over the course of a day I'm calculating between 1.5 to 2 years run time. Let me back that up with some data: My bench meter can record the current every .2 seconds and log it to a CSV file on my lab computer. Here are the results from one of my tests pulled into excel and graphed.


    The large spikes are the current for moving the stepper, the further the stepper moves the bigger the spike. The small spikes that appear at a regular interval are the propeller waking up from a pin sleep, starting a cog, and firing up the IR receiver circuit to wait for a command. The current profile looks like this:
    Stepper move = ~35mA
    Propeller awake and waiting for IR command = ~365uA
    Propeller sleeping, and IR and Stepper circuits shut down = ~10uA
    The Propeller is running at 20kHz and that is a big part of this current profile. It also operates on a sleep cycle that has it wait up to 1 minute for IR data and then sleeps 5 minutes before repeating. If no data is received it goes back to sleep. If data is received it fires up the stepper cog, moves the stepper needle and then goes to sleep.
    The average current usage of all this over a week is running around 73uA. To find the run time I take that 73uA and divide it into the ampere hours of my battery bank. The 3AAA battery I’m using has a 1250mA hour rating. 1.250 / .000073 = 17,123 hours that = 713 days or 1.95 years. I know I have over simplified this, but my goal was to get a year run time and I think I’m going to make that.

    2375 x 712 - 133K
  • Wow! Those are pretty. Congrats for a project well-executed!


    Thanks Phil and thanks again for all the help!!
  • Your AAA's are presumably alkaline for the low self-discharge rate?
  • JohnR2010,

    Your woodwork doesn't look all that bad and no one is normally going to see the inside.

    How are you or did you calibrate these?
  • JohnR2010JohnR2010 Posts: 405
    edited January 6 Vote Up0Vote Down
    Genetix wrote: »

    How are you or did you calibrate these?

    Yep I have a calibration table for each gauge face and store the information in a JSON file on the Pi. Here is what the file looks like for the Grafton Flow and Velocity gauge. By storing the calibration settings in a lookup table, I can have a nonlinear gauge like I did for the Grafton River velocity. The JSON file also holds the gauge's address, name, and some data keys I use to lookup the data on the Internet. So if I want to add a new gauge I just have to add its configuration settings to the JSON file.
    "Grafton Flo":{
                "CalibrationTable": [[0,0],[20000,15],[620000,614]],
    "Grafton Vel":{
                "CalibrationTable": [[0,15],[1,178],[2,339],[3,499],[6,618]],
  • Mark_T wrote: »
    Your AAA's are presumably alkaline for the low self-discharge rate?
    The AAA batteries I have been testing with are Energizer's Lithium/Iron Disulfide (Li/FeS2) with a 20 year shelf life.
Sign In or Register to comment.