Week 13, 12 Nov

This week, I finally got my system up and running!

It works as an automatic pressure adjustment system. Whatever input that I give to the system, it is able to either pump air in and pull air out till the air pressure read by the sensor reaches the desired value.

After doing some tests on the air pressure sensor, I found the following results:

1. When the air bag is connected to the air pump and is filled fully with air, the pressure sensor feeds back a voltage correspond to an integer value in the range of 18 to 20.
2. When the air bag is connected to the vacuum and all air is removed, the pressure sensor feeds back a voltage correspond to an integer value in the range of 0 to 4.
3. When the air pressure sensor is exposed to the atmosphere, it feeds back a voltage correspond to an integer value in the range of 12 to 14.

Since the input is an unsigned 8-bit character which ranges from 0 to 255, I have to map the feedback voltage to a pressure level in the same range so that the difference between the input and the feedback can directly determine the output control signal.

In this case, I used a piecewise linear function for mapping the feedback voltage to pressure. The reason behind is that I assume 300mg of force is equivalent to the atmosphere pressure, thus it will have same amount of voltage swing from 0-300mg and 300-600 mg.

The piecewise linear function for pressure mapping is shown below:

For calculating the control signal for both air pump and vacuum, I used the same piecewise linear function. However, the air pump will only be turned on if the pressure is lower than the set point, and so the vacuum goes in the opposite direction.

The piecewise linear function for calculating the control signal is shown below:

Note that the graph start at 30% duty cycle instead of 0% because the motor can only be turned on when a 35% duty cycle of PWM signal is applied. This is because for any duty cycle lower than 35%, the mean square value of output voltage of the PWM signal is too low to turn on the motor.

What to do next?
Next, I will have to tune the control loop so that it runs better. This involves tuning the mapping function as well as the function to calculate the output signal duty cycle. For now, all I need is to get the PCB done and send out as soon as possible.

page revision: 11, last edited: 29 Nov 2007 05:14