In the near future, Scott and myself will be taking a crack at Adafruit’s Arduino-powered immersion cooker. I’ve looked at this tutorial a few times, and I have now amassed enough of the parts as a result of other projects to make this a not-very-expensive build.

There was one wrinkle, though. This project requires the control of a 120V outlet with an Arduino. The recommended Power Switch Tail is, at this time, difficult to come by. I’m not sure if it has been discontinued or not, but lead times and cost are significant on the sites that I’ve visited. I feel that I have the skill to throw together a relay and some cut-up extension cord, but if I burn my house down, it would kind of be a hard sell to the insurance company. So another solution to switch on and off an ‘analog’ crock pot was needed.

Some time ago, I picked up a set of three outlets that can be toggled on and off with a small RF remote. I thinks to myself, if I can toggle a button on the remote with a simple circuit, I have the answer to the 120V control wrinkle. Here’s what I came up with:

RemoteBuild_ClosedSideView

RemoteBuild_TestSetup

By soldering on two wires to either side of the button for outlet 3, I was able to bring those two points out to accessible female headers:

RemoteBuild_Prebuild

RemoteBuild_PCBunderside

RemoteBuild_OpenSideView

So now, if I were to short those two headers together, the circuit completes and the button is “pushed.” That’s the first step. Now I need a way to “short” that connection that can be controlled by a digital output pin. A small transistor works pretty well for this. I had a 2N3904 lying around. A 10K resistor and some prototype wire later, I had this circuit implemented:

Circuit

RemoteBuild_TestCircuit

I was really happy with this solution. The remote is still completely usable. When we decide to give the Adafruit project a go, all we need to do is plug in the remote. And for future projects, modifying the remote to allow control of the other two outlets wouldn’t be too difficult. 

I suspect there will be some slight code modification required for the final project, however. In the test circuit, the button was toggled by raising D13 high for a 300ms pulse. So there’s not a direct 1-to-1 relation between the control pin being high and the heat being on. I don’t think it will be too big a problem, just something to remember to do.

From a safety standpoint, this is probably the best option for the immersion cooker build. The mains power control is about as isolated from the control circuit as you can get. All the same, when this thing is running, it won’t be left unattended. After all, something that I built will be controlling something with a heating element. Common Sense is advised.

-Dan

Gasp! An Update!

Yes, it’s true. We’re still here and after coming back from a nice and much-needed vacation, we’re ready to start doing cool stuff again. First off, and update on a previous post.

I recently put together a PCB to hold the important control elements of the Polar Giraffe. Many Thanks to OSHPark for another quality board!

PGControlBoard with Arduino Pro Mini installed

The Arduino Pro Mini and Big Easy drivers from SparkFun have their spots. I was originally going to mount the drivers on headers so they could be removed. But I might have forgotten to verify the correct drill size for the custom KiCAD footprint I made. Oops. Luckily, I was able to use some discarded resistor leads to fit the .0236″ holes that should have been .04″ holes. So while I can’t easily remove the drivers, at least I don’t have to spend another $40 to re-fab the board with the right sized hole. Since this is a personal project, I’m OK with it, but I went and updated the footprint as soon as I found out what was wrong.

PGControlBoard with Arduino Pro Mini removed

Under the Arduino Pro Mini are the resistors for the 4 status LEDs and the resistors and MOSFETs that make up the level converting circuitry that allows the Pi to talk to the APM. This was a great find, and credit to the folks over at StackExchange for providing the tips on how to make this work. Definitely check out that link. I was able to whip up a 2 channel, bi-directional level shifter for less than $2 in components.

PGControlBoard 7805 Close-Up

So yeah, I also might have forgotten to verify the pinout of the schematic footprint I was using for the 7805 regulator. Facepalm. As you can see, a crisis was averted by some careful pin bending, but I Definitely wouldn’t want to do this on a regular basis. Again, the footprint was fixed. The 9V supply is split off to the drivers to power the steppers, and through the regulator to provide the 5V for the servo (not pictured) and the APM.

PGControlBoard Test Setup

I certainly added to the “Lessons Learned” file on this build. Whenever you THINK you may have everything 100% good-to-go on your PCB, take a step back for a bit, then come back and review EVERYTHING again. You can’t be too careful. I’m happy to say that everything seems to be working. A quick test run yielded communication between the Pi and APM, as well as spinning steppers. Next, ah, step, is to figure out a more permanent mounting solution. Then, after dialing in the settings, I hope to be drawing soon!

PGControlBoard Test Setup

No, we’ve not genetically spliced a polar bear and a giraffe. Although, we’d be interested to see what that looked like…

Regardless, I present, for your consideration, the Polar Giraffe!

FunctionalTest_1_small

Ah yes, the name. Well I had a typo in the main project folder on my NAS device, so the project is known to the file system as “../PolarGRaph”. My mind can be a silly place sometimes, and upon seeing the typo, I exclaimed “Polar-G-Raph!”, and the Polar Giraffe was born.

In short, it is a drawing robot. The pen gondola is suspended between two stepper motors with some lengths of mono-filament line. With some clever maths, the pen can be moved about the drawing area based on how much each motor reels in or lets out. It’s not a precision drawing device, but it’s not intended to be. Theoretically, you can have a canvas of any size, all the way up to the stupidly large. I’m content with a nice chunk of wall for the time being.

Pen Gondola

This is a side project I’ve been working on for a little bit. There have been several variants of this device from people much more clever than myself. One of the best examples being the Polargraph. In fact, I purchased the pen gondola kit from Sandy, who has all of the bits you’d need to build your own Polargraph available for purchase. I have to say, it’s a change for me to have something of such elegance and precision on one of my projects, which tend to have pretty high kludge factors. My particular implementation is firmly based on a bit of awesome work done by Brandon with help from the Dallas Makerspace. Major, major kudos to the work they did in realizing this concept initially. I only hope to have a worthy tribute at the end of all this.

His drawing robot has at it’s core a Raspberry Pi sending commands to an Arduino, which in turn drives the stepper motors (I’m using Sparkfun Big Easy drivers). The Pi software is all in the Go language. One of the fun parts of this project will be going through the code to better understand how it all works. My first goal was to see if I could get his code working on my hardware. Tracking down all the dependencies was a bit of a chore, but I probably was going about it the hard way, hehe. After a bit of work, the code was not crashing when I tried to run it. Success. On to the hardware!

Testing the Stepper Motors

I had previously acquired a pair of hefty steppers from Sparkfun. These are probably way more then this project really needs, but I had already bought them soooo lets make them work! The motors are rated at 1.7A/Phase, so the EasyDrivers Brandon used wouldn’t cut the mustard. Fortunately, Sparkfun sells Big Easy drivers. Like you do. Same drive signals, but able to handle motors of up to 2A/Phase. Perfect. In the interest of not burning out the driver chips, I adjusted the driver output to a little under an amp, and added heat sinks to the chips. Since the load isn’t very heavy, the 1A is plenty for these motors to be able to hold and move the gondola with ease. With a bit of 3D print-ery, I had a pair of spools and was ready to start winding fishing line!

As you can see from the top picture, this project is still in the testing phase. I’m learning a lot of new tricks with the Pi, and this is the first time I’ve heavily used stepper motors in a project, so there’s been some education there. And that was one of the main reasons I wanted to do this project. I get to learn about new stuff, and I (hopefully) end up with a cool thing at the end. And I’m obviously not trying to pass of this as an original idea, or to say that I’ve done any of the “hard” work, hehe. This is just a thing I’m doing for me. I encourage the interested to take a look at Brandon’s write-up and to pay a visit to Sandy over at Polargraph.co.uk.

I fully plan on providing updates and lessons learned as I go. So stay tuned for all that!

-Dan

Hello World!

Realizing that Halloween was only a few days away, I thought to myself “Self, your house has no Halloween decorations, and thus, is Lame.” Being the crafty (and cheap) electrical engineer that I am, I took stock of my…stock…of electronic widgets and bits. After some thought, I decided on a couple of beady little red eyes peeking out of various windows would be appropriately festive, somewhat creepy, and very easy to through together.

Each pair of eyes uses an ATTiny85 chip and two 10mm red LEDs. Since Halloween decorations displayed year-round are frowned upon by my homeowner’s association, I also wanted these to be temporary. Luckily, I had a few protoboards that I could tie up for a few days.

CreepinEyes_3boards

Since this is a simple, temporary project, I made use of the awesome Arduino-Tiny set of “cores” for the Arduino IDE. Arduino-Tiny allows for a variety of ATTiny chips to be programmed directly form the Arduino IDE. There may not be 100% functionality, but it’s darn close. But of course the ability to blink lights is there, hehe. All I had to do was throw together the code and upload using my USBTinyISP.

CreepinEyes_prototyping

Speaking of the code, here it is:

int led = 2;
int led2 = 3;

int randblink = 0;

void setup() {
  pinMode(led, OUTPUT);
  pinMode(led2, OUTPUT);  
}

void loop() {  
  digitalWrite(led, HIGH);
  digitalWrite(led2, HIGH);  
  randblink=random(5000,30000);
  delay(randblink);
  digitalWrite(led, LOW);
  digitalWrite(led2, LOW);
  delay(400);
}

Note: In the Arduino IDE, under ‘Board’, I selected ‘ATTiny85 @ 1MHz (internal oscillator; BOD disabled)’

Using a little bit of ‘random’ allowed for a little bit of variety in the “blinking.” The effect is simple, but pretty neat. And now my house is less Lame.

555KitTestCircuit

A few days ago, I saw this kit from Evil Mad Scientist (by way of Adafruit). My first reaction was more or less “… That’s brilliant!” I love projects that have a healthy dose of wackiness as part of the recipe. Don’t get me wrong, I appreciate projects that are purpose-built to accomplish a goal. But this kit in particular jumped out at me for two reasons.

But before that, the ‘What.’ This kit takes the internal workings of a 555 IC and, with resistors and transistors, re-creates all the functionality of the humble little chip. Plastic “legs” complete the IC persona, and screw terminals allow for easy hook-up connections to protoboards or “dead bug” style circuits. The PCB is quite hefty, and the silk screening divides the different block components of the 555 circuit. It’s a great piece to look at, and it just happens to be completely functional. Bonus points.

First, the kit is most clever. Kit designer Eric Schlaepfer basically ripped the lid off of a 555 IC and blasted the thing with an Embiggening ray. Sure he could have just thrown the components onto a breadboard, but that’s no fun. The inclusion of the legs and the ‘notch’ on the silkscreen instantly inform anyone familiar with electronics what this is. Of course, the giant ‘555’ printed on it doesn’t hurt either. The giant terminals are a nice functional and aesthetic touch. So were I a judge on Iron Chef: Electronics Edition, I would award full points for creativity and originality.

Second, upon seeing the kit and instantly knowing that I wanted one, I knew that I would need to brush up on my 555 knowledge. I admit, I’ve played with 555s in the past, but I’ve never given much thought to the internal workings. So after having some fun putting the kit together and testing the included (astable configuration) test circuit, I took to the Tubes and sought out some diagrams and videos explaining the design and operation of the small but mighty 555 timer. I’ll include some of my findings below.

In a nutshell, the 555 timer works by using two voltage comparators and a flip-flip to generate pulses on the output pin. The two most common configuration modes are astable, in which the external circuitry causes the 555 to generate a constant pulse waveform, and monostable, where an external trigger causes the 555 to generate a single pulse. One of the key components to these common circuit configurations is the capacitor. When the capacitor reaches a certain fraction of the supply voltage, the flip-flop is “actuated”, the output pin goes high or low, and the capacitor will start discharging or re-charging. Obviously this is a very simplistic explanation, but the rate of capacitor charge and discharge (governed by capacitor and resistor values) are key to the timing applications of the 555 IC.

So to sum up, yay for creative kits that cause you to go out and (re)learn stuff! The cool thing about the 555 chip is that it is very much a building block to bigger things. There are plenty of resources out there for 555 applications and project ideas. I’d like to thank Eric Schlaepfer for his awesome kit idea and Evil Mad Scientist for helping make it available to the masses! I think it quite possible that you might see the 555 creep into future Maniacal Labs projects.

-Dan

Here are some resources I found while brushing up on the subject:

Of course, Wikipedia has a good synopsis of the 555, as well as some of the more in-depth maths detailing the particulars of how the different configurations function.
en.wikipedia.org/wiki/555_timer

The datasheet from Signetics, who developed the 555 in 1971:
www.datasheetarchive.com/dl/Scans-064/DSA2IH00140042.pdf

From the Sparkfun series “According to Pete”, Pete walks through some 555 basics.
youtube.com/watch?v=qwPtSkWyjWc

This video is long, but the link takes you to right where he demonstrates the inner workings of a monostable 555 circuit. The whole video is definitely worth a watch.
youtube.com/watch?feature=player_detailpage&v=SX01x1z7fTY#t=610

A few projects featuring one or more 555 timers:
555-timer-circuits.com

And some more pics from my build: