Top Secret Project: CORHAKADA

Wow… It has been over two years since I actually typed anything on my own blog. When I just logged into it, I forgot my password and was pretty amazed that is was actually still up.

OK… So let’s forget about my neglect for my lab site and get right to it.

About a year ago my wife said to me, “I am worried about our girls getting enough STEM education because I am just not good in that area.” For those of you that are not up on the term “STEM” it is an acronym for Science, Technology, Engineering and Math. When my wife said this to me I was totally perplexed. How could she think that the ball would be dropped when it comes to my FAVORITE stuff! Out of all education that is the only stuff I like. Literature… it is OK I guess, but I read Steinbeck and thought it lacking because… well… there were no gene edited dinosaurs, no robots, no laser weapons. Oh… And what crappy endings. Seriously? Literature? Who cares?

So… Back to my wife an kids… They need STEM. So… What better thing to do that a super secret project with a cool code name that has one of these!

IMG_2114

That is a “SainSmart 8-Channel 5V Solid State Relay Module Board for Arduino Uno Duemilanove MEGA2560 MEGA1280 ARM DSP PIC”.

I know what you are thinking, “What the heck is that and why would something that looks simpler than than the inside of my toaster be interesting to me?”.

Here is why… If you look at the picture, you will see the green bar in the middle / bottom of the board. Those are electrical connections. If I can figure out how to put a little bit of voltage in there (at my command of course) the little green connections on the top will output lots of power to do something interesting for the project. “Interesting” is not always POWER… but for super secret project “CORHAKADA” it is necessary to have POWER!

From now on, instead of calling this the “SainSmart 8-Channel… blah… blah… blah…” we will call it the “Daughterboard”.

Yeah… I know what you are thinking. We live in the age of “fundamental transformation” where sex doesn’t mean anything and certainly shouldn’t be applied to inanimate objects nor to human beings, but we call it a daughter board around here despite what the culture thinks… I have three daughters and they like Cabbage Patch Kids, stuffed animals, tea parties and all sorts of crap that I don’t care about. But they also like “Daughter Boards”. Enough said except, “Go STEM!”

Now I know everyone is curios and wants to know what the project really is. Well… Eventually if you keep reading you are going to figure it out. But my goal is to keep my children in the dark about it until it is as close to finished as possible.

OK… The next step is to show the Motherboard. For that we will be using a Raspberry Pi 2. This is a cheap little computer board (35.00). It really is an entire computer on one little board. It has a video out, networking, USB ports. It is really versatile.

 

IMG_2113

This is actually a broken Raspberry PI 2 that I have. The reason you see the c-clamp on it is that the clasp that holds the memory card in is broken. So that is one thing we need to figure out.

Another thing you will notice about it is this.

 

gpio-pins-pi2

That is a GPIO header. We are going to connect some of the pins on that guy to our daughter board. The problem at this moment is that neither the mother board or the daughter board came with any schematics so I have to look it all up on the Internet. In my initial searches I kept coming up with this…

gpio-numbers-pi2

…which isn’t much better, as I would expect to see something like a map that will tell me which of those pins are the actual GPIO pins and what number they are associated with so I can command the daughterboard with software on the motherboard. More on this later. The girls are ansy to get started.

Even thought I don’t know what pins will go to what, I need a way to connect them. I never did find any cables on line that would work easily, but I have a ton of electronics junk lying around so I am sure I can find something. That GPIO header looks a lot like an IDE interface to me, let’s see if I can find something that will work in one of my bins. Here is a picture of my hard drive connector bin.

IMG_2155

Yeah… I am pretty sure we can find something that will work in there. I rummage through it and after a few seconds I find an old hard drive cable. The problem with hard drive IDE connectors and this GPIO, although both 40 pins, IDE connectors are usually keyed. A lot of the time they have a filled in pin in the middle to keep people from putting them on the wrong way. Here is a picture of what an IDE interface looks like on a regular computer.

IDE

We wouldn’t want it to be keyed. We need all 40 pins. So I take a closer look at one of the connectors and it looks like we are good. All 40 are not blocked.

IDE-CONNECTOR

Next step I need to separate those individual wires on those ribbon cables. I know from experience you can’t just manually separate them because the wires will come right out of the insulation and it will be a disaster (I don’t remember why I know this, but clearly I have tried it before for some reason). So I need a razor blade. This will not be a job for a kid. So… I cut the ribbon cable and clamp it down to my work bench and use a razor and tediously separate all of the wires.

IMG_2159

At this point I am almost ready to get the girls in to help me. But I do need to figure out those pins. I look for quite a while and I really have a lot of trouble finding out which pin is the first GPIO pin. I keep coming across different pin configurations and the setup.

After what seemed to be too long to figure out just came together rather quickly. First I found this clue from the software that I will be working with.

“assumes you are using the first 8 GPIO ports (GPIO0 – GPIO7) to control 8 channels”.

OK… That is a good read. Makes sense. I need to know GPIO0-GPIO7 pins. I read some more and am not quite frustrated yet, but am perplexed as to why it is so difficult to find something that it seems everyone who does projects with the GPIO would need.

Then I came across this command to run on the Raspberry PI.

“gpio readall”

I ran it and look what it spit out on the screen:

gpio-readall

Now that is the EXACT thing I need to tie motherboard and daughter board together and make a nice “STEM family”. A fatherboardless family… but a family none-the-less.

So the next step is I have to finish preparing our ribbon cable for Hannah. She will be “tinning” the cables so they they don’t get freyed as we mess with them. I strip off 1/4 inch of the top of the following pins:

11,12, 13, 15,16,18, 22,7,39

Those pins matching in sequence:

CPIO0,1,2,3,4,5,6,7 and Ground.

I fold back the unused cables and use electrical tape to get them out of the way. I set them up with my “helping hands” mini holder and tell Hannah to tin the tips of each wire.

IMG_2120

That will keep Hannah busy for a while now to get Cordie working on something. I tell her we are going to make a case for the secret project. I have her grab both the mother and daughter board. And bring them into the workshop.

I had eyed this wood earlier, it will work.

IMG_2110

I have Cordie place the mother and daughter boards on the wood to get an idea of how wide the box will need to be.

IMG_2122

Now to cut the parts of our box, Cordie who is 5 will have to use the table saw. No… Just kidding… She can’t use the table saw. She is too young. I will be doing that part, but she can use the power drill. The box is going to be about 10″ wide and I had built a block onto the guide of my table saw a few years back to work on my underwater camera, I don’t need that for this and need to remove it so I can cut 10″ of wood. Cordie can use a power drill so I get her started on removing that block of wood from the table saw.

IMG_2127

While she is working on that I get back to Hannah and see that she is moving along well tinning our ribbon cable. I also check on Kasia… She is busy too. I will have to figure out a way for her to help with this project.

IMG_2142

So the box will be simple. Just wooden. I don’t want to glue it because we will have to wait for it to dry and I hope to get this thing at least mounted inside the box today. I drill pilot holes using a pilot drill bit. This makes it really easy for Cordie to put it all together.

IMG_2129

She did needed help some of the time keeping the drill steady especially at that last little bit where there is more tension.

IMG_2130

Then after a little while she was doing most of the work herself.

IMG_2134

It didn’t take too long and a few minutes later we had our box.

IMG_2135

Here is a top view of it.

IMG_2136

While Corie and I were building the box Hannah finished up the tinning of the ribbon cable and needed something more to do. The motherboard program will be sending out controls to devices that require 120v… Se we need to get some standard 120VAC into this project, so I had her cut in half a extension cord.

IMG_2126

Then I told her to strip a 1/2 ” off each end and tin them. Here is a picture of the soldering mess, the tinned extension cord and our completed ribbon cable.

 

 

IMG_2132

What a mess! We will have to clean all this up later.

When I was looking for a hot glue gun to fasten our mother board and daughter board to our case, I came across these little wooden spindles.

IMG_2112

I think they would be good feet to support our mother and daughter boards. These will require glue, so I want to get this done sooner than later so it will be dry enough for us to put our boards in the box.

I have the girls setup both boards in our box and use a pen to mark where the holes are.

IMG_2137

I am not sure how visible this is, but here is where the dots all landed on the bottom of our box.

IMG_2138

I then took a 1/2″ spade bit for the drill.

IMG_2139

And had the girls very carefully bore out 1/8″ depth footings for our spindles.

 

IMG_2140

A little bit of glue and then a quick clean up of the baby because she got into the glue we have this:

IMG_2141

OK… I can feel it now… Everything is coming together. I have the girls plug in the header ribbon cables into the daughter board.

IMG_2143

Here is Cordie pitching in.

IMG_2147

This is what it looks like after all the GPIO pins and ground are connected.

IMG_2148

Well… We had our first dust up. While the girls were waiting for me to do something they got ansy and knocked the storage drive out of our mother board when it was on. I got upset with them as I was afraid it may be broken. I kicked them upstairs for a bit while I attempted the high voltage part.

So remember that the daughter board didn’t come with any instructions and the site that I was looking at for reference had a couple of key pictures missing from it, so getting the 120VAC to the outputs wasn’t clear. There is a program that I can run on the Raspberry PI that will toggle the GPIO pins 0 – 7 right in a row. I connect everything up except the 120 and see if I can get those LEDs to light.

Here is what the program looks like when it is running.

led-test

The problem is that it runs, but the LEDs don;t light up at all. I was expecting them to light up 1, 2, 3, 4….

I grabbed the girls and a multi-meter. I am pretty sure my output pins are correct as it was super straight forward after I figured out how things were numbered, but I had to prove it. I had them hold the multimeter on ground and the first input of our daughter board which should correspond to the first LED. After a bit as the program cycled through I could see the program sends 3.26 volts twice to each pin as the program cycled through. It was tough to get this picture, but I persevered and you can see clearly… We are getting voltage on those inputs.

IMG_2165

So with that being figured out. I wanted to get those LEDs going. I am not sure what to do next and know I would risk blowing the daughterboard if I don’t connect it correctly. Putting 120 volts into the wrong place will for sure blow this thing.

I looked and looked and couldn’t find any details on wire it, so I am just going to try to put the 120VAC power here as it is the only thing that makes sense to me right now. I really want to see those LEDs get lit.

IMG_2161

I plugged it in and I could see all the LEDs light up very slightly… Then one by one as the program hit each output I heard a sizzle, followed by another sizzle, followed by a faint crackle. It was really scary and I am really thinking I fried it. I feel terrible, I don’t think I will get lucky with this.

I need to figure out how I am supposed to connect this thing so I reach out to my buddy Mark who knows more about this device than I do as he did a similar project a few weeks ago (he is where I got this idea from).

IMG_2166

So I called Mark and he confirmed it… I set it up all wrong. I am really sad now. But, at least now know how to connect it up properly.

I am going to connect the board properly and see what it looks like. I turned the lights off so you can see what I see in the picture.

IMG_2151

I feel a little sick right now as I fried that daughterboard. I don’t think it is safe to even try to use now. I would expect all lights to be off right now, and there are several lit dimly.  I am a little scared too at this point because it is bringing home all sorts of things. I was thinking about the fact that my case is made of wood and just having this thing even if it is wired correctly around my wife and kids just makes me feel like it is all wrong.

I know I have to get another daughter board so I reached out to my sidekick Mike to order me two extras and some cabling so I can upgrade that ribbon cable to something a little nicer. He said I won’t get it until Tuesday. I am bummed right now and feel embarrassed stupid and mostly just sad because I have to stop. I was having so much fun I could work on this all night long until I can’t keep my eyes open.

It is hard to express how upsetting this is. A few weeks ago my daughters were crying a lot for stupid things and to try to get them to stop I would follow them around with a camera and try to get a good picture of the utter “sadness” to make them think it is strange to be crying all of the time. While I was writing this I came across one of those pictures that pretty much grasps how I am feeling.

IMG_2067

Well… It is too late to do anything more… I am too tired to keep on writing. I will start another post once I get the new daugherboard and spare. Crap… I have to re-think the whole case too.

__________________________________

Quick… Post post edit. I did find one little thing to do… Me and the girls fixed data card issue in the motherboard and even though the case is wood mounted it in there just to get us setup for when we get the new daughterboards. I forgot that part earlier.

Continue to POST 2

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

Post Navigation