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

App note: EPIC: Electro-Pyrotechnic Initiator Chip Resistor
App note: EPIC: Electro-Pyrotechnic Initiator Chip Resistor
App note: Noise analysis for high-speed op amps
App note: Noise analysis for high-speed op amps
Skill Sunday: Arrays
Skill Sunday: Arrays
App note: Infrared remote control implementation with MSP430FR4xx
App note: Infrared remote control implementation with MSP430FR4xx
Gesture Controlled Smart Home
Gesture Controlled Smart Home
Design for a Wideband, Differential Transimpedance DAC Output
Design for a Wideband, Differential Transimpedance DAC Output
Wrist thrusters let you fly through the water effortlessly
Wrist thrusters let you fly through the water effortlessly
Bertan/Spellman 225-20R HV power supply teardown
Bertan/Spellman 225-20R HV power supply teardown
Blinking Christmas Lights
Blinking Christmas Lights
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adding an “extra sense” with rangefinders
Adding an “extra sense” with rangefinders
This wireless game controller looks like a rug
This wireless game controller looks like a rug
How to run your ESP8266 for years on a battery
How to run your ESP8266 for years on a battery
Calibration of a 3-Phase Energy Meter Board on the ADE7754
Calibration of a 3-Phase Energy Meter Board on the ADE7754
Making beats on a tiny Arduino DJ controller
Making beats on a tiny Arduino DJ controller
Qinsi-QS5100 Sn63Pb37 solder profile
Qinsi-QS5100 Sn63Pb37 solder profile
Water Detection System
Water Detection System
Professional Hi-Fi 15W Tube Amplifier circuit
Professional Hi-Fi 15W Tube Amplifier circuit
This Arduino machine will judge how sick your ollies are
This Arduino machine will judge how sick your ollies are
Turn an old payphone into a boombox for ’90s hits
Turn an old payphone into a boombox for ’90s hits

Top


Shares