Why put the flame sensor on a servo? To avoid DC motor noise and ensure precise control of the scan. At slower speeds pulse width modulation is imprecise. On the other hand, with a servo, once you find the candle it's hard to point the robot body properly unless your robot uses encoders. Even so it is another challenge.
The answer: repeated, short bursts of high duty cycle to the motors, reading the flame sensor in between. Result: a granular, smooth scan. Find the candle, then drive forward. Simple. So I can ditch the flame servo and solve one clearance problem, and mount the flame sensor on the 3rd deck.With Servo 2 gone, the controller has a better home, wiring is simplified, and now the robot is modular. Swap on a purpose-built top deck for specific tasks.
nice... I was wondering how easy it is to aim a bot using a sensor mounted on a servo like you described
ReplyDeleteis it difficult? could you post the code you used to conver sensor readings into motor controlling output?
Hey Jim, thanks for the notes. :) No pictures exist of my fried hair :)
ReplyDeleteAnyway, I never wrote any code to align the robot to the direction the servo. It just *seems* like a hard problem when you don't have encoders on your bot to help make up for changes in battery voltage, traction, etc. It seemed like a harder problem than I wanted to tackle. I'll share some code for the flame scan once I am done with it (and... after the contest is over of course) :)