Showing posts with label RelaySquid. Show all posts
Showing posts with label RelaySquid. Show all posts

Tuesday, August 26, 2008

You can find me in da club...

Oh boy. I’ve never really been the clubbing type. The music is too loud, the floor is cramped, and I find the crowd to be mildly obnoxious. Suffice to say clubs are generally not my venue of choice. It’s the weirdest thing, though, because I do like the crazy lights and powerful bass. Maybe it has something to do with being unhealthily mesmerized by oscillating screensavers since the age of 8, but that’s a story for a different day.

Well, it's a little more complex to program flashing lights that beat to the music, but here's the next best thing. And it tests your sense of rhythm too! Mike played this one (I just shot the video), and it's surprisingly easy to put together. It took me maybe 10 minutes to throw together, and then I spent forever playing our homebrewed version of "Spotlight" Hero. I even brought my girlfriend and resident Guitar Hero expert over to play a few rounds!


To build all this, I just connected some colored lights up to the RelaySquid, and then controlled them with a few digital switches that I picked up from RadioShack. The circuit itself was powered by a Lithium Backpack that I strapped on to the setup.

First, I set up the colored buttons- but any plain old switches will do.

Next I connected the other side of each button to the respective relay you want it to control, and then I then secured the Lithium Backpack to the PC Board with the 4 Buttons on it. After that I connected each Button to the RelaySquid Digital Input that controls it’s respective color output. That meant I took the wire from the blue button, and tied one end to +5V, and the other end I plugged into the labeled pin on the RelaySquid that corresponded to the blue light. I also connected the Lithium Backpack’s +5V and GND to the RelaySquid’s respective inputs on J8.

I turned on the Backpack and press the buttons to test each Squid Relay (you should hear a click with each press). When this test worked ok, I plugged in each AC plug (including the power input coming from the RelaySquid.


I made sure the lights were on, and then every time I pressed a button, the corresponding relay on the RelaySquid would turn on. That’s it! More details, pics and vids over on the projects page.

Monday, August 25, 2008

Arduino! Make me breakfast!

When I was younger, maybe when I was watching the Jetsons, I had a dream that someday, food would be super cheap and always perfect. Because we'd have robots do everything delicate work that only the world's finest chefs were capable of. The cool part was that you wouldn't have to pay robots to work and they could cook for you anytime you wanted. With dreams like these, it's no wonder I was more of a husky kid.

With the Arduino, I've put together what I hope will set in motion the R&D that will make my dream a reality. I decided to start with the first meal of the day, and the most important one I don't have on most days. To be honest, I’m usually running out the door in the morning, and I don’t have time to sit at the stove cooking a real meal and making watching the coffee maker for 15 minutes (that’s about how long it usually takes me).

So I hooked up a coffee maker, and two electric stove surfaces to the RelaySquid. Then I ran the RelaySquid with a slightly modified version of the BitDJ code, which I edited to make it time the signals to the RelaySquid to turn on the bacon hotplate for 7 minutes, followed by coffee for 2 minutes, and then the egg for 7 minutes (the coffee and egg run in parallel to start). The end result is crispy bacon that’s had a chance to dry out a little, coffee that’s not too hot, and a fresh hot egg!

To start out, I put together the device. I used a TouchShield on the top, with a small prototyping area so I could place down some LEDs (I’ll talk about those later). Then I put the Arduino on the back, and a Lithium backpack on the back too.

Here’s a picture of the controller, assembled:

The circuit is actually embarassingly basic… the TouchShield controls the Arduino, and tells it to turn on or off pins numbered 4, 5, 6, and 7. These pins are connected with wire to the RelaySquid. Arduino pin 4 is connected to the RelaySquid port 1, which is then connected to the coffee maker. Arduino pin 5 is connected to the RelaySquid’s port 2, which controls the egg hotplate, and pin 6 is connected to RelaySquid port 3, which controls the bacon hot plate. I had a toaster on the system for a while, but then I realized toasters are already easy enough to use!

I bought really low-end coffee maker and hot plates from Home Depot:

That’s all… the rest is source code, which you can find here

I took some videos too. When I started cooking:



A few minutes in:



All done!

Don't be a rectangle...

...Be a circle! Meet the RelaySquid. It's a circular PCB with four relays that each switch an extension cord on/off , all of which can be controlled by an I/O board like the Arduino.

Not to be confused with any other type of squid:

There's also a plug that goes into the wall to power each of these outlets, as well as pins that connect directly to the Arduino to control each of the relays, in addition to powering the circuit itself.

It's super easy to get up and running, even if you're new to the Arduino. The pins are arranged as follows:

Just plug G into the Power GND pin on the Arduino, and V into Power 5V on the Arduino, and then connect your Arduino pin to a relay pin. Once you start switching your pins on and off, you can hear the relays clicking!
Here's a quick video I made to demo the project. I'll post some code later today.