Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

Cruise Control of a Lego motor using PIC16F877 and TC4427A

Cruise Control of a Lego motor using PIC16F877 and TC4427A

The Lego motor is controlled using a feed back mechanism to influence the pulse width modulation.
On the shaft of the motor the rotation speed is measured. This measurement is used to control the power to the motor or rather to modify the width of the PWM pulse. If for some reason the motor slows down (for example because you’re pinching the axis with your fingers) the PIC will increase power to the motor until the speed reaches it’s set point again.

Main difficulty in this project is the deviation between the real world and mathematical PIC precision. The first challenge is how to get a feedback signal. I took one of the Lego wheels and glued a piece of paper with 50% black and 50% white on it. As a sensor the Fairchild QRB134 infrared photo reflector was used. It is equipped with a special daylight filter so it pretty much reacts to it’s own (infrared) light only. And it is conveniently small (2/3 of a brick high). Being Dutch the price (1.50 $US) is quite nice too. The data sheet is not at all clear about the way it should be connected, so I fried the first one because I thought the resistor was integrated.

Visit Here for more.

 

More Articles to Read

Robotic Cat Laser
Robotic Cat Laser
LED traffic light
LED traffic light
Estimating Power for ADSP-BF561 Blackfin® Processors
Estimating Power for ADSP-BF561 Blackfin® Processors
Teach Your Arduino to Switch Itself Off!
Teach Your Arduino to Switch Itself Off!
Control a tracked robot with your mind (or joystick)
Control a tracked robot with your mind (or joystick)
A 400W (1kW Peak) 100A electronic load using linear MOSFETs
A 400W (1kW Peak) 100A electronic load using linear MOSFETs
Shirt Pocket Transceiver with the Si5351 and OLED
Shirt Pocket Transceiver with the Si5351 and OLED
All metal C930e webcam
All metal C930e webcam
The Soldering Tools That Make Your Life Easier
The Soldering Tools That Make Your Life Easier
App note: Operation evaluation of ultra low ON resistance MOSFET supporting quick charge for 1 c ...
App note: Operation evaluation of ultra low ON resistance MOSFET supporting quick charge for 1 cell Lithium ion battery protection

Top




Shares