TD Moose
All things moose, and, then some.-
Go bananas for bananas4apples!
Posted on March 31st, 2009 No commentsHelp out a friend of mine to get his blog off the ground.
In his words, “It’s a place to learn cool stuff about your Apple computer and Leopard.”
Check out the site at bananas4apples.
-
Extinguishing a kitchen fire
Posted on February 17th, 2009 2 comments
Bottom line is not to throw water onto this type of fire.
-
Re-inventing the scale.
Posted on February 7th, 2009 No commentsMust have been a long winter stuck inside to try something like this. The idea was to make a scale using a couple of pennies and conductive foam used for packing electronic parts. The first thing was to solder some wire onto pennies. I used a torch instead of a soldering iron because pennies can soak up a lot of heat.

Pennies with hookup wire soldered to them. Foam is packing from a power MOSFET.
The next step was cut some plexiglass sheets and then use some double stick tape to attach a penny to each sheet. Then I bolted the two sheets together, presssing the foam in between. Here’s the assembled unit.

Platform assembled, and hooked up to ohmmeter to test base resistance.
This setup didn’t work out so well as a scale. Heavier objects placed on the scale took a long time to reach a stable value. I figure that the foam continued to compress slightly for two minutes or more. Also, it took a similar amout of time for the scale to return to it’s base value.
This arrangement seems to work best not as a scale, but as a pressure pad, particularly as a pressure-relief pad. For example, it might work well to sense when an object, such as a book, is lifted. Don’t anyone dare try to steal my “Programming Python book!”
-
JavaScript Frameworks
Posted on February 3rd, 2009 1 commentHere are a couple of excellent post regarding the use of JQuery vs Mootools.
Three real good reasons to use JQuery, from a Mootools lover
-
Power MOSFET tutorial
Posted on February 3rd, 2009 No commentsBest short description of how to use
power MOSFETS that I’ve ever found.Now I know why the power sucking pig of an electomagnet I made from hookup wire and a nail is so hard to drive with a power MOSFET.
Also, shows why sometimes you are better off just buying controller chips that do the job you want than to try to roll the circuitry yourself with discreet components.
-
Arduino controlled arm
Posted on January 30th, 2009 No commentsControlling 3 motors with an Arduino board.
I dug out an old robot arm kit that I had built a long time ago. It was originally operated by push buttons for each motor with a slide switch to reverse the polarity of the current and thus the direction of the motor.
With an Arduino module, a couple of H-bridge chips, and a bit of surfing for ideas, I managed to automate it to drop a washer in a small container. The main idea comes from this page page, which describes how to hook up and control one motor. Learning to control two motors is largely inspired by this diagram.
Here it is in action. I had bigger plans for what it would do, but, it is after all, just a cheap kit with plastic parts. The jaws barely have enough grip to hold a small washer. It is a good proof of concept for controlling multiple motors with a single arduino board.


Wiring code for robot arm
[code lang="java"]
int motor1Pin1 = 3; // H-bridge leg 1
int motor1Pin2 = 4; // H-bridge leg 2
int motor1SpeedPin = 9; // H-bridge enable pin
int motor2Pin1 = 5;
int motor2Pin2 = 6;
int motor2SpeedPin = 10;
int motor3Pin1 = 7;
int motor3Pin2 = 8;
int motor3SpeedPin = 11;int ledPin = 13; //LED
void setup() {
// set all the other pins you're using as outputs:
pinMode(motor1Pin1, OUTPUT);
pinMode(motor1Pin2, OUTPUT);
pinMode(motor1SpeedPin, OUTPUT);
pinMode(motor2Pin1, OUTPUT);
pinMode(motor2Pin2, OUTPUT);
pinMode(motor2SpeedPin, OUTPUT);
pinMode(motor3Pin1, OUTPUT);
pinMode(motor3Pin2, OUTPUT);
pinMode(motor3SpeedPin, OUTPUT);pinMode(ledPin, OUTPUT);
// set speedPin high so that motor can turn on:
digitalWrite(motor1SpeedPin, HIGH);
digitalWrite(motor2SpeedPin, HIGH);
digitalWrite(motor3SpeedPin, HIGH);// blink the LED 3 times. This should happen only once.
// if you see the LED blink three times, it means that the module
// reset itself,. probably because the motor caused a brownout
// or a short.
blink(ledPin, 3, 100);
}void loop() {
delay(5000);
digitalWrite(motor2Pin1, HIGH); // Arm up
digitalWrite(motor2Pin2, LOW); //
delay(1000);
digitalWrite(motor2Pin1, LOW);
delay(500);digitalWrite(motor3Pin1, LOW); // Arm left
digitalWrite(motor3Pin2, HIGH); //
delay(2500);
digitalWrite(motor3Pin2, LOW);
delay(500);digitalWrite(motor2Pin1, LOW); // Arm down
digitalWrite(motor2Pin2, HIGH); //
delay(1100);
digitalWrite(motor2Pin2, LOW);
delay(500);digitalWrite(motor1Pin1, HIGH); // open jaws
digitalWrite(motor1Pin2, LOW); //
delay(4000);
digitalWrite(motor1Pin1, LOW);
delay(500);digitalWrite(motor2Pin1, HIGH); // Arm up
digitalWrite(motor2Pin2, LOW); //
delay(1000);
digitalWrite(motor2Pin1, LOW);
delay(500);digitalWrite(motor3Pin1, HIGH); // Arm right
digitalWrite(motor3Pin2, LOW); //
delay(2000);
digitalWrite(motor3Pin1, LOW);
delay(500);digitalWrite(motor2Pin1, LOW); // Arm down
digitalWrite(motor2Pin2, HIGH); //
delay(1100);
digitalWrite(motor2Pin2, LOW);
delay(500);
}/*
blinks an LED
*/
void blink(int whatPin, int howManyTimes, int milliSecs) {
int i = 0;
for ( i = 0; i < howManyTimes; i++) {
digitalWrite(whatPin, HIGH);
delay(milliSecs/2);
digitalWrite(whatPin, LOW);
delay(milliSecs/2);
}
}[/code]


