Quote:
Originally posted by ChrisH
I'm suprised gwross hasn't put his $0.02 in yet, as he was much more involved than I was. I'm just a mechanical, I leave the electron pushing to others whenever I can.
ChrisH
|
... and I'm just a programmer. I'm not that up on the electrical, but since I did the programming that interacted with the current sensor, I'll tell you what I know:
We didn't have a display of the current draw, and we didn't attempt to record any values. Instead, we used electronics to sense the current being drawn by our drive wheels, and programmatically limit the power being requested of the drive motors.
Some of our electrical/electronics types came up with a circuit for our electronics box which output a voltage which varied from 0 to about 3.5 volts according to the amount of current being drawn by our three drive motors. (It's ALL black box magic to me.) Ideally, the output voltage range would have been 0 to 5 volts, but we didn't have time to get it tweaked to perfection.
These voltages get read as analog inputs to the robot controller. Each time through the control loop, if any one of the values is above a certain threshold, the program scales back the power being demanded of all the drive motors. The scaling factor starts at 100%, and then every time through the control loop the current is above the threshold, the factor is cut back by 5 percentage points (but not below 10%.) Once the current gets back below the threshold, each time through the control loop the scaling factor is increased by 1 percentage point until it gets back up to 100%.