hello. me and my friends are entering in a competiton in a week and we need help with a project.we are beginners in arduino but still want to do something more complex(at least for us)
we thought about a line following car.this car should recharge its battery every minute(for example).
we have a recharging point.the car should drive in a circle.let’s say a full circle drive through is 2 minutes.we want that the car should know when to stop to recharge.
for example.if the car has 10 seconds left of battery ,it should know that it can’t drive another round and it stops to recharge.
my first question is,what should we use to measure the distance between the car and the recharge point (bluetooth,infrared etc…)?
second: does anyone has an ideea for the soft?
third:what stuff should we buy ?
Hi,
If the path of your car is not a straight line, using a distance sensor might not yield useful information about how far the charging station is. Since you mentioned following a line, you could encode in the line a pattern to indicate distance such as a dotted line:

Such a line can be used to both figure out where to go and at the same time know the distance moved by counting the spaces/line sections.
If you cannot have such a line or are not allowed to do so, you can instead have wheel encoders / disks (such as this) on your robot. They should provide a rough estimate of how much you have moved (provided your robot does not slip / get stuck against a wall). Of course, it would be best to be able to reset the error accumulated by those from a known position, such as a starting or ending position on your line/track.
Concerning your battery, you could always simply estimate the charge based on the time since last full charge compared to the average drain. If the battery drain is too inconsistent, the simplest way would be to monitor the voltage of the battery directly using on of the Arduino’s ADC pins. If the maximum voltage is too high for the Arduino ( > 5 V DC ), which is likely, a common way to monitor it anyways would be through a voltage divider. Simply make sure that the maximum voltage of your battery pack is lower than 5 V DC after the voltage divider, so that you do not damage the Arduino’s ADC pins.
All being said, this is not a trivial integration of sensors and code and we greatly recommend that you do a few online searches for similar projects (that hopefully provide source code) and see how other people have done this before.
We hope this helps.
Sincerely,
Thank you for your advice. I’ll see what I can do.
Yours sincerely,
Alexandru Orban.