How to detect collision in a toy car
conceptual dwg.



simulate this circuit &ndash; Schematic created using CircuitLab
The mic will create some pulse with some polarity. This will be strong enough to compare and take evasive action.  You could also clap your hands to do the same task.