[robotics_vnu] PID motor controller

  • From: "Le Vu Ha" <halv_kcn@xxxxxxxxxx>
  • To: <robotics_vnu@xxxxxxxxxxxxx>
  • Date: Wed, 26 May 2004 18:45:56 +0700

Viet:

Day co phai cai motor controller em muon mua khong? O day gia re hon ($70):
http://www.solutions-cubed.com/solutions%20cubed/MPID2003.htm
Em check ky xem no co can them nhung linh kien kem theo hay khong (cables,
interface board...).

BTW, anh gui 1 so ideas ve emergency stop modes cua may dua ban anh, em
nghien cuu xem (trong attached files)

Ha

Attachment: Estop.JPG
Description: JPEG image

E-stop procedure (electronics drive by wire interface)
1. Normal mode:
a. computer controls basic stamps using serial interface
b. Two basic stamps control H-bridges independently using I2c interface
c. H-bridges drive motors independently using bipolar PWM

2. E-stop pause mode:
a. computer detects e-stop pause through latch and sends usual shutdown 
commands to throttle servo
and actuator controllers
b. we're done

3. E-stop disable mode:
a. Relay connected to E-stop cuts throttle (via removing power to throttle 
servo and letting
natural spring action work, assuming that will be sufficient) or kills engine
b. Basic stamps receive high on some pin telling them that there is an e-stop 
disable
c. Basic stamps send control signals telling H-bridges to pull in actuators 
using I2c
d. H-bridges drive motors in reverse (pull in) using PWM until
e. Basic stamps detect limit and stop pulling, assuming actuators lock and have 
a way of
indicating limit (easiest: limit switches on new actuators yet to come, next 
easiest: pots
on actuators read some value corresponding to pulled back, but then you have to 
calibrate this
and store in NVRAM on the stamps. Suggestion was to go through an initial phase 
of going through
full swing to automatically ahve stamps detect min/max. (extra code on stamp 
and program)
Another thought is to send the stamps the values from calibration at startup, 
and stamps store
them in NVRAM. 
f. kill engine if not already done in (a)
Advantage: uses existing basic stamps
Disadvantage: needs a watchdog IC to reset stamp if no heartbeat to reduce 
chance of crashing 
causing a catastrophe


Alternative to 3

3'. E-stop disable mode:
a. Relay connected to E-stop cuts throttle or kills engine
b. Alternative controller lies in wait for E-stop disable to occur.
c. For each actuator, a normally open relay or a MUX sits between the 
controller and the H-bridge and is normally
kept energized/enabled connecting the normal controller to the H-bridge.
It selects between the normal controller and the alternative controller. The 
alternative
controller is simply a controller with its setpoint permanently set to a full 
back position.
While in normal operation, this controller can sense the pot position and 
determines continually
what direction the motor should go to pull back. However, the normal controller 
is in control.
So, this signal never makes it to the H-bridge. When e-stop occurs, the signal 
makes it to them.
On e-stop, relay deenergizes/MUX selects and contacts the normally closed 
contacts and makes connection between
the alternative controller which then pulls back enough to match the default 
set point and shuts down.
d. kill engine if not already done in (a)
Advantage: uses a relay to select between two controllers; less coding on the 
stamps
Disadvantage: we do not know what happens when you cut an I2c signal midstream 
Needs a watchdog
We have never read the same pot using two stamps before. No telling what 
happens. 
We may need a relay to switch over the pots as well, which adds complexity.

Anoter alternative to 3
3''. E-stop disable mode:
a. Relay connected to E-stop cuts throttle or kills engine
b. For each actuator, a DPDT relay sits between H-bridge and actuator. 
Normally, this relay 
is energized and passes the PWM from the H-bridge to the actuator, pullin gand 
pushing it as
needed. On Estop, relay selects an alternative source for the actuator, one 
that simply pulls the
actuator back. For this, we must have a mechanism to prevent continually 
pulling back on the
actuator for longer than a few seconds, long enough to pull al the way back. We 
may use a
556 timer to limit the duration of the pull-back signal. It would be configured 
in a one-shot mode and triggered by the optoisolated e-stop output
on the DARPA e-stop unit and would need to trigger another relay for power. (We 
don't want to 
revert back to computer control after the hardware timer is up, just cut power 
to the actuator after
pulling back.)
c. kill engine if not already done in (a)

Advantage: uses discrete components which are presumably less prone to crashing 
than embedded system
Disadvantage: pulls back blindly (unless you wire in 1/4 of LM339 comparator to 
detect the voltage
over the pot and use that as a rough setpoint sending a low to the relay once 
that is achieved.)

I suggest either 3 or 3''

Other related posts:

  • » [robotics_vnu] PID motor controller