How to detect contact between two toy cars

Hi, I'm looking for ideas on how to detect contact between two Arduino controlled toy cars.

Each car would have it's own battery power supply and Arduino.

I need to be able to detect the difference between contact with the other toy car and contact with other objects (like walls and furniture).

Examples would include a contact sensor. But I don't know if I can have a contact sensor across 2 circuits.

A capacitance sensor made of aluminum foil. I've read that this doesn't work well will battery power. May not be true.

Any ideas?

What is a"contact sensor"?

You might use an accelerometer, as collision detector, detecting rapid changes in speed or maybe(!) G-forces.

For a non-technical approach, a strip of velcro wrapped around each.

CompSci:
I need to be able to detect the difference between contact with the other toy car and contact with other objects (like walls and furniture).

I see several problems here. The cars could make contact at a wide variety of different places on both cars - for example left front corner contacts right rear corner. How can you sense contacts in a wide range of places? Even if you had (say) 8 contact sensors mounted around each car how could you tell whether the sensor was triggered by the other car or by a wall?

You might be able to use an accelerometer module to detect impacts but it could not tell the difference between contact with the other car or contact with a wall. And it may have difficulty distinguishing gentle contacts from the normal disturbances caused by acceleration, braking and steering.

Maybe you could put a pair of metal bands around both cars arranged so that the bands on one car touch the bands on the other car when the cars come into contact. On one car both bands would be connected to GND. On the other car one band would be GND and the other connected to an I/O pin set as INPUT_PULLUP. When they touch the car with the I/O pin would register the contact. (Heath-Robinson and Rube Goldberg live on :slight_smile: )

...R

Thanks for the idea. Can you have the current of one circuit (car 1) be grounded by another circuit (car 2)? Wasn't sure if that would fry the Arduino.

The metallic band around the cars seems like the best approach. What if the car crashed in to a metal chair or railing? Would that act as ground in some way?

Please describe the toy cars. Are they identical physically and electrically? Do the cars have a body separate from a frame, like a real car? Are the bodies metal?

You can use a tilt sensor on a flexible post to detect the car impacting or being impacted.

If the cars have metal bodies, you might build a circuit that uses the metal body as an antenna to pick up voltage from the mains wiring and convert to DC and measure the voltage. look for a constant range of voltage. If a metal body touches another metal body, the increase size of the “antenna” may give you a sudden increase in voltage.

For walls and furniture, you are on your own.

Paul

Hi, thanks for the reply. The cars are not designed yet. So they can be designed in any way that will make it work. They don't have to look like real cars. They could have a metalic band around them to detect voltage change.... Would that be the same as detecting change in capacitance?

CompSci:
Hi, thanks for the reply. The cars are not designed yet. So they can be designed in any way that will make it work. They don't have to look like real cars. They could have a metalic band around them to detect voltage change.... Would that be the same as detecting change in capacitance?

NOT AT ALL!!! You would be looking for an increase in the random noise level.

Paul

Robin2:
I see several problems here. The cars could make contact at a wide variety of different places on both cars - for example left front corner contacts right rear corner. How can you sense contacts in a wide range of places? Even if you had (say) 8 contact sensors mounted around each car how could you tell whether the sensor was triggered by the other car or by a wall?

You might be able to use an accelerometer module to detect impacts but it could not tell the difference between contact with the other car or contact with a wall. And it may have difficulty distinguishing gentle contacts from the normal disturbances caused by acceleration, braking and steering.

Maybe you could put a pair of metal bands around both cars arranged so that the bands on one car touch the bands on the other car when the cars come into contact. On one car both bands would be connected to GND. On the other car one band would be GND and the other connected to an I/O pin set as INPUT_PULLUP. When they touch the car with the I/O pin would register the contact. (Heath-Robinson and Rube Goldberg live on :slight_smile: )

...R

Maybe 3 metallic bands on each car.
Car 1, from top to bottom would be input, GND, GND. Car 2 would be GND, input, GND

The bottom band would make a common ground, then each car could get the input to detect the collision.

If only one car needed to detect the collision, then it has two bands, input and GND. The second car just has a single strip wide enough to bridge the other car's bands to make the circuit.

One concept might be to have some sort of radio network between the cars (e.g. NRF20L01) and accelerometers in each car. When they detect virtually simultaneous and similar magnitude acceleration events it can be inferred that they've probably collided with each other rather than some other obstacle.

RFID tags are very short distance and would tell you that the two cars are very close. Add in an accelerometer and you can differentiate between car collisions and furniture collisions.

evanmars:
Maybe 3 metallic bands on each car.
Car 1, from top to bottom would be input, GND, GND. Car 2 would be GND, input, GND

I understand the logic but it could very difficult to ensure reliable contact of three bands. That may not even be easy with two bands.

…R

evanmars:
Maybe 3 metallic bands on each car.
Car 1, from top to bottom would be input, GND, GND. Car 2 would be GND, input, GND

The bottom band would make a common ground, then each car could get the input to detect the collision.

If only one car needed to detect the collision, then it has two bands, input and GND. The second car just has a single strip wide enough to bridge the other car's bands to make the circuit.

Thanks! I'm thinking that with the 3 band solution there might be some issue where all 3 bands don't touch at the exact same time. Not sure if that would damage the Arduino. The 1 band solution would work perfectly for 2 cars... Great idea!