Arduino Shield for Head Following Dalek Dome

Fred's brain. Click to zoom in.

Fred’s brain. Click to zoom in.

Fred’s new brain is built on the Sparkfun Arduino ProtoShield Kit, though other protoshields would work too. It would make a good basis for other animatronic or robot projects as it is designed to be plug-in.

Wired onto this are

  • four I2C connectors, with terminating pullup resistors.
  • Two connectors for controlling separate L298N motor controllers
  • Connectors for stop switches for the L298N controllers
  • Connector for eye position indicator.

I have a WiiChuck connected into its standard position in A5-A2 via a short extension to a male header so it can mount on the front of the case.

The I2C connector pins are configured -,SDA,+,SCL with the ground pin to the left where the board has a row of ground holes. I chose this pattern as I read that it is good to separate the SDA and SCL lines when using ribbon cables for I2C. As I ended up using Cat5 ethernet cable for my I2C wiring, I could have matched the pinout to one of the other standards. When using Cat5 for I2C, I trim off the brown pair, connect all the stripe wires to ground and allocate the three remaining solid color wires to +, SDA and SCL. This twists each signal and power wire with a ground wire to reduce interference. This works for me.

4.7k pullup resistors tie the SCL and SDA line to +

The I2C connectors are used to plug in the dome and eye position sensors, which are absolute position encoders and a 12 button keypad – all of which use the MCP23008 I/O expander. I have one port spare which was going to take the head sensor, but that ended up on the headset instead connecting via the WiiChuck.

l298nmoduleMotor port and stop switch The motor control ports are simple 6-pin male headers designed to connect to these L298N controller modules via a 6-way jumper wire. The L298N is a dual motor controller – actually it is a chip with four half H-bridges. While the normal way to use it is to drive two motors, I am connecting it in its parallel mode for twice the load capacity as the wiper motors are pretty beefy. You could use other controller but these ones are cheap on eBay ($6) and plug in easily, giving access to all 6 control pins. Some modules reduce the pin-count by two by adding an inverter giving you forward and back modes only. This uses less Arduino pins but you lose the braking modes. When configuring the L298N in parallel all the pins need to be paired with their mirror counterpart. On this module this means connecting the middle pins together, the outer pins together and the other pins together, and soldering a pair of wires across the back between the outputs. The motor control ports are adjacent to pins 9 and 10. These pins were chosen as they are controlled by Timer 1 which can be adjusted without impacting other functions in the arduino. The enable pins (outer pins) are connected to the arduino pwm pin and pulled up with a 4.7k resistor to the row of 5V holes. The  next two arduino pins on either side are connected to the other motor control pins with 10K resistors. These resistors allow the stop switches to pull down the signal without pulling too much current from the arduino pins. The stop switch connectors have the two middle pins grounded and the two outer pins connected to the motor control inputs. This is easier said with a schematic. Using these cheap external controller is a good alternative to the more expensive integrated shields, particularly if you are operating higher power motors that might fry the controller.

The eye position indicator connector is a straightforward breakout of the +5V and digital pins 3, 4 and 5. This connects to a little board with three LEDs and resistors on it which are programmed to indicate to the operator if the eye is too high, too low or just right, as it is hard to judge from inside.

Motor port and stop switch

Linux traffic control with gigabit bond and vlan interfaces

Linux (CentOS6) traffic control features of iproute2 are not active by default, and are usually implemented to aid traffic flow over lower bandwidth WAN connections such as aDSL. In this article I will describe how I implemented them on high end systems with multiple gigabit interfaces with bonded interfaces (often also known and LACP, LAG [...]

Fredalek at Maker Faire

2012-05-20_11-24-08_444

Fredalek will be at the Bay Area Maker Faire in San Mateo, May 18-19. Come and be exterminated! We had a great time there last year, so we are back again this year. This is a wonderful event for anyone interested in gadgets, doodads, making things or experiencing indoor lightning. We’ll be exhibit 1278. Follow [...]

Little Arduino Shield Spacers

The normal recommended spacer for Arduino shields is to use an extra set of extension headers. This is overkill if all you need is a little extra height. In my case my Sparkfun proto shield was not sitting level on the Arduino Duo R3 – the board was hitting the USB port, and ended up [...]

Absolute 128 Position Encoder for Arduino

ACE128 MCP23008 front

I’ve started work on motorizing the Dalek dome and came across this nifty rotary encoder. Most rotary encoders are of the incremental type. They give you direction and revolution counts, and may have resolution of only a quarter turn. This one is an absolute position encoder, giving 128 unique binary values on its 8 pins. [...]