Tag Planet Ubuntu-DK

25 maj


Ford 3000 Tractor Instrument Voltage Stabilizer – Mechanical PWM!


Some time ago we bought a nice used Ford 3000 tractor (3 cylinder diesel, Chief frontloader). It needed some work, and one of the items was a new wiring harness. After replacing all the wiring everything seemed to work fine, until one day all the instruments just died; this being a mechanical beast everything else kept working. After quite some investigation, I found out that the instrument fuse (the only fuse in the entire system) had blown. Replacing it just blew it again, so something was clearly wrong. This lead to taking out the so-called “instrument voltage stabilizer”, and disassembling it.

Apparently I had connected it in such a way that the arm had raised itself, and was now short-circuiting to the case. I had already ordered a replacement, but only got what was essentially a very expensive connection:

So, what was the mechanism actually doing, and is it essential? After some headscratching at Hal9k the conclusion was that it was essentially a mechanical PWM, with something like this diagram

When the switch is touching the terminal current is flowing from the battery (B) to the instruments (I), but also to ground (E) through the resistor wrapped around the switch arm, causing the metal in the switch to heat up and lift. This breaks the connection, whereafter the switch cools down, and at some point makes contact again. Beautifully simple mechanism! Bending the arm back into position essentially fixed the device, and gave this waveform

I have seen the function described online as “pulsating DC”, which is actually quite accurate. So, I re-assembled the stabilizer with some sealant, inserted in the instrument cluster of the tractor, and it has worked perfectly ever since.

The only question is why it is done this way, if just giving a constant DC voltage from the battery also seems to work? I haven’t looked into it further, but my best guess is that the instruments are using coils to move the dials slowly, and that the PWM will heat up the coils less. In conclusion: If your voltage “stabilizer” is broken, you can probably do without it, or quite easily repair it.

For reference, here are the resistance readings between B-E, and I-E:

Gemt under: Extern, HAL9k

Tags: ,

17 jun


Roomba 500-series Easy Scheduling using an Arduino


I have a iRobot Roomba 500-series vacuum cleaner robot, but without any remote, or command center or anything; alas, I have to push a button everytime I want the cleaning revolution to start :-(

But no more! It turns out the Roomba can be programmed, quite easily, to schedule automatically, and all you need is:

  • 1 Arduino
  • 2 wires

The Roomba actually supports a serial protocol, the iRobot Roomba 500 Open Interface Specification, that allows remote control, driving, sensoring, and scheduling.

Finding the serial port

Remove the plastic cover. It is easiest to remove the vacuum bin, and carefully pry it off with a screwdriver.

There should be a 7-pin plug, on the right side. It has the following pinout:

Roomba serial pinout

Roomba serial pinout

Program the Arduino

Use this sketch (download: roombaschedule.ino):

Set a schedule on an iRobot Roomba 500 series, using just an Arduino.
Mads Chr. Olesen, 2015.

const byte currentDay = 3;
// 0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday
const byte currentHour = 2;
const byte currentMinute = 58;

// Schedule
const byte SUNDAY = 0x01, MONDAY = 0x02, TUESDAY = 0x04, WEDNESDAY = 0x08, THURSDAY = 0x10, FRIDAY = 0x20, SATURDAY = 0x40;

const byte daystorun = SUNDAY | MONDAY | WEDNESDAY | FRIDAY;
const byte times[14] = {
3, 0, // Sunday time
3, 0, // Monday time
3, 0, // Tuesday time
3, 0, // Wednesday time
3, 0, // Thursday time
3, 0, // Friday time
3, 0, // Saturday time

const int ledPin = 13;

void setup() {
pinMode(ledPin, OUTPUT);
digitalWrite(ledPin, 0);

Serial.write(128); //Start
Serial.write(131); //Safe mode, turns off Roomba light
Serial.write(128); //Start, back to passive mode

//Set day time

//Set schedule
for (int i = 0; i < 14; i++) {

void loop() {
digitalWrite(ledPin, 1);
digitalWrite(ledPin, 0);

You need to modify the variables at the top: set currentDay, currentHour, currentMinute according to the present time.
The pre-programmed schedule is to clean at 03:00 on Sunday, Monday, Wednesday and Friday. You can change this if you wish, by altering the daystorun and times variables.

If you don't modify the schedule, the Roomba should start automatically after 2 minutes.

Put it all together

You should now have a partially undressed Roomba, and a programmed Arduino. Now it is time to connect them. With both unpowered, connect the following:

  • Arduino GND to Roomba ground (pin 6)
  • Arduino TX (pin 1 on e.g. Uno) to Roomba RX (pin 3)

It should look like this:


Now, the moment of truth. Press the "CLEAN" button on the Roomba, the light should go on. Plug in the USB for the Arduino. The Roomba light should turn off briefly, and after a few seconds the Arduino should blink it's LED. The schedule is now programmed, all done!

Gemt under: Extern, HAL9k

Tags: ,