Capacitors and motors

You mentioned that this was for a robot so I just figured you might put some typr of sensor for detecting walls or other objects.