Need help: Circuit containing a capacitor

Thread Starter

JamesP

Joined Feb 18, 2015
15
Ah thanks very much I will look into that!
Yeah I am starting to see that haha, its my second design project for University and I have never really dabbled much with circuits before so its a first
 

planeguy67

Joined Jan 29, 2015
60
As long as we're throwing ideas at the wall, when I first heard "capacitor" for this, I was thinking an RC timing circuit.

Conceptually, when the vehicle begins forward motion towards the wall, the capacitor begins charging through the resistor. The capacitor either starts at zero or some other reference voltage. When the vehicle arrives at the wall and reverses, the capacitor begins discharging through the resistor. The vehicle stops when the reference voltage gets reached once again. There would have to be some sort of comparator circuit to determine when that point arrives.
 

#12

Joined Nov 30, 2010
18,224
You could put the resistor+capacitor in parallel with the motor. That would give a time reference on the capacitor. Volts = time x current but that's not the equation for voltage. It's: Vcap = dV (e^-t/RC)

Then you would have to discharge the capacitor at the same rate its was charged and use that time to control an amplifier to drive the motor. One problem is that capacitor voltage change during discharge gets slower and slower as it gets near zero, so that messes with accuracy. Another problem is that a transistor uses up the last 0.6 volts and thus, seemingly discards it. This puts us using an op-amp to watch the first capacitor discharge because an op-amp (LM358) can measure down to zero volts. The op-amp can drive the motor with an H bridge configuration which is a transistor way to reverse the drive voltage. Now we get to, "How low is zero?". An op-amp is fanatically picky about things like that. A miss by a hundredth of a volt could lock this thing in reverse forever. If you get the zero point right by using an adjustment, you still have to arrive at, "stop" as in, don't reverse again and drive to the wall.

See why this is diagnosed as a digital counter problem? Analog methods are not terribly accurate and they get so complicated that you can do it better and easier in digital.
 
I know nothing about this sort of thing but could a spring and a few gears with a protruding piece of plastic or wood work in such a way that once the car moves backward after so many rotations the protruding piece comes to rest upon a stationary piece of plastic which acts as a break? Did that make any sense? :confused:
 

WBahn

Joined Mar 31, 2012
32,920
The 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.
 

crutschow

Joined Mar 14, 2008
38,533
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.
 

WBahn

Joined Mar 31, 2012
32,920
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.
The inaccuracy here would be due to things like the two voltages being opposite but not quite equal.
 

Thread Starter

JamesP

Joined Feb 18, 2015
15
The 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.
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 it
 

Thread Starter

JamesP

Joined Feb 18, 2015
15
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.
This approach sounds appealing... I shall look into this a bit more to find what components I would need
 

Thread Starter

JamesP

Joined Feb 18, 2015
15
So am I correct in saying that if I go down the path of the op amp integrator circuit I do not need to break the circuit on the return for it to stop?
 

wayneh

Joined Sep 9, 2010
18,117
Line-following robots are common. If you want great precision for the return, I'd consider leaving a marker, and maybe a trail of breadcrumbs to follow home, similar to WBahn's suggestion.

Oops just saw your penalty comment.
 

#12

Joined Nov 30, 2010
18,224
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.
Some people pay attention to their real life while I struggle with a second rate idea. :(
 

wayneh

Joined Sep 9, 2010
18,117
I wonder about the precision of this approach, and what precision is hoped for. And what range of distances we're taking about; 6 inches? 100 yards?
 
Top