Robot Hansen

Out of pure frustration with the fact that my LEGO MINDSTORMS NXT based robot, that was supposed to participate in DTU robocup, turned out to be crap, I thought that I'd try to at least get a decent line follower ready for robocup. This robot is based on my R/C car - an HBX Bonzer Monster Truck XTI - and it will only be able to follow a black line and hopefully also be able to handle line branches.

To start with I was going to build a line sensor based on 8 infrared detectors for 36 KHz modulated infrared light. There were some problems with that so I decided to go for 4 regular infrared photodiodes instead. It is my plan that I will estimate robot position relative to the line by interpolating values between the 4 sensors to get a smooth steering - maybe I will use PD-regulation for this if I have the time.

For controlling the car I'm interfacing the LM-406FB speed controller that came with the car. It is controlled by sending standard servo signals to it, but it does some fancy interpretation of the sequence of signals so one has to be cautious or the car maybe not work the way one intended. For steering the car I'm just using the standard servo that is in the car.

I think maybe I need to get a gear reduction unit for the car, since it goes really fast and I think the robot will be impossible to control at high speed - it tends to skid around when going fast. I'm looking at a 4:1 gear reduction unit which can be bought through eBay.

Friday 28th of March, 2008

I have made the base for the line sensor by cutting a perforated board to a shape that will fit nicely onto the car and can be held in place by a couple af screws that already hold the front bumper in place (I think I might some longer screws though since they just barely hold the board):

Now I just to populate the board with some fancy components that will make the bloody thing work!

Line following for DTU Robocup

  • Actuators / output devices: 560 sized motor for propulsion and standard servo for steering (ackermann steering)
  • Control method: autonomous
  • CPU: PICAXE 40X1
  • Power source: 7.2 V 3300 mAh racing pack
  • Programming language: Picaxe basic
  • Sensors / input devices: Line sensor with 4 IR photodiodes
  • Target environment: indoor, DTU RoboCup

This is a companion discussion topic for the original entry at


I’d which someone some day would find out 100% how to control the LM-406FB.

Maby you, maby now?

Perhaps not standard servo pulses, perhaps something else, should that be the key?

Has someone where you are got an oscilloscope, so you can check what the darn thing originally received from your RC-receiver, and then compare with the pulses you send??

I would love to see that nut cracked! Would mean a new area to motor-controlling!

/ Frits

I think that it must be

I think that it must be standard servo signals since you can replace the LM406FB with a standard servo and it then just works. The old Tamiya car I have besides the monster truck doesn’t have a speed regulator but instead a servo pulling a mechanical arm between electrical plates and this setup can essentially be replaced by a speed regulator.

You have to be aware of the interpretation of the servo signal that the speed regulator does. For example it will interpret a rapid change from forward to reverse as braking which would be very annoying if you didn’t expect it.

- Jimmy

Hey, smooth print! :D/ Frits

Hey, smooth print! :smiley:

/ Frits

Awsome, in the start of the

Awsome, in the start of the new video, it sounds as if it is an old tractor starting :smiley: Thought you had made a petrol driven robot there for a short while :smiley:

/ Frits

Hehe, it does sound like a

Hehe, it does sound like a cranky old diesel engine starting up. Awesome.

That seems to perform quite well – I had trouble getting my R/C car-based robot to work, but yours looks like it has a lot more potential. Looking forward to seeing it in operation. And yeah, the speed was a problem with me too. I just modified my code to give little tiny bursts of throttle every once in a while (like really slow PWM) but it wasn’t the best solution. A gear reduction would definitely work better.


good… keep the nice work…
good… keep the nice work… =)



Sorry to revive such an old post, but i’m really having trouble with an LM406FB… I try to command it like an usual servo, it tends to start, runs intermittent and if I try to reach full throttle it will beep continuously and the stop. Is there any special procedure to arm this ESC? I’ve set the Neutral, Throttle and Break and accepted all the commands. But when i try to run it, it behaves very strange, like a FET is not working or something…

Best regards,


Hi florintoma (and sorry for

Hi florintoma (and sorry for the late reply)

The LM406FB has four distinct states: forward, reverse, neutral and brake. Brake is activated by going from forward to reverse “fast enough”. If you’re not aware of this, it can seem like the controller is not working properly. Other than the braking functionality there really isn’t anything special about it. It acts on normal servo signals, since it’s interchangeable with a regular servo motor (back in the day, the speed was regulated by a servo pulling a metal arm back and forth between different contacts - at least that’s how I remember the older Tamiya R/C cars)

I would try and connect it to a “real” servo receiver with remote (if you have one of those) and test to see if it behaves correctly. If it does, then you should check the way you interface with it.

Are you using 5V for the servo signal and supplying the LM406FB with the battery voltage and common ground? Are you sending the servo signal correctly? It should be 1 pulse lasting from ~1 ms to ~2 ms every 20 ms.