Arduino without the Arduino

AVR ATMega328P controlling multiple stepper motors

I built a custom PCB to host a ATMega328P in DIP form factor. I want to control two stepper motors for a project. I considered doing it “the hard way” : E.g. using my own driver transistors and protection diodes… and I’ve also ready about a variety of silicon that makes driving them easy. But I’m still not ready to learn to do surface mount soldering, and I wasn’t finding any stepper motor drivers in DIP configuration. So I opted for something I’ve used on other projects, the “Easy Driver” from SparkFun.

A few of the features of this PCB is the 6-pin header that allows for it to be programmed using the linux command-line tool avrdude. I found that avrdude runs on raspberry pi, and I have one unused in a drawer. My plan was to make it so I could slide the pcb right onto the GPIO of the pi. But I neglected to consider the height of the various components on the pi, so I had to opt for use wires to hook it up instead… Not elegant but functional.

The wifi went out on my pi (which is why it is in a drawer). So I used a internet sharing on my mac to connect to it using a thunderbolt ethernet adaptor. I ssh into the pi, and use avrdude to upload to the PCB with the ATMega328p. I have a simple makefile that compiles my “C” program using avr-gcc.

The PCB was printed by OSH Park. First time using the Eagle software and first time getting a PCB made. It took about 2-3 weeks for the PCB to arrive…

It’s a beautiful board. I don’t think I’ll ever build something out of a generic perf board again.

I made some mistakes:

  1. The vias for my Easy Driver were too small to use regular wire. But I had some resistors with thin enough leads I could use those.
  2. For some reason my status LED’s weren’t actually grounded. I soldered a jumper wire
  3. The problem with the programming connection for the pi I mentioned before
  4. I’m sure I think of some others.

But the fact that the thing actually drives a motor is kind of amazing….

Leave a Reply