The inaccuracy here would be due to things like the two voltages being opposite but not quite equal.If you wanted to go analog with the capacitor, you could put the capacitor in an op amp integrator circuit.
Since that gives you a linear ramp, both for charge and discharge, there's not the problem of poor accuracy at the trip point.
To charge the capacitor positively you apply a negative DC voltage to the integrator input (since the op amp integrator is an inverter).
To discharge the capacitor you apply an equal but positive voltage to the integrator input.
A comparator can detect when the integrator output returns to 0V.
Ah somebody else in the group I am involved with has taken a very similar approach to that so I can't really do that otherwise we will both get penalised for itThe first idea that popped into my mind was to start the vehicle out with a string fixed to the axle (probably on a drum mounted on the axle) and as the vehicle moves forward the string winds up on the drum bringing a spring under tension. When the vehicle bumps the wall a catch releases the driving force from the wheel (disengages some kind of clutch) and the spring then pulls on the string to bring the wheels back to their original position. No electronics at all. This could be done with a wind-up toy, for instance.
This approach sounds appealing... I shall look into this a bit more to find what components I would needIf you wanted to go analog with the capacitor, you could put the capacitor in an op amp integrator circuit.
Since that gives you a linear ramp, both for charge and discharge, there's not the problem of poor accuracy at the trip point.
To charge the capacitor positively you apply a negative DC voltage to the integrator input (since the op amp integrator is an inverter).
To discharge the capacitor you apply an equal but positive voltage to the integrator input.
A comparator can detect when the integrator output returns to 0V.
From having a look about basically ill need a motor, battery, resistor, capacitor and the integrator?This approach sounds appealing... I shall look into this a bit more to find what components I would need
Some people pay attention to their real life while I struggle with a second rate idea.If you wanted to go analog with the capacitor, you could put the capacitor in an op amp integrator circuit.
Since that gives you a linear ramp, both for charge and discharge, there's not the problem of poor accuracy at the trip point.