Need a test platform

Posted: June 20, 2014 in Hacking, Hardware, Raspberry PI, RPi, Software
Tags: , , ,

So I finally hooked up the opensprinkler hardware version 1.4 (OSPi) with my RPi and the Adafruit LCD Plate.  I tried a few things, I purchased the hardware without the RPi connector installed with the intent of using a stacking connector instead. That sort of worked, I had to cut the bottom of the case open with my dremel tool, was expecting that.  But there is a problem with this: The stacking pins are so long that the case has to be mounted on the wall with large offsets to allow enough room under the case to install a ribbon cable.  So it will work, but not really what I want to do.

Next I tried to add a pin header to the OSPi, on version 1.4  they routed all 26 pins of the GPIO to the top left corner of their board, nice.  So I installed a pin header and that worked nicely (sort of), but the RPi won’t plug in anymore, the Audio jack now hits the pin header I just installed. Whoops! So since I don’t need the audio out in this application, I decided to unsolder the audio jack. Fine that works the RPi will install the ribbon cable fits under the RPi.  So then using the dremel tool again, cut a slot for the ribbon cable to exit the case. That works.  So then I tried to put the cover back on the OSPi case.  Another Whoops, the RPi is now too high for the case to close, why?  The stacking header is some taller then the standard header.  So we have another fail. Time to remove the RPi and just install the ribbon cable and route it out of the case. Finally was able to seal the case with the supplied screws, with only the OSPi in there.

When I assembled the LCD Plate I did not use the standard 26 pin socket that it comes with, instead I installed a stacking connector so I could connect a RPi and something else to the LCD.  So the RPi is at the bottom of the stack, the LCD Plate is next and the ribbon cable is plugged in on top.  So now everything is assembled together.  I’m going to have to be creative to make a case for the RPi and LCD Plate, the ribbon cable sticks up above the display but that I “think” I can work around.  I’ll worry about that later.

OK, plug the RPi into the monitor and keyboard (which normally won’t be used but hey I”m testing stuff right now ;-P ), and plug in the micro USB connector for power.  Yea, the RPi lights up, no magic smoke being released anywhere.  Score.  Next I look at the OSPi and it’s powered up too, at least the 5V DC section is.

So I run a quick python program to  check the I2C port, as there should be at least 2 things hanging off it, the RTC @ device 68, and the LCD Plate at device 20 so time to run:

i2cdetect -y 1

The result looked like:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- -- 
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --

Yep both there 20 is the LCD and 68 is the RTC.  Next setup the RPi to use the RTC, easy instructions are avalible with the OSPi. 🙂 Then run the LCD Plate test code and yes it is working fantastic.

Now I need to test the rest of the OSPi hardware, the sprinkler control section.  Thats going to be a bit harder, I don’t want to go buy a bunch of sprinkler control valves, that is expensive so what can I hook up that can: 1) Work on 24vac 2) See a visual to tell it is working. 3) Is cheap since I only need it for debugging code.  Hmmm, first thought is light bulbs, they run on AC but have you ever tried to find 24VAC light bulbs? Turns out that is both hard and expensive.  BUT 12V light bulbs are plentiful and pretty cheap < $10 will buy 8 low voltage yard light bulbs.  But can I rig 12 VAC lights to a 24VAC source? Not likely 12lights will turn into a fuse at 24V and blow out.  Could add a big honking resistor and waste a lot of heat but thats just stupid and adds cost.  Wait will the OSPi work on 12VAC?

Yep turns out the OSPi will work off of 12VAC for testing, it needs an AC source of 24VAC to run sprinkler zone valves but the internal DC2DC converter that makes the 5VDC power for the RPi is happy from 9VAC – 24VAC. Perfect  Off I go and I buy 8 light bulbs, a circuit board to mount them on, and a 12VAC wall wart.  Solder up a test board with the lights and plug up the 12VAC transformer to the OSPi.   Sure enough, the OSPi powers up fine, makes 5VDC to run the RPi and all is good.  Finally 🙂

Well spoke a bit too soon. 😦  I ran some test code to turn on zone 1 light, it lit for a split second and the RPi rebooted!!!!  What the heck?  Turned out the wall wart was too low an amperage transformer, worked fine just running the OSPi, RPi and the LCD but turn on a 4W light bulb and the voltage drop was too much for the regulator.   So plugged in both the 12VAC transformer and the micro USB connector so the RPi and the LCD and the 5VDC side of the OSPi got juice from the micro USB. Tried it again, yea, it works finally I have a functioning test platform, with a slightly butchered case.  Let the coding begin.

When its really hooked up in my garage it will be supplied from the mondo 24VAC wall wart so that won’t be a concern.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

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