The Blog

MacroDuino Webapp Updates

The latest update for the MacroDuino webapp fixes a couple things and adds support to control pcf8574 pins. When I first made the webapp it was more of a proof of concept and didn't really look or function all that great. I'm starting to do a complete UI overhaul to the app and the first change was in the control of outputs.

The digital control link has been replaced with a link that says control. This page allows you to add pins that you want to control (along with a name to help you remember what it does). This single interface allows you to control either digital or pcf8574 outputs.

If you need to change a digital pin to an output that has been moved to the settings page.

Here's the video you've been waiting for which demos the webapp controlling an arduino.

8/11/2011 Newsletter

I have some more exciting news regarding the aquarium controller. I've started a new build and will be documenting the entire process (with videos). The tank was setup a couple days ago and I've got the heater hooked up and temperature controlled.

I've re-written the aquarium controller page so you can more easily follow any updates:

http://www.practicalmaker.com/projects/arduarium-controller

As each function gets completed I'll be posting a writeup so you can implement that function yourself. Check out the 'Control heater on/off based on temperature (writeup here)' for an example.

The MacroDuino code also received an important update which added support for pcf8574's. This means you can use a port expander shield and add up to 64 additional digital pins that can be controlled.

The pcf8574 code is also tightly integrated with the macros. What this means is that any macro that you use can use pcf8574's as outputs which greatly increases the capability of the controller.

The road ahead includes some very interesting things. The webapp is going to be updated to be a bit more user friendly. What's up right now was a bit more than a proof of concept and over the next few weeks I hope to get it updated to a final fully functional version (including new macroduino functions).

In addition to that, the MacroDuino code is going to be getting some more updates as well. The biggest one will be the ability to store macros on an SD card. I haven't started on this yet, but hope it will be easy to implement. If I can it means that the number of macros you can store will be way more than you'd ever need.

If I can get the macros stored on an SD card than I'll be decreasing the number of macros stored in eeprom and using that freed space to store data such as ATO last run time and other logged data that could be displayed on an lcd.

I think that's pretty much everything. It'll be really fun to see the new tank take shape (lots of pictures I promise).

MacroDuino + DS18B20 + Relay

One of the first steps in setting up an aquarium or aquaponics system is proper control of the water temperature. Using a couple shields, a relay and a ds18b20 temperature sensor you can be up and running in less than 15 minutes. In the following video I show you exactly how to hook everything up.

*update* I must've been a little tired when I shot the video. You can do a continuity test from the small side of the plug which is the hot side and use that. Don't get electrocuted doing it the way I did!*

A couple notes:

  • In the macro pcf8574_device #0 is the one with all the pins grounded. Look in the sketch to figure out which address yours is (they're an array of addresses)
  • If you want to use celsius change #define CELSIUS to 1
  • Make sure you have the latest code (link on the project page)
  • Make sure you've enabled relevant parts of the code (the #define statements in MacroDuino.pde). Ones you should enable are: SERIALINTERFACEON, ONEWIREENABLED, DS18B20ENABLED, PCF8574ENABLED, MACROSENABLED. To enable them just change them to a 1 instead of 0.

MacroDuino Commands:

Run them in this order

  • 13 (discover 1wire devices)
  • 15/0 (verify it's the probe you want to use)
  • 5/TEMP/4/0/1/81/75/254/1/0/0 (if temp is less than 81.75 turn pcf8574 device 0 to on... check docs for full explanation)
  • 5/TEMP/4/0/2/81/75/254/0/0/0 (if temp is greater than 81.75 turn pcf8574 device 0 to off... check docs for full detail)

This is the first practical application of the MacroDuino code and I really think it lives up to what it was supposed to do... no coding, but still able to configure it to do useful things. The recent code update leaves 1kb of free space with everything enabled so there's quite a bit that can still be done. Of course, I'll continue optimizing the code so hopefully I can free up a couple more kb of space (weather and moon cycle here we come!).

Here's the video:

MacroDuino Code Update - PCF8574 Support

The MacroDuino just received it's first major code update. This update brings space reduction as well as macro support for PCF8574's (which are used on the port expander shield). Currently the macro's that support the PCF8574 as outputs are digital, analog and ds18b20 with support for RTC macros coming soon. Here's a quick video showing you how everything is working.

New 25G Build Step-By-Step

There's lots of good news happening at Practical Maker! We moved to a new server this week which will help with our growing pains. Hopefully everything will be a bit faster now. It's been quiet post wise on the website because I've been working on getting everything together for a new tank build where I can document everything from initian setup all the way to a fully automated tank that reports to pachube and is controlled via a web interface.

I actually haven't had a tank for the past 8 months (we moved). The old 75 gallon one was simply too much of a pain to move so I had to get rid of it. I spent quite a bit of time trying to figure out a setup that will be somewhat easy to move again (because we'll be getting a house sometime in the future). I settled on a 25 gallon tall tank (same dimensions as a 20 gallon, but taller).

As of this moment nothing has been done in the way of automation which means you'll get to see how everything is done. All that's setup right now is the sump, circulation system and it's been filled with water (3 days for the RO filter!).

You can checkout a little video I made where I discuss my plans and you can see that there's really nothing hooked up yet here:

I've also figured out a way for anybody wanting to follow progress to do so easily. I'll be tagging posts with 25 gallon build and clicking on the link will list all the posts tagged with that. I'm actually going to be doing this with all the posts from now on so it's going to be much easier to find the information you're looking for.

Next steps with the tank are to get some live rock into it and hookup the heater to the controller. That video should be going up tomorrow. In it I'll show you how to hook up the temperature sensor, how to wire the relay and how to setup the macro.

MacroDuino + Pachube Demo 1

Success! What I thought was going to take a couple days to implement got done in 6 hours! You can now use the MacroDuino code and talk with pachube (with ~300 bytes to spare).

Originally I had said that I wanted to have zero programming required to run this... I lied. You do have to do a little programming (a couple lines is all) in order to setup your pachube feed, but I'll be doing a write and videos showing you how to set that up.

You can send the following data to pachube: digitalRead, analogRead, pH and temperature readings. There's also a very cool unintended (seriously) side effect.

I didn't know that pachube had triggers that can act on data received. Since the MacroDuino code does work online (dyndns + forward a port on your router to your arduino port 80) you can actually use pachube triggers. This opens up a whole new can of worms in terms of what you can do.

A couple examples:

Lets say you run out of macros. You can store mission critical macros on the arduino (ie. controlling pH) and use pachube triggers for less mission critical ones. You could even not use macros and just use pachube triggers (if you trust your internet connection enough... I don't).

Let's say you want to be notified when values go out of range. I'm hoping to setup a url that will send an email or text to you if values go outside your specified range.

Update: apparently already possible... check this out

The possibilites are endless.

I've put together a small video demonstrating how everything is working and how easy it is to setup. Remember that you'll need the latest code (which you can find here at the bottom of the page)

MacroDuino Webapp Demo 2

The second demo of the MacroDuino webapp is here. Among the improvements are: naming macros instead of numbers, ability to list and delete macros. Another big plus is that this will also work over the internet! (you'll need to forward a port on your router to port 80 of the arduino. All in all an excellent update that I'm thinking will become version 1.0. Here's the video of the webapp:

MacroDuino Ethernet & Webapp Demp

Apologies for not posting too much up on the website lately, but I've been finishing up the MacroDuino code. There's some pretty cool stuff featured in the video.

I can't believe how long this took to make! I guess I was a little naive to think I would be able to finish something that would work with multiple communication interfaces (serial, ethernet etc.) reliably in 2 weeks. That being said, 6 rewrites and an untold number of hours later a beautful piece of code has emerged.

What we have now is a piece of code that is dynamic. By simply changing a couple values in the sketch you can enable and disable different parts of the code. The idea here is to build 'drivers' (closest thing I can think of) that will drive different devices that you hook up to your arduino. Want to drive an ethernet shield + some ds18b20 temp sensors? No problem, just enable those modules and upload. The beauty is that I can eventually support a ton of devices and enabling them all would make the code more than 30kb, but you disable everything except for what you're using and the sketch magically fits (provided you don't enable too much).

You can find the MacroDuino Docs here and you can find the webapp here.

For those of us who hate typing commands in a serial terminal (which I do) I've designed a neat little webapp. There's a really long description of all the functions it has in the video (it's really cool). Although there is only support for ethernet (official shield) right now, I plan on adding in support for other ethernet shields as well as things like wifi and even GSM (remote monitoring and on the fly setup anyone?).

The video does a much better job of showcasing the capabilities than I can here so I suggest you watch it fully. I will however, hint at some ideas I've had in the past couple of days.

I mentioned earlier that I really want to support more interfaces like wifi, GSM and even XBEE's. The nice thing is integrating these is going to be a piece of cake (<50 lines of code). As money permits I will add support for these in.

The other thing that is missing is data logging. I know pachtube and twitter support would be awesome and I plan on adding it in and letting you configure it via the webapp (or whatever interface you choose). For me, pachtube support would be the missing link. You could have the arduino log data and access it via the webapp and do whatever you want with it!

I guess that's enough torture for now. Below is the video of the MacroDuino code and webapp in action. Enjoy! Let me know what you think!

 

Arduino MacroDuino Webapp Demo 1

The ethernet interface for the MacroDuino code is coming to life! I've made a small little demo video showing the webapp (which is hosted on my iphone) controlling the arduino over the local network. Eventually, remote access (read only I think) is going to be added. It's a great proof of concept and demos what you can expect to see as the code progresses.

For those wanting to see the webapp point your browser to http://practicalmaker.com/app/macroduino. It won't do much for you yet, but in a couple of days you should be able to use it (webkit browsers only for now).

Here's the video:

MacroDuino Code, Github

Who would have thought that there is so much work involved with making code more manageable? For quite some time now I've been wanting to put all the sketches and code that I've done up on github. This will make it much more accessible and easier for me to manage. Plus, in the future if there are interested developers they could be given access to commit changes.

Well, today that's a reality. I've moved over the MacroDuino code over to GitHub (check it out here). This means that instead of me needing to upload new versions of everything (which I'm not good at keeping up with, you can simply check the repository to see if there are any updates. I think this will make pushing out new code to you guys that much easier.

As for the MacroDuino code, I've got a wonderful update. After taking a couple days to figure out exactly how to implement it I was alerted in my RSS reader about a neat project called RESTduino. It seemed like a perfect base to start the ethernet controller interface. With this code I should be able to get a webapp up and running to be able to demo to you guys shortly. The nice part is you'll be able to download it as soon as I'm done from github!

There are a couple other updates as well. There will most likely be an AC board available sometime this month. It will be I2C based. To start I'm thinking of offering two varieties: a mechanical version and (possibly) an SSR version. The problem with the SSR version from what I read is that it's not that great for very low power loads as they 'stick' on.

I'm just about finished designing the enclosure (which will be available as a download you can get made at ponoko) for the Arduarium Controller. There are a couple bugs that need to be ironed out first (ie. how to hold it together).