Mechadon Tilt Sensors

 

Due to the high cost of commercially available tilt sensors, a low cost variable resistance sensor was designed that could be constructed from readily available material. The tilt sensor consists of two conductive-fluid filled bulbs (one for each axis of tilt) containing curved electrodes that are partially submerged in liquid (Figure 1). As the bulb tilts, the fluid will stay level and more or less of the electrodes will be submerged. This effectively changes the amount of surface area of conductive media between the two electrodes. The shape of the electrodes and the fluid level is such that this area changes linearly with tilt angle. Since this surface area is also linearly related to the resistance between the two electrodes, the resistance changes linearly with tilt angle. The angle of tilt is determined by measuring the change in resistance at the electrodes.

The bulbs used are the small plastic bubbles that you can get out of gum-ball machines that have toys in them. The electrodes are solid copper 22AWG wire with the insulation removed. The screw terminals are brass 4-40 screws and nuts from a local hardware store.

Propylene glycol was chosen as the conductive fluid because of its viscosity, high resistivity, and low cost. The viscosity is high enough so that the fluid does not tent to slosh during fast movement, but low enough so that the sensor can react to reasonably fast changes in tilt angle. A higher value of sensor resistance is desirable to reduce the amount of current flowing through the sensor. The driver circuitry for the tilt sensor is shown in figure 2.

 

Figure 1: Tilt Sensor Construction

 

Figure 2: Tilt Sensor Driver Circuit

 

The driver circuit for the tilt sensor consists of a voltage divider, an AC excitation source, and an RMS to DC converter. An AC excitation source is used rather than a DC source to prevent DC drift of the sensor output. The 555 timer generates a 1.5kHz square wave output at about a 50% duty cycle. Power connections of the timer are between the +2.5V and -2.5V rails. Since the base of the voltage divider is at 0V, the input to the sensor appears as a +/-2.5V square wave.

The tilt sensor and the 27k resistor form a voltage divider that attenuates the signal at pin 3 of the timer by an amount that depends on the resistance of the sensor. The relatively small 27k resistor, compared to the 1M sensor resistance, was used in the voltage divider so that the voltage change at the output of the divider was more nearly linear with the change in sensor resistance. The RMS to DC converter takes this varying amplitude AC voltage and converts it to a DC voltage level equivalent to the RMS value of the input voltage. The output of the sensor is then a DC voltage corresponding to the angle of tilt. The DC offset of the output signal is trimmed out with circuitry described below.

By itself, the output of the sensor tends to overshoot the actual tilt angle in response to fast angle changes due to the inertia of the fluid. Figure 3 shows the tilt sensor response due to a step input. An approximate sensor transfer function was derived based on the step response shown in Figure 3. A compensator was then designed to help reduce the sensor overshoot.

Several different compensator configurations were tried including phase lead, phase lag, 1st order lowpass filter and a 2nd order lowpass filter. Figure 4 shows a comparison of the various compensators.

 

 

Figure 3: Uncompensated Tilt Sensor Response

 

Figure 4: Simulation of Compensated Tilt Sensor Response

 

It was found that either a 1st order lowpass filter or a phase lag network would provide the most desirable response. The lowpass network shown in Figure 5 was chosen due to its performance and simplicity. The step response of the actual tilt sensor with the compensator is shown in Figure 6.

The simulation showed that a 3Hz corner frequency was needed. The corner frequency is set at this frequency by the 240k feedback resistor and the .22uF capacitor. The 2.4k input resistor was chosen to obtain the correct amount of gain. The desired gain was determined experimentally using the actual tilt sensor and was found to be G=100. The output offset adjustment was added so that the DC offset of the sensor could be trimmed out and the zero point could be adjusted.

 

Figure 5: Tilt Sensor Compensator

 

Figure 6: Compensated Tilt Sensor Response

 

The output of the compensated sensor matches fairly well with the Matlab simulation. The response time of the actual sensor is about 380ms compared to about 200ms in the simulation. This is still a reasonably fast response time compared to the response time of the entire robot. The overshoot has essentially been eliminated. The linearity of the sensor is also very good. Fitting measured data points to a straight line yields a correlation of .989. The repeatability of the sensor seems to be better than 1LSB of the A-D converter (8-bit). The current implementation of the tilt sensors is shown below.

 

 

  

 

Send Me E-Mail

 

Home Mechadon Hexapod MiniMechadon LEGO Bots Classic Cars Air Engines

 


EasyCounter