Here is a new video of the HummBot. As you can see in the video, I unmounted the IR sensors from the servos and moved them to the front and back bumpers of the HummBot. This way they can be used as short distance (25 cm) object detectors.
I have ordered ultrasonic sensors (at Sparkfun.com) for longer range object detection. These will be mounted on the servos to scan a wide area (1-2 meters) in front of the HummBot.
Another thing that needs attention is speed control. First I want to buy/build an encoder to measure the travelled distance. This is highly needed since the ESC is very inaccurate, resulting in unpredictable distances.I am still thinking about the correct mounting place for an encoder. Suggestions are welcome!
Next to that I am considering to replace the motor with a high torque motor which will make it easier to drive at slow speeds. Currently this is very difficult since there is a subtle balance between driving slow and stalling the motor.
Friday, December 28, 2007
Sunday, December 23, 2007
HummBot Platform
This weekend I did some work on the HummBot platform. Basically the platform consists of two layers: the bottom layer which contains the steering servo, the ESC and the battery pack and the upper layer which provides space for the Arduino, the breadboard and two servo controlled IR sensors.
Being assembled it looks like this:




The servo controlled IR sensor are just at the right height such that they can 'look out of the window' of the HummBot. This is what it looks like with the body:




I'm currently finished the code that will control the servos and sensors such that HummBot can start avoiding obstacles!
Being assembled it looks like this:
The servo controlled IR sensor are just at the right height such that they can 'look out of the window' of the HummBot. This is what it looks like with the body:
I'm currently finished the code that will control the servos and sensors such that HummBot can start avoiding obstacles!
Friday, December 21, 2007
HummBot changes direction
Because the previous HummBot video was very dark, I've made another video in day light. Also the HummBot can change direction now since the Arduino controls the steering servo of the HummBot!
As you can see in the video, the HummBot clearly needs some sensors to prevent it from hitting obstacles :-)
Don't hesitate to give me some feedback. I'm very interested in hearing your opinion and improvement ideas!
This is the microcontroller code that I used for this video:
1: int ledPin = 13;
2: 3: int servoPin = 4;
4: int rightPulse = 1900;
5: int neutralPulse = 1500;
6: int leftPulse = 1100;
7: int servoPulse = neutralPulse;
8: 9: int escPin = 2; // Control pin for the ESC
10: int forwardPulse = 1565;
11: int previousDirection = neutralPulse;
12: int backwardPulse = 1420;
13: int escPulse = neutralPulse;
14: 15: long lastPulse = 0; // the time in milliseconds of the last pulse
16: int refreshTime = 20; // the time needed in between pulses
17: 18: int waitTime = 2000;
19: long lastChange = 0;
20: 21: void setup() { 22: pinMode(escPin, OUTPUT); 23: pinMode(servoPin, OUTPUT); 24: servoPulse = neutralPulse;
25: escPulse = neutralPulse;
26: pinMode(ledPin, OUTPUT); 27: Serial.begin(9600);
28: } 29: 30: void loop() { 31: 32: if (millis() - lastChange >= waitTime) {
33: // Important: to callibrate the ESC, start with a neutralPulse of 2 sec.
34: // Drive backwards, forwards, backwards, forwards, ...
35: if (escPulse == neutralPulse) { 36: if (previousDirection == forwardPulse) { 37: escPulse = backwardPulse;
38: } else { 39: escPulse = forwardPulse;
40: } 41: if (servoPulse == neutralPulse || servoPulse == rightPulse) { 42: servoPulse = leftPulse;
43: } else { 44: servoPulse = rightPulse;
45: } 46: waitTime = 2000;
47: } else if (escPulse == backwardPulse) { 48: escPulse = neutralPulse;
49: previousDirection = backwardPulse;
50: waitTime = 1000;
51: } else if (escPulse == forwardPulse) { 52: escPulse = neutralPulse;
53: previousDirection = forwardPulse;
54: waitTime = 1000;
55: } 56: // Debugging:
57: if (Serial.available() > 0) {
58: Serial.print(escPulse, DEC);
59: Serial.print(" ");
60: } 61: lastChange = millis(); 62: } 63: 64: // send pulses at 50Hz:
65: if (millis() - lastPulse >= refreshTime) {
66: digitalWrite(escPin, HIGH); 67: delayMicroseconds(escPulse); 68: digitalWrite(escPin, LOW); 69: digitalWrite(servoPin, HIGH); 70: delayMicroseconds(servoPulse); 71: digitalWrite(servoPin, LOW); 72: lastPulse = millis(); // save the time of the last pulse
73: } 74: }
Thursday, December 20, 2007
Wednesday, December 19, 2007
HummBot drives!
Thanks to a lot of help from the people at the Society of Robots and Arduino forums I have completed the second phase of the HummBot project. HummBot is now able to drive autonomously, controlled by the Arduino processor.
I used the following components:
In this first setup the HummBot drives forward for 2 seconds, then backwards for 2 seconds, then forwards again, and so on...
Here is a first picture, I will make a video shortly.

The next step will be to create a proper platform in the HummBot chassis to attach the Arduino and breadboard to. After that I will of course combine the servo, IR sensor and motor control to let the HummBot drive around some more!
I used the following components:
- Arduino controller,
- a Graupner electronics speed controller (ESC),
- a breadboard,
- a 7.2V battery pack.
In this first setup the HummBot drives forward for 2 seconds, then backwards for 2 seconds, then forwards again, and so on...
Here is a first picture, I will make a video shortly.
The next step will be to create a proper platform in the HummBot chassis to attach the Arduino and breadboard to. After that I will of course combine the servo, IR sensor and motor control to let the HummBot drive around some more!
Saturday, December 15, 2007
My first HummBot circuit
Today I started my first preparations for the HummBot electronics. I have created a circuit using the following components:

The IR sensors are connected to the 5V, Gnd and one of the analog pins.
The Servo is connected to the Vin (7.2V), Gnd and one of the digital pins.
I created a program that checks both sensor values, and if the right sensor detects something the servo is turned right and if the left sensor detects something the servo is turned left.
Very basic, but nice to start with!
- Arduino controller
- one Hitec Servo
- two Sharp IR sensors
- a breadboard
- a 7.2V battery pack
The IR sensors are connected to the 5V, Gnd and one of the analog pins.
The Servo is connected to the Vin (7.2V), Gnd and one of the digital pins.
I created a program that checks both sensor values, and if the right sensor detects something the servo is turned right and if the left sensor detects something the servo is turned left.
Very basic, but nice to start with!
Wednesday, December 12, 2007
Arduino has arrived!
Today my new microcontroller and IR sensors have arrived! I ordered these 9 days ago at Robotshop.ca.

The microcontroller is the Arduino Diecimila and the IR sensors are Sharp GP2D15 sensors. I plan to use the Arduino and IR sensors for my new HummBot project. The Sharp IR sensors will be used as proximity detectors. Their default range is 24 cm, but they can be configured to a range between 10 and 80 cm.
The Arduino has a nice small size, so it will perfectly fit in my HummBot car. I plan to power it by a 7.2V accu pack that also powers the DC motor of the HummBot. This weekend I will start the first prototyping. To be continued!
The microcontroller is the Arduino Diecimila and the IR sensors are Sharp GP2D15 sensors. I plan to use the Arduino and IR sensors for my new HummBot project. The Sharp IR sensors will be used as proximity detectors. Their default range is 24 cm, but they can be configured to a range between 10 and 80 cm.
The Arduino has a nice small size, so it will perfectly fit in my HummBot car. I plan to power it by a 7.2V accu pack that also powers the DC motor of the HummBot. This weekend I will start the first prototyping. To be continued!
Subscribe to:
Posts (Atom)