I have started to build an obstacle avoiding buggy but I have found two issues.
The buggy doesn't seem drive perfectly straight when powered. Could this be due to the servos having a slight variation in the way they are attached? Its a very gentle, gradual turn.
I am using an ultrasonic sensor to detect obstacles but the version I have has four connectors but the unit on the model I have based it on only has three. How to I attach it? Where do the Trig, Echo wires go?
If you provide some detail of your buggy and the components you're using (preferably links to datasheets/specifications) and the code you're using it will be easier to help. E.g. what servos? Are these driving the thing or just steering it? Which sensor?
I am using an ultrasonic sensor to detect obstacles but the version I have has four connectors but the unit on the model I have based it on only has three.
Every component in your servos are built to some tolerance. In consequence, no two servos are ever likely to be exactly the same. Your buggy will never drive straight without some help. Wheel slip will be an issue too.
The buggy doesn't seem drive perfectly straight when powered. Could this be due to the servos having a slight variation in the way they are attached? Its a very gentle, gradual turn.
Perfectly normal! Even an expensive high-precision engineered buggy/robot will not move in a straight line. It needs to be guided in a straight line with sensors of some kind and the motor speeds constantly adjusted.
TheMemberFormerlyKnownAsAWOL:
The HC-SR04 has four pins.
You have something else.
Post pictures
Yes, that's the component have but I am just unsure of where all the connections go as the project I am basing this on is using a mkpx5 sensor, which has three pins. It's in the book, Make: Arduino Bots and Gadgets, the insect Bot project.
wildbill:
Every component in your servos are built to some tolerance. In consequence, no two servos are ever likely to be exactly the same. Your buggy will never drive straight without some help. Wheel slip will be an issue too.
PaulRB:
Perfectly normal! Even an expensive high-precision engineered buggy/robot will not move in a straight line. It needs to be guided in a straight line with sensors of some kind and the motor speeds constantly adjusted.
Thanks for the replies.
Well, there's some lessons learnt right there! Appreciated!
colstar:
Yes, that's the component have but I am just unsure of where all the connections go as the project I am basing this on is using a mkpx5 sensor, which has three pins. It's in the book, Make: Arduino Bots and Gadgets, the insect Bot project.
mkpx5 is a Ping))) sensor, I think.
Plenty of source examples for that.
You can probably make it run straighter, but not actually straight over any distance. Think about driving a car and taking your hands off the wheel. It won't be long before you're heading off the road.
You can probably make it run straighter, but not actually straight over any distance. Think about driving a car and taking your hands off the wheel. It won't be long before you're heading off the road.
sounds like you live in New Mexico. if you get a wheel alignment here, it won't last until you get home.
wildbill:
You can probably make it run straighter, but not actually straight over any distance. Think about driving a car and taking your hands off the wheel. It won't be long before you're heading off the road.