Archive for October, 2009

Scary George. (driving a floppy drive stepper with the Arduino/Wiring platform)

Tuesday, October 27th, 2009

I wanted to quickly demonstrate using a stepper motor from a floppy drive with the Arduino/Wiring platform as a follow up to the weekend’s workshop. By the time we got to the stepper parts I was a bit scattered. So here is an example that I set up yesterday.

I have a talking George Bush doll from several years ago that was ripped in half (by people watching my punk band (w.busholini.org)) so I went ahead and finished dismantling it. For Halloween I thought his head should turn around Linda Blair style.

I wired up a ULN2803 Darlington array and a floppy drive stepper motor from the workshop as shown in the diagram above .

I figured out which wire was the common wire by taking an ohmmeter to the wires on the stepper. Most of the combinations were about 150 except from one of the wires on the end that read 75 ohms. Checking the 75 against all of the other wires I was able to determine that one of the wires was the common one and marked it with a sharpie.

Then I ran up the arduino (v 17) example program for the stepper library. I modified it so that it just made steps in one direction. When I ran it the motion was really jittery so I checked to make sure that my wiring was good and then rather than rewiring the stepper physically I changed the line in the code from

Stepper stepper(STEPS, 9, 10, 11, 12);

to

Stepper stepper(STEPS, 9, 11, 10,12);

And Whah La! his head started spinning just like he was possessed by Dick Cheney! I wired the talk button to pin 8 and then added some random delays which gave me the following.

#include <Stepper.h>

// change this to the number of steps on your motor
#define STEPS 100
int relayPin=8;
int ledPin=13;
// create an instance of the stepper class, specifying
// the number of steps of the motor and the pins it's
// attached to
Stepper stepper(STEPS, 9, 11, 10,12);

// the previous reading from the analog input
int previous = 0;

void setup()
{ pinMode(relayPin,OUTPUT);
  pinMode(ledPin,OUTPUT);
  // set the speed of the motor to 30 RPMs
  stepper.setSpeed(100);
}

void loop()
{
  // get the sensor value
  int val = analogRead(0);

  // move a number of steps equal to the change in the
  // sensor reading
  //stepper.step(val - previous);
digitalWrite(ledPin, HIGH);
stepper.step(random(5,90));
delay(random(60,2000));
digitalWrite(relayPin, HIGH);
delay(20);
digitalWrite(relayPin, LOW);
digitalWrite(ledPin, LOW);
stepper.step(-random(15,200));
delay(random(90,3000));
  // remember the previous value of the sensor
  previous = val;
}

Motors and Servos and Solenoids, OH MY (rev2).

Monday, October 19th, 2009


On Sunday the 25th I am going to do an animtronicx workshop covering driving
motors, servos and relays with the arduino/wiring platform.
I will be covering the a couple of popular chips: The l293D for
driving motors , and the ULN2803 darlington array for driving relays,
stepper motors and other devices.
The workshop will cost $35 and will include these chips, a motor, a standard sized servo and a board for the motor driver.

The idea is to get as much hands on and working as possible so please
bring your arduino,freeduino,teensy,or dorkboard, a soldering iron, some wire and your
laptop and we will get our hands dirty.
I am limited to 25 on this one so please RSVP as soon as possible.


http://tempusdictum.com/tdproducts.html

This will be in room 205 at PNCA (NW 12th and Johnson) from 1-5 pm.

Arduino Cult Induction, Techshop Session. 11 October 2009

Tuesday, October 6th, 2009

http://opentechspace.org/2009/09/21/arduino-cult-induction-workshop-1-5pm-oct-11/