Programming in a ZIF!

This is just a quick post about a board I made to program a whole bunch of ATmega 328’s for some kits I’m making. I am ordering the 328’s in bulk, so they are brand new and do not have an Arduino bootloader on them. One of the ways you can get an Arduino bootloader on a factory fresh 328 is use an Arduino Uno and a USBTiny. Sure, I could pop about 100 of these into an Uno, but that would be a lot of work as well as wear and tear on the 28 DIP socket on my Uno.

The answer? A ZIF socket! These are fantastic! Anyone who has installed/upgraded a CPU in a computer knows what these are. ZIF stands for Zero Insertion Force. That means you drop the chip in the socket very easy, then pull a lever down to secure the contacts and prevent the chip from bouncing out of there. Making swapping out a bunch of chips to program them a lot easier, faster, and less prone to damage to the pins or chips!

You can get these 28 Pin ZIF sockets at Adafruit, and for cheep! There is also a 40 pin version if your heart or project so desires. Sparkfun has this part in their Eagle library, if you don’t have it, and use eagle, I would get it. There is a lot of good stuff in there. 🙂 And on another note, if you don’t have the Adafruit Eagle library, it’s worth having also.

You can download the board and schematic Eagle files here, or get the image version here.

And a big happy birthday to my first daughter Anna, who came into the world today!!! A future maker? Engineer? Who knows, but I can tell you this, She. Is. Awesome.

My new daughter!

😀

Charging an iPad, iPhone, or iPod

I needed to charge an iPad, but I couldn’t do it the “normal” way because it was stuck in a wall! I had mounted 2 iPads in walls at a customers house. I did this by cutting a big iPad sized hole in the wall, and then building a custom mounting dock for it. I also embedded an arduino bootloaded ATmega 328 in there along with a MAX3232 (RS232 to TTL) chip for controlling the iPad via RS232. Now all I had to do was keep it charged. I found Ladyada’s mintyboost resources a huge help. She even has a video on Reverse engineering Apple’s secret charging methods. With her video and mintyboost page, I was able to build a working charging circuit that has worked perfect since December of 2010.

On a side note, you may ask yourself why would anyone put an iPad in a wall? Well, it serves as a lot of cool things, but the main one is to control the home automation systems I install. And an iPad is about the same price (with my dock) as a touchscreen the automation company sells. The automation system controls HVAC, lighting, security, audio (multi room/source), video, intercom, and also have close contact output as well as 5 RS232/485 ports, Ethernet, and telco connectivity. I’ll have to show off my automation system one day, it’s really an amazingly flexible system.

Why not just use the stock iPad charger? Because I don’t do cheesy. Apple chargers are cheesy? No, of course not. I will not tolerate any wires in plain sight at a customer installation. Ever. And I have seen a number of on wall (not in wall) iPad docks that have a wire going down to an outlet. Let’s just say, that’s not my style. NEC code does not allow for exposed high voltage inside a wall, like an outlet with an Apple charger sticking out. So the answer was to build my own solution with low voltage only. For power, I used 2 5v 2A power supplies from Adafruit.

Keep in mind that an iPad charger will charge an iPhone, but an iPhone charger will not charge an iPad. At least this is what Apple tells you. The truth be told, an iPhone charger will charge an iPad when it’s asleep, but that’s at a trickle rate that is painfully slow. I say all that to say this: I’m not clamming this is the only way to charge iDevices, it’s just the way I did it. This method will charge any device currently out right now including the iPad 2.

Here is a shot of the end result. The wow factor is there with authority.

iPad happily in the wall. :)

Here is the schematic:

iPad charger schematic

Controlling high power (or high number of) LED’s with an Arduino

A while ago I posted about my bench lights, and have gotten a number of request for schematics and code. I’ll gladly put the code up, but I also wanted to explain what I did so that others can create their own, or at least change my design up as they wish. The transistors I’m using are TIP122’s. You can find the data sheet here. They will switch a lot of power, but keep in mind, they need to have adequate cooling if you are going to push them hard. Always remember, fire = bad.

I covered the basic schematic for a few LED’s in the video above, but if you have any questions, feel free to post them in the comments and I will answer as quickly as I can.

You can download the original (controller with LCD and hard buttons) code here.

You can also download the newer (serial controlled – adjustable level) code here.

Just a note, I will be using Vimeo from now on, but I will still put all my videos on YouTube as well.

A word about open source hardware

Open Source Hardware

So, what is open source hardware and why should I be interested in it? Open source hardware is simply hardware that is released in the wild along with CAD files (PCB layout data), documentation, and hopefully a tutorial on how it is set up and works. The wiki page is located here. The Open Hardware Summit is here.

Now, I was skeptical about this when I first heard about it because I thought,”If I want to sell my stuff, why give away the information I worked on?” I mean after all, aren’t we supposed to design something, then patent, copyright, trademark, and lock it in a safe? Thats the way to keep it ours right? After all, I worked on it, and I should get all the credit and all the profit right? I’m not giving my stuff away! But then I started thinking…

I thought about myself buying hardware and how I yearn to know everything about it. When I found Adafruit Industries and Sparkfun, I thought, “Whoa! Sweet! Cool hardware and full documentation!” Did I first get the urge to download Ladyada’s board designs and have them made myself, cutting the seller out of the loop? Of course not. I mean, sure the option was there, but I would rather just purchase a kit with everything I need. This way, I get something in my hands a lot faster, tested, and documented for my hacking. The cost and time is just not worth me making my own.  Now, wouldn’t I want to offer the same thing to my customers? Of course I would, that’s what attracted me to buying from Adafruit in the first place.

When a maker/hacker buys something, it’s an entirely different attitude that a “regular” consumer. For the most part, a “regular” consumer wants to get the best deal on whatever they are buying, and they want it to “just work”. Yeah sure, us makers/hackers want the device to “just work” also, but we also want to know how and why it works. If we have full documentation, schematics, tutorials, and access to forums, we can fully understand what we own. And then once we understand it, we can fix, modify, hack it to our needs.

With all that said, I’m sold. I want to buy all my gadgets open source (if they are available), and want to offer the same back to the maker/hacker community. I have really learned a lot from good quality open source companies and the communities behind them, and would like to give back what I can.

There is a big move of DIY electronics right now. Some of us have been doing this for years, and others have just begun, but one thing is for sure, making and hacking is growing like mad. There is all kinds of great information available right now, as well as tools like the Arduino to get people started as well as develop new things. So don’t just read this, go make something!

EDIT: I just noticed that Ladyada has a great page on this!

Tic Tac Touch

OK, so I haven’t posted in a while because I have been working on some bigger projects, but yesterday, I took a two hour break and made a 2 player tic tac toe game. I did this with an Arduino and a 2.8″ touchshield from Adafruit.com. It’s pretty basic tic tac toe, and has score tracking, game logic (you can’t go twice in a row, and telling you if you win), and the ability to consume a chunk of time playing tic tac toe with my son. Below is the code, feel free to hack modify etc. If you play against a smart person (or yourself), you will have lots of Mosfet eye games! 🙂

Download the code here. (Arduino 22 .pde file)