Home > Brew gear, Tech geeks > 2.4GHz Wireless Pump Control Skid

2.4GHz Wireless Pump Control Skid

sm20090112-001sm20090112-0041This week I reprinted my artwork and got the XBee interface board all soldered up. I also soldered in the wires to connect it to the main grant control board, and managed to get all my connectors back in the right places. When I powered up the control box, everything behaved exactly as expected, the XBee association indicator LED started blinking, and most importantly – everything back on the main skid still worked as expected.

After digging into the code and looking at the changes I needed / wanted to make, I realized that the code itself needed a pretty good overhaul. It worked fine, just like you could use a rock to open a can of beans, however it certainly was messy and inelegant. I sat down, took some much needed time to think through what I wanted it to do that it currently doesn’t, and simplified the more complicated bits of logic that read like nonsense in the original version.

skidcontrolv2This time around I make alot of use of the scratchpad registers, which allows variable reuse and simplifies the coding a good bit. This also allows me to do more complex calculations since I have more variables at my disposal. The control box PICAXE now calculates sparge and pump rates, estimates the amount of time left to get to a target volume, and several other new values. The biggest code improvement is that only updates are sent when they occur, instead of transmitting the entire variable pool once a second. This significantly reduces the amount of data sent wirelessly, and limits the processing load on the incoming application ( VB2008 ) to interpret changes.

I still need to code an inbound command interrupt routine, but I’ve tested the basic functionality and know that the control box will interrupt properly when sent a command. I drafted a list of basic commands I want it to understand – make setpoint updates (like target volume or perhaps total volume transferred), send all the current scratchpad values, enable / disable certain pieces of the code (if necessary). I am wishing more and more that I had included a socket for an I2C EEPROM chip to persistantly store values, and I may come back and hack one into the existing box using a couple of the available pads.

Advertisements
Categories: Brew gear, Tech geeks
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: