|||
1.Input source: DC 12V 2A2.Buttons: emergency stop, waist program, pelvis/foot program, buttock program and heating program3.Output, DC12V
i.Air pump: PWM, duty cycle 85%ii.Heating: PWM, duty cycle 13%. The load’s RMS voltage equals (12*12*13%)1/2, about 4.3Viii.Magnetic valves: 3 in all. PWM, 100% for the first 300ms after electrified each time, then 80%
4.LED:
i.1 Power LED, lighting when DC12V insertionii.3 LED for waist program, stretch program, exercise programiii.2 LED for moulding program and beautiful feet programiv.2 LED for buttock program and malaxation programv.1 LED for heating programvi.ALL except power LED blink if an exception occurs
5.Autostop
i.Heating program stops after heating 20 minutesii.Others stop after one full program cycle
Panel: as the right6.Watchdog timer required7.FET fault detection, short circuit detection required.
Function description:
1. All processes stop by pressing the Emergency Stop Button. All LED go out except the power LED.
2. LED1 lights on by pressing the Waist Program Button, and waist process runs. Switch among waist, stretch and exercise process by pressing this button again. LED1 - 3 respectively indicate these 3 different processes.
3. LED5 lights on by pressing the Moulding Program Button, and pelvis process runs. It also switches between pelvis and feet process. LED5 and LED6 indicate these two statuses.
4. LED8 lights on by pressing the Buttock Program Button, and buttock process runs. Switch between buttock and malaxation process. LED8 and LED9 indicate them.
5. LED11 and heating switch between on and off by pressing the Heating Button.
6. Heating ends in 20 minutes, and all other programs end after one program cycle.
7. Testing program: By press buttons’ combination for a long time, it enters the testing process which would detect hardware faults and throw out warnings.
Program Details:
Each program is provided in a table that contains step information. Each step information indicates the status (ON/OFF) of the air pump, the heater and the three magnetic valves. “1” indicates ON, while “0” or BLANK indicates OFF.
Here is an example. Table 1
This table contains 12 steps. The first step lasts for 10 seconds during which the air pump and magnetic valve 1 are ON. This process ends after step 12. It lasts 62 seconds in all.
Hardware solution
Power sectionThere are 5 channels in all for the air pump, the heater, and the three magnetic valves. Each channel is similar. Take the air pump as an example.
A MOSFET was used for controlling the pump’s ON/OFF state and its current consumption via changing the pin’s state of microcontroller.
R16 was used for detecting current. While the pump signal is in a logical low state, Q1 was not supposed to be in ON-state, so we expected An-pump’s voltage to be 0. If a voltage of more than that was detect, we knew a MOSFET fault had occurred. In addition, if we detect an unusual high voltage here, an over current or a short circuit event had occurred. The threshold voltage for over current detection is Vth = Ith * R16. Here Ith for this pump is 1A, so Vth eques 0.2V.
MCUs
MCU on the Control Board.
TM52F5268B Features:
1. Standard 8051 Instructions set, six times faster than standard 8051
2. 8K Bytes Flash Memory supporting both ICP and IAP
3. 256 Bytes SRAM
4. 8051 Standard Timer 0/1/2
5. In addition to 8051 Standard UART, this chip also PROVIDES ONE WIRE UART MODE to transmit and receive data USING TXD ONLY.
6. 12 BIT ADC with 10 channels external Pin input.
7. Independent RC Oscillating Watchdog Timer
Other features unrelated to this essay are not listed.
As the figure above shows, P1 was a port for communicating using UART one wire mode with the other MCU on the UI Board.
MCU on the UI Board
As shown above, the UI Board also had a communicating port, P1, connected by three-core cable to the other board’s communicating port. There was a red LED lighting on whenever power source was on.
Keys and LEDs
Here were the keys and LEDs required for users. A cycle contains six milliseconds during which the LEDs are lighted and the keys are read asynchronous. As there was only one resistance connected to all five keys together, combinational keys were not supported.
Software solution
Only a little code is shown here for respecting intellectual property.
This code is for turning off system while connection fails.
These tables contain all step information.
This code changes every output pin’s state each second (if needed)
THE END