MaplePi - Making Maple Syrup Using A RaspberryPi and OpenWRT

Well its been a little while since I got my creative juices flowing, but here is an interesting little concept that will be replacing an ancient solenoid controller in the sugar shack. So what is it and what does it do?

This little computer is running Linux (OpenWRT actually) to control an electric solenoid through a relay that is activated when the boiling maple syrup reaches a user-set temperature threshold (~219.20f default). The idea is that once you have manually determined what temperature produces the correct consistency of syrup, you can now automate the valve on the boilers to pour out the "cooked" syrup. When the temperature goes down because of the addition of new maple water, the solenoid closes. Simple right?

The device isn't entirely complete - GPIO for buttons is too slow (you have to hold them down). Later revisions, I suspect will be able to determine the correct consistency of the syrup using humidity and conductivity data.

What parts are required?

Here is my shopping list:

Maple-Pi Pinout

The General Concept

Pre-built image

A pre-built image is available here and is ready to be dd'd onto your sd card if you use the same pin-outs as my setup.

wget <a href="http://www.pacificsimplicity.ca/sites/default/files/uploads/openwrt-brcm2708-sdcard-vfat-ext4.img_.tar_0.gz
tar">http://www.pacificsimplicity.ca/sites/default/files/uploads/openwrt-brcm...</a> -xzvf openwrt-brcm2708-sdcard-vfat-ext4.img.tar.gz
<insert your SD card & verify using dmesg from the cmd>
sudo dd if=openwrt-brcm2708-sdcard-vfat-ext4.img of=/dev/whateverIdentifiesYOURSD bs=2M conv=fsync,noerror

Modifying or creating your Own Maple-Pi

Install the following pre-req software:

sudo apt-get install build-essential asciidoc binutils bzip2 gawk gettext \
git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 \
subversion flex mercurial automake

Checkout Openwrt

svn co svn://svn.openwrt.org/openwrt/trunk/ ~/openwrt

Enter the openwrt directory feeds.conf.default file and edit it as follows:

src-git packages <a href="https://github.com/openwrt/packages.git
#src-git">https://github.com/openwrt/packages.git
#src-git</a> luci <a href="https://github.com/openwrt/luci.git
#src-git">https://github.com/openwrt/luci.git
#src-git</a> routing <a href="https://github.com/openwrt-routing/packages.git
#src-git">https://github.com/openwrt-routing/packages.git
#src-git</a> telephony <a href="http://git.openwrt.org/feed/telephony.git
#src-git">http://git.openwrt.org/feed/telephony.git
#src-git</a> management <a href="https://github.com/openwrt-management/packages.git
#src-git">https://github.com/openwrt-management/packages.git
#src-git</a> oldpackages <a href="http://git.openwrt.org/packages.git
#src-svn">http://git.openwrt.org/packages.git
#src-svn</a> xwrt <a href="http://x-wrt.googlecode.com/svn/trunk/package
#src-svn">http://x-wrt.googlecode.com/svn/trunk/package
#src-svn</a> phone svn://svn.openwrt.org/openwrt/feeds/phone
#src-svn efl svn://svn.openwrt.org/openwrt/feeds/efl
#src-svn xorg svn://svn.openwrt.org/openwrt/feeds/xorg
#src-svn desktop svn://svn.openwrt.org/openwrt/feeds/desktop
#src-svn xfce svn://svn.openwrt.org/openwrt/feeds/xfce
#src-svn lxde svn://svn.openwrt.org/openwrt/feeds/lxde
#src-link custom /usr/src/openwrt/custom-feed
src-svn nonatom <a href="http://svn.code.sf.net/p/atomproducts/svn/trunk/feeds/non-atom
src-svn">http://svn.code.sf.net/p/atomproducts/svn/trunk/feeds/non-atom
src-svn</a> atom <a href="http://svn.code.sf.net/p/atomproducts/svn/trunk/feeds/atom

">http://svn.code.sf.net/p/atomproducts/svn/trunk/feeds/atom[/geshifilter-...

Now update feeds of openwrt:

./scripts/feeds update -a
./scripts/feeds install -a

Checkout the config folder which can be used by openwrt:

svn co svn://svn.code.sf.net/p/atomproducts/svn/trunk/configs configs

Now copy one of the configuration files as so:

cp configs/MaplePI .config

At this point, menuconfig can be ran OR the config file con be used

make menuconfig

OR

make -j<numberOfPhysicalCores+1> V=99

*Note: If there is an error, remove the -j flag to find the error

To install the image onto a micro-SD card, use the command:

sudo dd if=bin/brcm2708/openwrt-brcm2708-sdcard-vfat-ext4.img of=/dev/mmcblk0 bs=2M conv=fsync