Tag Archives

2 Articles

ArduinOil update…

Posted on

It has been a few months, and I’ve had a few other projects come and go in the meantime. However, I’ve always had this project in the back of my mind. Not too long ago, I had a much better design idea for detecting the amount of oil in the tank. At first, I was trying to read the meter that is already on the tank, but the results were less than perfect and the hardware was going to be a major PIA to mount and maintain. One day I caught a video of a guy that made an automatic water dispenser for his cat or something crazy like that. But the thing I noticed was he was using a Parallax PING sensor to detect the amount of water in the bowl…enter proverbial light bulb. So I ordered one (a PING sensor) and started playing around with it. The results were amazing…not only is it amazingly simple on the hardware end, but the responses were more accurate and the code implementation was simple too.

Now that we have the data, we have to find some place to store it. I signed up for a BETA account at www.pachube.com and had a lot of fun programming the Arduino to speak pachube. I even got fancy with some Asterisk code to report pachube information via the telephone. But at the end of the day, there was still something missing…history. I really wanted to be able to look back on my fuel usage and get some trending information for curiosity’s sake…and I could not get such functionality from Pachube. So I did what any self-respecting nerd would do…I wrote my own. Here is the way it works:

The Arduino is listening on port 23 (telnet) for traffic. A cron job runs a script on the hour from a server that connects to the Arduino and sends a “p” (for percentage…”i” would return inches), which prompts the Arduino to pulse the PING sensor 5 times, average and convert the value to a percent based on the total tank size. The Arduino returns this information to the script which records the value and a time/date stamp to a database. From here I have a script that checks the database once a day and alerts via email if the level gets too low…however, I can do any number of things with that information. I have yet to write a “front end” to the database to make the information viewable over HTTP, but that is definitely in the works as well.

My next order of business will be mounting the ArduinOil components in the tank / furnace room, and doing the final hardware prep. I’d post some pictures, but honestly, at this point it’s just a bunch of code and tanggled wires. Hang in there…more to come!

Arduinoil

Posted on
Arduinoil

Testing iR sensor configuration on proto board

As with most projects, my most recent project was born out of an inconvenience, an an empty wallet, and an idea.

The inconvenience: walking outside in sub-zero temperatures to check my fuel oil gauge. I know it’s lame and I’m lazy, but there’s something annoying about not having the information at my finger tips (ie. the internet) no matter where I am.

The empty wallet: checking….yep…still empty.

The idea: to be able to read the information from my current oil gauge and feed it to a web-enabled service so I can not only check the current level, but have stats and trends available from anywhere in the world.

So far I have the general process all figured out. A series of infrared emitters and sensors will span the oil gauge “tube” and scan for the indicator. A server will periodically query my ethernet-enabled arduino to get the reading of all the sensors and return a percentage value. These value will then be stored in a MySQL database and processed accordingly with some PHP code.

At this point I’ve been able to get the sensors all wired up and tested. Everything seems to be working quite well. I received my ethernet shield last week and started playing with that. I’ve got a bit more tinkering to do with that before starting the build of the actual sensor enclosure. I’ll post updates as I progress.