Tuesday, June 25, 2013

Prototype for HESA Mostly Done

I decided to go to the Makerspace tonight and work on the test system for the Home Environmental Sensor Array. I got it mostly assembled. The only thing I still need is two containers for water. Then I need to cut the hoses for the water and see if it works. Here are some pictures of the nearly finished product.

Monday, June 24, 2013

Cables for water detector

Yesterday, I bought two power cords to use with the test system for the home environmental sensor array. The white power cord will be the sensor itself. One of the wires will send electricity from the pi and the other wire will receive the signal into the pi. The plug end will go in the crock. When water touches the leads, it will complete the circuit and send a signal to the raspberry pi.

The other cable is only for the test system. I will wire it to one of the water pumps I bought. That water pump will represent the sump pump. I can turn the switch off to simulate something going wrong with the sump pump.

I should be able to build the test system the next time I am at the Makerspace.

Saturday, June 22, 2013

Python Coding Mostly Done

I spent all day working on the python code and made some great progress.  First, I went through the entire email module and got everything working the way I want it to.  The features of the email module are:

  • send an email to one or more email addresses including to, cc, and bcc
  • the email addresses can be sent to the function in either a string or list variable and it will convert them to the correct formats for the header and for SMTP
  • add the correct date to the header with UTC offset 
  • created a new function to determine the UTC offset in hours.  So, the date and time in the email should be correct no matter what time zone the pi is in and regardless of daylight savings or not.
  • added a debug boolean to add more text to the body of the email when testing the email module
Adding the date to the email header turned out to be a lot more trouble than it sounds.  If you don't put a date on the header, pure SMTP email systems show the email as having no date.  Gmail shows the correct date.  After adding the date and time to the header, Gmail started showing the time as two hours in the future.  I had to add the UTC offset in hours and minutes to the date and then Gmail showed it correctly in the header.

Next, I worked on the main HESA program.  It sends power to the output pin for the powerswitch tail and to the water sensor.  It also looks for power coming in on the input pin.  When it senses power coming in, it shuts off the power to the powerswitch tail pin and to the water sensor pin.  Then, it sends an email to a mailing list that forwards on to my personal emails and my cell phone.

I think these are all of the basic features for the python program.

One Linux problem I am having is that my program will not import the modules that I had in another sub-folder.  I did set the PATH and PYTHONPATH variables but python is not using them for some reason.

Friday, June 21, 2013

More python coding

Went to the Makerspace last night and worked on the python code for the Home Environmental Sensor Array on the raspberry pi. Spent some trial and error time getting the email module to work. Added some features so it will include a cc and bcc in the address list. Still need to test a bit more but it works to send emails with several lines in the body of the message.

Also, my wife, mother-in-law and daughter showed up for the Etsy craft party and a tour of the space. They each made a craft that was donated to the animal shelter.

Saturday, June 15, 2013

Rocket launcher with Tim and Jacob

Tim, Jacob and I went to the Makerspace today. Jacob made a cool ninja racer out of Legos. Tim and I made a rocket launcher.  The LED on the launcher does not work but other than that it should work to launch a rocket. We'll test it tomorrow.

Tim and I also put a power cord on one of the water pumps I picked up to test my water sensor.

Finally, I got trained on one of the drill press machines at the Makerspace.  Now I can use it.

Thursday, June 13, 2013

Python Progress

Started working on the python program for the home sensor Array. I got it to send a signal out and read a signal in. If it senses power coming in, it will shut off power to the output pin.
It's a good start. Another good night at the Makerspace.

Tuesday, June 11, 2013

The Power Switch Tail Works

I went to the Makerspace tonight and spent some time working on the power switch tail. Kevin and Dennis helped me troubleshoot the problems. I resoldered all the connections and did some testing. The root cause of the problem was that I had the power connected to the wrong side. Plugged the power in to the side labeled "line" and it worked.

I love the Makerspace. Thanks everyone for helping a noob!

One thing is that the power switch tail still puts out 104 volts even after the raspberry pi shuts off the power. Not sure why. I emailed the company to find out. [Update: Once the power switch tail is plugged in to a load, the output drops to zero when the switch is off.  It works exactly as described.]

Saturday, June 8, 2013

Power Switch Tail not working

I finished soldering the components onto my Power Switch Tail board last night. Plugged it in to the raspberry pi and the LED lit up. That works.

Then, I plugged it into an outlet. The relay is supposed to click. Nothing. Checked the output voltage with a multimeter. It was 3 volts or so. Something is stopping the electricity from getting through. Maybe I connected the relay incorrectly or I ruined it when soldering it on.

I need to spend some time troubleshooting.

Thursday, June 6, 2013

Started assembling the Power Switch Tail

I started soldering parts onto the Power Switch Tail at the Milwaukee Makerspace tonight. I got all but two pieces soldered on in about two hours. Pretty slow. It took me awhile to figure out what resistors to use. Then, I messed up on one of the resistors and spent way too much time fixing it. On the bright side, a guy named Bob sat across from me and gave me a lot of help. He is an expert solderer and quickly gave me a beginner lesson. What a huge help. (Thanks God for sending Bob to help me.) I took a few pictures of my workspace and progress.

In other news, I did not get the Makership which would have given me a free three month membership to the Makerspace. So, I signed up for a part time membership. Anyone reading this (who I already know) who would like a tour, just let me know. I'm going to try to hang out there every Thursday night and one Saturday a month. We'll see how it goes.

Wednesday, June 5, 2013

Soldered a breakout box

This week, I bought some soldering tools and supplies for small electronics soldering. In the picture below you can see my new Weller soldering iron. I also got a roll of .022" solder. It's very small and works better with small parts. I purchased a small container of flux and a set of soldering tools. Finally, I bought a small pliers. I should be set for electronic projects now.

For my first project with my new soldering iron, I wired up my pi Cobbler board. See the picture below. First, I attached the ribbon connector to the board. Then, I soldered 13 pins on each side of the board so it can attach to my breadboard. Finally, I wired up a simple circuit to light a diode and connected the pi for power. It worked.

Next, I need to work on the power tail switch.