Electronics

Using Microchip 25LC080 serial eeprom with an Arduino

I am working on a data logger for the wii nunchuck. I need something to record the accelerometer values that get output from the nunchuck. I had a Microchip 25LC080 eeprom handy and decided to hook it up to my Arduino.

The Arduino site has a great tutorial on working with serial eeproms http://www.arduino.cc/en/Tutorial/SPIEEPROM . I used it to get most of my information. The eeprom I am using is a just little different than the one in the tutorial.


Read wii nunchuck data into arduino

With a little hacking, data can be read from a wii nunchuck directly into an Arduino, using TWI (aka I2C). The nunchuck contains a 3 axis accelerometer, joystick and buttons for only $19.95. The same accelerometer in kit form, cost $34.95 at Sparkfun. Plus the nunchuck is already wired up in a nice clean case! So the wii nunchuck should fit nicely into anyones robotic project.

Arduino Nunchuck


Wiimote as bluetooth transciever for an Arduino

After some trying, I have been able to use a wiimote for two-way communication for an Arduino. So far I just have a proof of concept. The code is very rough. For the set up and wiring, first look at my earlier entry on using the wiimote for one way communication.


Perl communication to Arduino over serial USB

I recently switched from using plain Atmel chips to Arduino. Arduino is a development platform that uses an Atmel Atmege168 chip. It simplifies things a lot.

The Arduino board has a USB port. It has a built in FTDI chip for USB to serial conversions.

This HOWTO shows how to communicate between Perl/Linux and the Arduino. Because of the Arduinos FTDI chip, I can use regular serial communication, I just needed to first set up the USB serial adapter drivers. Most modern linux distro should come with them installed.

The perl script will transmit a number, starting at 0, to the Arduino. The Arduino will then echo that number back to your linux/perl computer.


HOWTO make your own Wiimote peripheral

With a little wiring a Wiimote can be made into a cheap bluetooth transmitter for your microcontroller project. Wiimote peripherals like the nunchuk, communicate with the wiimote over I2C (aka Two Wire Interface, TWI). A number of microcontrollers support TWI, such as the Arduino,the Make Controller and Atmels ATmega series. I am using an arduino with a ATmega168 for this project.

Wiimote/Arduino


HowTo: controlling a stepper motor with an attiny2313

Here is how I controlled a stepper motor with an Atmel attiny2313. I found an old stepper motor in my junk box. I remembered it was a unipolar stepper but that was about it. Google couldn't find the part number, so I had no data sheet.

stepper motor

A unipolar stepper motor has four magnet/coils. Each coil must energize in sequence to spin the motor. The coils are in pairs. Each pair shares a common positive line.

The motor has 6 wires so I had to figure out what each was. The colors where: white, black, blue/red, white/blue, white/black. I pulled out my meter and checked the resistance between each set of wires.


HowTo: Serial communication between PC and Atmel attiny2313

The attiny2313 has a built in UART for serial communication. You need a few outside parts to allow it to communicate with a PC over a serial connection.


minipov update

I wanted to put my Minipov on something so it would be easy to see the persistence of vision. So I put the minipov board on a piece of flat aluminum and connected it to a 9 volt hobby motor.


Mini POV


Then put a model airplane prop drive adapter on the motor. I drilled a whole in the center of the aluminum and secured it to the motor with the prop drive adapter and just powered it with a 9 volt battery.

I added a hall effect sensor to the minipov so the minipov could sync up with the rotation of the motor. I used ladyadas spokepov code as a reference for how to sync with a hall effect sensor. The hall effect sensor is rated for 3.5 volts, but it will work at 3 volts. My batteries got a little low and the sensor started missing the magnet. It took me a while to figure out that all I needed to do was get a fresh set of batteries (I spent over an hour repositioning the magnet and sensor).


MiniPOV

I ordered the Minipov kit from adafruit. POV stands for persistence of vision. Basically flashing seperate images fast enough to make them look like motion.

The kit uses 8 red leds. It is pretty simple to build, it only took about 45 minutes to solder together. It took a little more time than that to install all of the software onto my linux box.

Getting the minipov to display a readable image took some work though. Waving the thing as fast as I could would sort of make a readable image. I slowed the blink rate down some and that helped.


Watchdog on soekris

I finally got the hardware watchdog working on my Soekris Net4511. The Soekris box runs my webcam and X10 stuff. I installed Voyage linux on the box. The default sc520_wdt does not work with the watchdog on the Net45* boxes. I found a patch to apply. I didn't write the patch, I found it from a post by Jakub Schmidtke.

Update: It turns out Punky does have this patch in the default build of Voyage linux. I just happened to download a snapshot of voyage that didn't include the patch. Anyway if you want watchdog support on a net4511 give voyage a try. It is a pretty good distro.