* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download A Mechatronic Spotting System that mimics Human Weight
Mains electricity wikipedia , lookup
Alternating current wikipedia , lookup
Power engineering wikipedia , lookup
Telecommunications engineering wikipedia , lookup
Electrification wikipedia , lookup
Control system wikipedia , lookup
Resilient control systems wikipedia , lookup
Embedded system wikipedia , lookup
Voltage optimisation wikipedia , lookup
Rectiverter wikipedia , lookup
Electric machine wikipedia , lookup
Dynamometer wikipedia , lookup
Distribution management system wikipedia , lookup
Electric motor wikipedia , lookup
Brushless DC electric motor wikipedia , lookup
Fault tolerance wikipedia , lookup
Induction motor wikipedia , lookup
Brushed DC electric motor wikipedia , lookup
NNGT Int.J. on Embedded Systems, Vol. 2, Feb 2015 A Mechatronic Spotting System that mimics Human Weight-training Assistance Behavior Samuel N. Cubero [email protected] www.samcubero.com The Petroleum Institute, Abu Dhabi, United Arab Emirates (UAE) Grant Wirth, Peter Kneale and Brett Nardi Curtin University of Technology, Perth, Western Australia about 340 of these injuries involved a loss of barbell control. Also, within a 1 year period between March 1991 to April 1992, 11 deaths occurred due to asphyxia / anoxia [3] (suffocation / lack of oxygen) or inability to breathe. Training with excessively heavy weights can also cause several non-fatal injuries such as damaged or torn muscle bellies, torn or snapped ligaments, back or spinal injuries and even broken ribs. Barbell drops can sometimes be lethal [4] especially if the barbell falls out of the user’s hands (using a ‘suicide grip’, where all fingers and the thumb are all on one side of the bar) and the bar crushes the rib cage at high speed due to a free-fall drop. Some have been found dead at home or in their home gyms [3], with their necks crushed, each suffocated by a heavy barbell that could not be removed (due to muscle weakness near the end of a set of repetitions). Unfortunately, overconfident people and novice weight trainers, including teenagers and children, may lack knowledge and awareness of the risks involved with heavy barbell training. Beginners usually do not consider the possibility or consequences of ‘muscle failure’ (or the inability to return the weight to its supports), especially when performing the final few reps (repetitions) in a set of lifts. Hence, some do not take adequate precautions to protect themselves in the event of failure to return a heavy barbell to the supports. For example, one easy way to prevent barbell suffocation (for the bench press exercise) is to place one chair on the left and another identical sized chair on the right side of the flat bench so that the plates on each side of the barbell can be stopped or supported by the flat seat of each chair in the event of failure to return the bar to the supports. This safety precaution, or similar ‘barbell catching’ safety equipment [5], may prevent the bar from pinning down the user if the user struggles with the weight and does not have enough strength to return the bar to the top of the rack (or supports). The main job of a human training partner or ‘spotter’ is to ‘spot’ or identify when the person exercising is failing to make progress with a lift, and to provide low to high levels of lifting assistance to lessen the effective load, in order to help return the bar to the supports. Partial assistance with a lift should be done in a gradual and Summary A leading cause of serious weight-training injuries and death among bodybuilders and weight-lifters is training with heavy barbells without the assistance of a human 'spotter' or gym partner. A spotter can identify lack of progress or nearness of muscle failure and provide additional force to assist with the lift, so that the lift can progress slowly prior to complete muscle failure, allowing the maximum benefit to be gained from the exercise. This paper briefly describes the modeling, design and performance of a computer-controlled mechatronic system that automates the 'spotting' process for horizontal barbell exercises, which includes exercises such as squats, bench press, overhead shoulder press, barbell triceps extensions and bicep curls. The system employs a unique pulley system attached to a strong structural frame, a solenoid-activated locking brake, optical position sensors and a low-cost embedded microcontroller system that drives a display screen, control panel, a geared electrical winch (motor) and cables attached to a standard barbell. Known as the ‘Smart Gym’, the basic system design, its different modes of operation and important safety features are described. This system also has the potential to save the lives of many people each year by preventing barbell suffocation (asphyxiation due to neck compression) and fatal injuries caused by heavy, free-falling barbells. Several fitness equipment manufacturers have already shown interest in using concepts described in this paper for implementation in current and future gym equipment. Key words: Gym, spotter, mechatronic spotting, bench press, microcontroller, 1. Introduction Many bodybuilders and weightlifters who prefer to train alone, or who lift heavy weights without a training partner, have been seriously injured or killed by barbells due to lack of spotting assistance [1, 2]. For example, in the US, from 1999 to 2002, 14 out of the 20 reported weighttraining-related deaths were due to asphyxiation / anoxia [3], or inability to breathe due to one’s neck being trapped under a heavy barbell and being too weak or too tired to remove the barbell, while doing bench presses. Even during the year 2002, in the US alone, approximately 3,820 weight-training-related injuries were reported and © N&N Global Technology 2015 DOI : 02.IJES.2015.1.4 1 NNGT Int.J. on Embedded Systems, Vol. 2, Feb 2015 controlled manner so that the most benefit can be derived from the last few repetitions of the set. A skilled human spotter does not remove the entire load immediately, but taps up the bar or the lifter's elbows, or partially carries the load, to make the last repetition progress slowly, or last as long as possible, just before complete muscle failure occurs. This ensures that the one exercising can still make progress with the final lift and can return the barbell to the supports (bar holder), or starting position. ‘Training to failure’, accompanied with sufficient rest and a highprotein nutritious diet, promotes rapid muscle growth based on muscle resistance training principles [6, 7]. Sometimes a training partner or human spotter is not always available nor completely reliable at all times (e.g. he or she might not be paying attention when help is needed the most). Personal trainers or coaches can be very expensive to hire to serve as spotters, and not all people possess good spotting skills. A reliable and cost-effective alternative to a human spotter is to use a 'smart machine' or a mechatronic system that can automatically perform the job of a human spotter. This paper describes a working prototype ‘spotting system’ that mimics the behavior of a human spotter by executing software on an embedded AtmelTM microcontroller chip (8-bit computer or CPU). Ball-screw linear actuators are comprised of several high-precision components that need accurate machining and assembly processes (such as the precision-machined threaded shaft, ball-recirculating collar and rollerbearings), therefore, they are usually among the most expensive of position-controllable linear actuators. Typical ball-screw linear actuators (with a 1kW or larger motor) usually cost between $3000-$7000 each depending on stroke length, not including the controller and sensor hardware. The ExerboticsTM ECR (Chest Press / Row) machine and ESP (Shoulder press / Lat pulldown) machine each cost $14,995 USD [14]. The ExerboticsTM eLP (Leg Press) machine, which allows a user to perform a ‘seated squat’ exercise, costs $17,995 USD [14]. Because these three different exercise machines use high-precision ballscrew linear actuators and expensive computer controllers, they are very costly. In total, the cost of all three machines adds up to $47,985 USD, which is far beyond the budget of most home-users, amateur weight-trainers, and most small gyms (also, conventional weight-stack machines cost much less). In fact, all the same muscle groups (chest, back, shoulders, biceps, triceps and legs) can be exercised safely, and with full spotting assistance, for a small fraction of the cost of all three aforementioned ExerboticsTM machines. 2. Current ‘state of the art’ in gym equipment 3. ‘Smart Gym’ prototype spotting system Many different types of computer-controlled exercise machines have been developed by a large number of researchers and product developers. Examples of such equipment are described by [8-13]. They fall into two main categories: (1) Systems that are added onto existing ‘passive’ force resistance exercise equipment; and (2) Systems that generate ‘active’ force resistance using position, speed and force controlled actuators. Many of these systems are basically ‘add-on’ devices that monitor existing forms of gym equipment [12] (which produce ‘passive’ or constant force resistance that can be manually adjusted, i.e. those that rely on dead weights or mechanical friction). Others employ variable-resistance methods and even force-controlled actuators (which involves ‘active’ or ‘closed-loop’ force-controlled or torque-controlled actuators), which are generally more expensive to develop because they require more components and sensors and a programmable computer-based controller. Perhaps the most technically advanced computer controlled exercise machines on the market which offer variable resistance forces (i.e. Type ‘2’ machines) are manufactured by ExerboticsTM [14]. ExerboticsTM gym machines use high-precision force-controlled (electric motor-driven) ball-screw linear actuators. They employ in-line load cells to provide force-sensing to achieve closed-loop variable force-control in the ‘forward’ and ‘reverse’ directions of movement. © N&N Global Technology 2015 DOI : 02.IJES.2015.1.4 The ‘Smart Gym’ spotting system described in this paper is a ‘Type 1’ exercise machine that uses a conventional barbell (with passive weights), carried by cables. It provides real-time ‘human-like’ spotting assistance, it can quickly detect and halt barbell free-falls, plus perform workout data logging / monitoring. The first prototype of the ‘Smart Gym’ costs approximately $2000 AUD in materials and parts only, including the power supply and PC, without labor. If labor costs and profit margins were to be included, the ‘Smart Gym’ could easily sell at a retail price much less than the price of one ExerboticsTM machine, offering excellent value for money while being able to train most of the major muscle groups. This paper describes the ‘Smart Gym’ [15] mechatronic engineering project that was supervised by the first author at Curtin University, Perth, Western Australia. Three mechatronic engineering students, namely, Grant Wirth, Brett Nardi and Peter Kneale, worked under the first author’s direct supervision and guidance to design, develop, build and test all the hardware and software for the 'Smart Gym' prototype. Others who deserve credit for providing technical assistance with the electronics manufacturing and workshop fabrication efforts include Jeff Pickles, David Collier and Russell Wilkinson. 2 NNGT Int.J. on Embedded Systems, Vol. 2, Feb 2015 The main objectives for developing this ‘Smart Gym’ (mechatronic spotting machine) project are listed below: 1. Allow a wide variety of free weight exercises using a conventional barbell loaded with plates (e.g. bench press, squats, arm curls, shoulder press) 2. Automate and replace the safety function performed by a human 'gym spotter' by carrying the entire barbell load when necessary. This includes weightlifting assistance when very low speed or ‘stalling’ is detected, and stopping the barbell from falling if it is accidentally released or dropped. 3. Maximize the benefits of weight training exercises (by providing varying levels of spotting assistance and customizing a variety of ‘spotting’ parameters). 4. Monitor the results of weight-training performance and record workout information over time (e.g. show number of full reps, estimate calories burned, etc.) 5. Keep materials and component costs to a minimum in order to purchase all the components and build a working prototype within 1 year. 6. Ensure high user safety and predictable performance of the system at all times, even during a power failure. Also, ensure that all materials and components are 'strong enough' and will not fail catastrophically. The main subsystems of the ‘Smart Gym’, as shown in Figures 1 to 4, are listed below: A computer-controlled motor-driven winch and cable braking system. (The cable braking system allows reliable switching between 2 different modes of operation) A programmable controller (a modern 8-bit AtmelTM AVR microcontroller) and cable position sensor A strong mounting frame with cables and pulleys (maximum barbell load = 200 kg) A user interface (LCD screen with several pushbuttons for setting parameters and operating modes) Fig. 2. Assisted shoulder press Fig. 3. Assisted squats Fig. 4. Assisted bicep curls 4. Mechanical design and operation The ‘Smart Gym’ was designed to allow humanpowered lifting of a horizontal barbell (State 1, no motor assistance) and to provide spotting assistance (State 2, partial or full motor assistance) only when necessary. The two states of operation are described in Figs. 5 and 6. In Fig. 5, the motor (or winch) should remain stationary and the spring reel cable should be free to move (brake is ‘off’ or in the unclamped state) to allow the user to perform free lifting of the barbell. The spring reel only provides a small positive tension force to ensure the cables do not go slack during the upstroke of the barbell, which could cause the cables to come off the pulley wheels. A position sensor (optical encoder wheel) is attached to ‘Pulley C’ to monitor cable position and speed. Fig. 1. Structural framework of the ‘Smart Gym’ [15] © N&N Global Technology 2015 DOI : 02.IJES.2015.1.4 3 NNGT Int.J. on Embedded Systems, Vol. 2, Feb 2015 prevents any ‘back-driving’ or movement of the cable. Hence, the ‘Smart Gym’ is able to ‘fail safe’ in the event of power failures. Another useful feature of the C-cleat is that if the cable is locked in the cams, the cams are very hard to open unless the tension on the cable is dropped to very low levels (or if the barbell load is lifted up slightly by the user). This is an ideal safety feature for a ‘Smart Gym’ because the cable cannot be released or unlocked unless the user lifts the weight slightly upwards to remove tension in the cable, thus ensuring that the barbell will not fall if the brake happens to turn ‘off’. Fig. 5. Cable brake in ‘off’ state allows user to lift (while motor stationary) Fig. 7. (a) Solenoid is on and brake is ‘off’ (left); (b) Solenoid is off and brake is ‘on’ (right). [15] The C-cleat also behaves like a one-way brake when activated, allowing the cable to still run into the spring reel to maintain constant tension for the cable, but it will not release the cable unless the cam fingers are opened by activating the solenoid (which causes the solenoid piston to retract). Therefore, even if the user pushes the barbell upwards faster than the winding rate of the winch (when the motor is lifting the barbell load upwards), the spring reel will keep trying to pull in more cable and maintain constant positive tension on the cable, without allowing the cable to go ‘slack’ and possibly come off the pulley wheels. Statics and yield failure analysis were performed on all load-bearing components to select safe sizes for all parts. Vector force analysis (combined loading statics analysis) [17], ‘Von Mises’ (or equivalent stress) yield testing and failure analysis [18] were performed on custom-designed load-bearing beams, columns and tubes of the structural framework, cables, pulley shafts and component mountings to ensure that materials will not fail by yielding or buckling. Safety factors were kept above 2 (i.e. materials and dimensions for parts were selected or designed to handle up to 2 times the maximum expected ‘worst-case’ Von Mises stress, even under combined loading, without yield failure.) One or more of the components or materials could fail by yielding if a person weighing more than 200 kg suspends his / her entire weight on top of a fully loaded 200 kg barbell suspended by the 2 supporting cables, as shown in Fig. 6, however, it is likely that the C-cleat (cable brake) will allow the cable to slip first, or fail earlier, before any metal materials yield. Fig. 6. Cable brake in ‘on’ state allows motor to lift entire barbell (spotting) When the spring reel cable is locked (solenoid is deactivated), the cable brake is ‘on’ (see Fig. 6), the DC motor can be activated and take over the lifting of the entire barbell load (or perform spotting) at a given speed. The ‘2 cam fingers’ used for the brake system shown in Figs. 5 and 6 are actually part of the RonstanTM C-cleat product [16], a high-strength clamping mechanism that only allows rope or cable movement in one direction. This product is typically used in many marine applications, such as locking ropes on sailing boats or for holding the positions of booms or horizontal spars or poles, which hold the feet of sails. The C-cleat chosen has a maximum holding strength of 200 kg and testing had proven that it could successfully hold over 160 kg (all the weight available at the time). When all power is suddenly turned off, the solenoid deactivates, the ‘spring-return’ mechanism inside each C-cleat ‘finger’ automatically locks against the rope / cable (i.e. cable brake turns ‘on’), and the barbell cannot fall or move, because the motorpowered winch is also switched off, and its high-gear-ratio © N&N Global Technology 2015 DOI : 02.IJES.2015.1.4 4 NNGT Int.J. on Embedded Systems, Vol. 2, Feb 2015 because it can provide sufficiently accurate position measurements and very long life performance. It is a noncontact sensor that does not suffer physical material wear, unlike multi-turn rotary potentiometers (rheostats or mechanical voltage dividers) which eventually wear out and fail due to contact friction. The custom-designed and built slotted disc (wheel) shown in Fig. 9 is attached to a pulley (‘C’ in Fig. 5) to measure cable displacements to 3.84 mm resolution. 5. Electrical power and control hardware 5.1 Optical position sensor With the aid of a cable position sensor, a controller can calculate the velocity of the cable, detect a struggling user (who is lifting the barbell too slowly or who is unable to lift any further), and hence, take appropriate spotting action. A barbell position sensor (optical encoder) was fitted on pulley C (Fig. 5) to monitor the barbell’s moves. Fig. 9. Custom-made 2-channel Optical position sensor (45 slots) [15] 5.2 Electric motor selection Several different kinds of motors could be used for raising and lowering the barbell. Mechanical actuators like pneumatic and hydraulic motors are not suitable for this application because they produce a great deal of noise and require bulky and costly pumps / compressors, storage tanks, hoses, fittings and support hardware, such as filters, manifolds, pressure regulators and valves. Hence, electric motors provide a lower cost solution, since 240V AC power is widely available in most countries. A designer is also faced with a wide range of choice for selecting an appropriate or ideal electric motor to best suit this application. The following types of electric motors can be used since they operate quietly and are readily available: AC induction machines Brushless DC motors (BLDC or ‘stepper motors’) Brushed DC motors (series, shunt and compound) AC motors and brushless DC motors (BLDC) are commonly used in industry, however, both types require fairly complex controllers to control motor speed and / or commutation. AC motors are best used in situations that require constant speed and torque. BLDC motors require an expensive (dedicated) controller to control speed. Brushed DC motors, however, operate on simple principles and can be easily controlled by an embedded controller without requiring too much development effort. Fig. 8. Schematic of the control system for the ‘Smart Gym’ Figure 8 shows the main subsystems of the electrical power and control system for the ‘Smart Gym’ prototype. An AtmelTM AVR ATmega8535 microcontroller [19] or CPU (Central Processing Unit) was chosen to execute software (control algorithms), send text to the LCD screen, activate or deactivate the cable brake (C-cleat), and generate appropriate drive signals (control signals for upward or downward movement of the barbell at a known speed) for the geared DC motor / winch. The actual position of the cable is detected by the position sensor system (a HCTL 2022 [20] ‘up/down’ counter or ‘quadrature decoder’ IC or ‘Integrated Circuit’ scans two photo-diode sensors on the slotted wheel in Fig. 9 at a frequency of 29 kHz generated by a ‘555 timer’ IC [21]. This frequency is high enough to ensure accurate position sensing even at the highest expected speeds for the optical encoder wheel.) The custom-built position sensor outputs a 16-bit absolute position value which is read by the AVR microcontroller (as 2 separate bytes). An optical encoder position sensor was chosen to monitor cable position 5.3 System modeling A simple model of the ‘Smart gym’ was made to determine the motor criteria suitable for this application. An equivalent system can be modeled in order to determine the maximum required torque of the motor, and hence determine a set of motors suitable for the application. m is the motor torque, L is the torque produced by the © N&N Global Technology 2015 DOI : 02.IJES.2015.1.4 5 NNGT Int.J. on Embedded Systems, Vol. 2, Feb 2015 barbell load, 1 is the torque exerted on gear 1 by gear 2, and 2 is the torque exerted on gear 2 by gear 1. The winch motor selected was the SD11 shunt wound motor from ParvaluxTM Corporation. The motor provides approximately 40 Nm of torque due to an externally fitted 200:1 ratio gearbox (LWS). Figure 11 shows the nearly linear ‘Voltage vs. No load speed’ characteristics of this DC motor, operating at a steady state speed. Using Eq. 7, the ‘Smart gym’ requires a theoretical maximum torque of 13.5 Nm from a motor, using the values: ( n1 / n2 ) = (1/200) = 0.005; JL = 0.168 kg.m2 ; Jm = 0.006 kg.m2 ; 2 1 = 2200 rad/s ; m = 200 kg ; and r2 = 0.029 m. Since the maximum torque output of the SD11 motor-driven gearbox is 40 Nm, this provides a ‘safety factor’ of 2.96 for a 200 kg mass. The fastest lifting speed seems slow due to the 200:1 gear ratio, so the motor needs to be run at full speed to achieve a respectable lifting rate. 1 n1 Gear 1 Jm 2 2 m 1 L JL Gear 2 n2 Fig. 10. Equivalent system (showing side view of gears) Jm and JL are the mass moments of inertia for the motor and the load respectively. We can also model viscous friction on shafts 1 and 2 with f1 and f2 . The gear ratio is ( n1 / n2 ) where ‘n’ is the number of teeth on a gear. Also, is angular speed, or the same as . Therefore: J (1) m 1 f 1 1 J m 1 (2) L 2 f 2 2 J L 2 (3) n Fig. 11. Voltage vs. Speed (unloaded) steady state for SD11 motor [15] 5.4 Motor modeling in ‘Armature controlled mode’ (4) 2 1 2 n1 There are three main types of wound DC motors, namely, the series motor, the shunt motor and the compound motor. Each motor has different torque speed characteristics due to the arrangement between the stator magnetic field and the field armature. The motor which best suits the requirements of the ‘Smart Gym’ is the SD11, however the shunt layout must be disconnected in order to operate in a mode known as ‘armature controlled mode’. It is impossible to drive the motor in both directions if the series or shunt layout is kept. This is because the polarity on both the armature and field will remain the same. In this mode of operation the field winding is maintained at a constant voltage, which is usually the highest voltage available in this system. The voltage in the armature can be modulated to control the speed of the motor. This section describes the control theory behind this mode of operation. It can also be seen that if the field and armature voltage supplies are exchanged, it is possible to operate the motor in field current controlled mode, where the armature is held at a constant potential and the field voltage is varied. However in most cases, armature controlled mode is the preferred option. There are numerous advantages to operating in ‘armature controlled By substitution, the equation for motor torque is: n 2 n 2 n m 1 J L J m 1 1 f 2 f 1 1 1 L n 2 n 2 n2 (5) L mgr (6) 2 Given m = total mass, g = gravity (9.81 m.s-2), r2 = pulley radius for wheel 2, and neglecting viscous friction [15]: n 2 n m 1 J L J m 1 1 mgr n 2 n2 (7) 2 The motor and gearbox needs to be selected with a maximum torque output greater than m from Eq. 7 in order to be able to achieve the desired maximum angular acceleration 1 for shaft 1 and the entire system. © N&N Global Technology 2015 DOI : 02.IJES.2015.1.4 6 NNGT Int.J. on Embedded Systems, Vol. 2, Feb 2015 mode’ as opposed to ‘field controlled mode’. The most important reason for operating in ‘armature controlled mode’ is due to the much lower inductance that exists in the armature than in the field. The field has an inductance of 119H, whereas the armature has a much lower inductance of 162mH and would be much more responsive to voltage changes. Inductance in electrical circuits resists the change of current due to the property of magnetic storage for inductors. High inductance is not desirable if a voltage switching scheme is used. For example, if the motor needs to be stopped in the quickest possible time from a running state, the inductance in the driving winding should be as small as possible otherwise the system will be slower and much less responsive, due to the inductor’s ability to store energy. 1 (s) B s J Using ‘Kirchoff’s voltage law’ and Fig. 13: Va La di a dt (12) R a i a V BEMF The above equation contains the term for the ‘back electromotive force’ ( VBEMF ) of the system. This is generated as the armature rotates and cuts through the magnetic field produced by the field windings. The back EMF produced is proportional to the velocity of the armature (where Kb is a constant). V BEMF K b Tm B (viscous friction) Km (s) Fig. 12. Free body diagram of the load on a motor Va (s) The torque of the motor Tm is proportional to the current Ia in the armature winding. Using Fig. 12, Tm K m I a (13) Substitution leads to the following transfer function of input voltage to rotational speed [15]. J T Tm ( s ) (11) J (14) La J B K bK m R s a s J La J L a Using MATLABTM and experimentally gathered data, an approximate model of the DC motor was found. The plot in Fig. 14 shows a simulated ‘step response’ of the system. (8) J J T m B J T m B Variable armature voltage Va Ra (9) Constant field Vf Rf La + Lf Va_ + Vf _ ia Fig. 13. Armature control mode for the SD11 DC motor Taking the Laplace Transform gives the transfer function for input torque to output speed. ( s )( Js B ) T m ( s ) Fig. 14. Simulated ‘step response’ of the DC motor [15] The step response shown above gives an approximation of time delay expected in the system. Because some of the motor parameters were found experimentally, the response can only be used as an estimate. The derived model can be (10) © N&N Global Technology 2015 DOI : 02.IJES.2015.1.4 7 NNGT Int.J. on Embedded Systems, Vol. 2, Feb 2015 used as a tool for developing a controller if the speed of response is not fast enough in the physical system. The simulation results show that this kind of motor would respond quickly enough for the ‘Smart Gym’ application. control electronics level. For such dissipation levels it is necessary to use a power electronic switching circuit that can meet the requirements of the controller. 5.5 H-bridge motor driver circuitry Diagrams Fig. 15(b) and 15(c) show the switching states of the H-Bridge circuit for controlling the mean armature voltage Va (using ‘Pulse Width Modulation’, or PWM) and direction of rotation. The four switches (labeled S1, S2, S3 & S4) are electronically controlled to divert the current path flowing across the load of the bridge. The microcontroller sets the PWM ‘duty’ and the state of the switches via the control software, which will determine the speed and direction of rotation of the DC motor shaft. Fig. 16. Schematic for H-bridge controlled by Intersil HIP4081 chip [15] An 'H-bridge' circuit, constructed from 4 N-channel MOSFETs (high current switches for S1, S2, S3 and S4) and an IntersilTM ‘HIP4081 [22] MOSFET gate driver chip’, was designed and built to drive the SD11 motor using PWM signals from the CPU (Fig. 8). The HIP4081 gate driver chip prevents destructive conditions such as ‘shoot through’, while controlling 4 external N-channel MOSFETs to perform the first four rows of (useful) switching functions shown in Table 1. The SD11 motor requires a supply voltage of 80V (DC) for its field and armature to meet the needs of the ‘Smart Gym’ prototype. Figure 16 shows a detailed schematic showing how an AtmelTM ATmega8535 microcontroller is connected to the HIP4081 gate driver chip, to drive the 4 MOSFETs (switches S1, S2, S3 and S4) of the H-bridge. Figure 17 shows the artwork for the final H-bridge PCB. Figures 16 and 17 were created using ‘Eagle PCB’ CAD software. Fig. 15. (a) ‘Shoot through’ (short); (b) Forward; (c) Reverse [15] Table 1: H-bridge states (1 = switch closed; 0 = switch open) S1 1 0 1 0 0 1 S2 0 1 1 0 1 0 S3 0 1 0 1 0 1 S4 1 0 0 1 1 0 State Forward Reverse Brake Brake Shoot through It can be seen from Table 1 that only four valid states of switching are useful for the ‘Smart Gym’ application (‘Forward’, ‘Reverse’ and two ways to ‘Brake’). The rest are meaningless and would result in a destructive condition known as ‘shoot through’. ‘Shoot through’ occurs when either side of the bridge is shorted between the high voltage rail and the common ground. Suitable circuitry protection must be used to make sure that this condition does not occur to avoid overheating wires and damaging circuit board components. The H-bridge circuit is needed to control mean armature current or mean armature voltage. The H-Bridge load will be the inductor winding of the armature. In this mode, the field winding is held at constant potential and reversing the direction of the current through the armature winding will allow change of rotational direction. Whilst the motor is running at full power, it is consuming approximately 200W of power, which is significant compared to the low levels of power dissipation at the © N&N Global Technology 2015 DOI : 02.IJES.2015.1.4 Fig. 17. Double-sided PCB (Printed Circuit Board) for H-bridge [15] 8 NNGT Int.J. on Embedded Systems, Vol. 2, Feb 2015 4. The user cannot lift the weight for a specified time. (2 seconds for a ‘Beginner’, 3 seconds for an ‘Intermediate user’ and 4 seconds for an ‘Advanced user’) ‘Partial assistance’ (intermittent spotting support) is required when any of the following states are detected: 1. The barbell has stopped for too long or is moving backwards before the top position has been reached. The user struggles (velocity stalls) on an upward repetition for a specified time (2 seconds for a ‘Beginner’, 3 seconds for an ‘Intermediate user’ and 4 seconds for an ‘Advanced user’). 2. The position is close to the user-defined minimum position. 3. Downward acceleration is significant after the barbell has been released (in case the user let go of the barbell as it was being lifted, or if the barbell slipped out of both hands, its fall will be stopped as quickly as possible to prevent risk of injury). 4. When the barbell has stopped near the top position on the final rep (end of the set). Fig. 18. (a) Top view of H-bridge circuit (left); (b) heat sinks (right) [15] 5.6 Cable brake drive circuit The 24V DC solenoid for the ‘Cable brake’ shown in Fig. 7 is activated by a simple SPST (Single Pole Single Throw) power relay (switch), which is powered by a transistor connected directly to an output pin of the AVR. Alternatively, the solenoid can also be switched ‘on’ or ‘off’ just as easily using an N-channel MOSFET (switch), where software sets the state of its driving output pin. 5.7 ‘Smart Gym’ controller functions There are two possible ways in which the system will act in order to aid the user. These are categorized as ‘Full assistance’ and ‘Partial assistance’ and are defined as follows: Full assistance: The user is considered to be in an unsafe situation, the entire barbell load must be carried by the motor and the set must end. When this is required, the system will take full control and lift the barbell to the userdefined (or start) rack position. Partial assistance: This is when the user is deemed to be in a safe situation, but some assistance is required in order to complete the single rep or set. This assistance provides small additional lifting forces (or intermittent spotting) on the barbell to help the user complete a repetition. This kind of assistance generates just enough momentum for the user to barely finish the end of the repetition (where the barbell is lifted at lowest discernible speed), to ensure that the loaded muscles of the lifter reach the verge of failure, or are almost completely fatigued. ‘Full assistance’ is required when any of the following states are detected: 1. Emergency stop button is pressed. 2. Downward velocity or acceleration is too large. (Acceleration exceeds 5 m/s2 towards the user in the lower 40% of the barbell range; or Velocity exceeds 0.7 m/s towards the user in the lower 40% of the range of motion; i.e. if the barbell is dropped by accident.) 3. Partial assistance has already been used 3 times consecutively (indicating muscle failure). © N&N Global Technology 2015 DOI : 02.IJES.2015.1.4 Fig. 19. (a) ‘Smart Gym’ control box; (b) LCD screen text display [15] When the ‘Smart Gym’ controller is first switched on, the AtmelTM AVR ATmega8535 microcontroller initializes its operating variables. If the ‘Smart Gym’ is used for the first time, the user must manually input (or record) the start and end positions for the barbell limits. This calibrates the position sensor so the controller knows exactly where the ‘bottom’ and ‘top’ positions for a type of exercise are located. These ‘top’ and ‘bottom’ positions for repetitions are stored in non-volatile EEPROM memory for each type of exercise, however, they can be reprogrammed to suit different users. During this calibration procedure, the barbell can be manually raised or lowered using the ‘Up’ and ‘Down’ keys on the control panel shown in Fig. 19. The ‘bottom’ or ‘top’ position is recorded using the ‘Enter’ (or ‘Select’ ) button each time the barbell is in the correct position for a particular exercise. The 4 buttons on the control box allow the user to navigate through different ‘menus’ of the control program (CPU software). The ‘x’ button is like a cancel or ‘Escape’ button that returns to the previous menu. The controller interface panel allows the user to control all settings and functions of the ‘Smart Gym’, from manually controlling the system components to setting exercise requirements and starting the workout. A list of all the options available to the user is shown below: 9 NNGT Int.J. on Embedded Systems, Vol. 2, Feb 2015 Manual control of the system Setting desired number of reps (repetitions) and sets (groups of repetitions) Setting difficulty level (Beginner, Intermediate or Advanced user) Defining barbell limits (setting ‘bottom’ and ‘top’ positions for each kind of exercise) Selecting an exercise and beginning the workout 6. Software design and development High-level control software was written quickly and easily using the BASIC language BASCOM-AVRTM [23] (similar to MicrosoftTM QBasic). BASIC was selected because it is much simpler to learn and use than the C language, yet it is functionally equivalent to C and allows complete control of almost any AVR chip. Functions written in BASIC usually take less than half the time and effort to develop compared to developing equivalent functions with C. High-level code is first compiled to native AVR machine code before being downloaded to a chip’s ‘Flash’ memory using ‘AVR Studio’ or ‘BASCOMAVR’. BASCOM-AVR allows monitoring of serial communications between the PC and AVR using a built-in ‘Terminal emulator’ application that displays all ASCII character data that is sent and received via a standard RS232 serial communications port (or a virtual COM port). Fig. 20. Example of position, velocity & acceleration vs. time plots [15] Figure 20 shows example plots vs. time for cable position, velocity and acceleration. Point A is at the ‘bottom’ point of a repetition, and this corresponds to a low or zero velocity at point B. The vertical line C in Fig. 20 shows the effect of rapid braking of the cable just after the barbell is deliberately dropped (released for free-fall). After line D, starting from the top position, the barbell is dropped again and the controller quickly applies the cable lock and stops the motor to stop the barbell. At point E, the cable lock is activated, full assistance is activated and the barbell is returned to the rack or start position by the motor. Fig. 21. Main flowchart (refer to Figs. 22, 23 and 24 for details) [15] © N&N Global Technology 2015 DOI : 02.IJES.2015.1.4 10 NNGT Int.J. on Embedded Systems, Vol. 2, Feb 2015 Figure 21 is the highest level flowchart, or the ‘main’ function. It includes every sub-function and loops continuously until the user requests an ‘exit’. After initialization and the menu, each loop will update the system, pass once through the assistance algorithm, then inputs are checked and data is sent to the LCD screen. Fig. 24. ‘Assistance algorithm’ module flowchart [15] Table 2: Examples of states that can trigger ‘full assistance’ [15] Full assistance required for Rep # 1 2 3 4 Position Critical: 0-2% of range % of Middle: 20-80% range Top: 80-100% X X Velocity Stall for >2 seconds Values Or Stall > N seconds in Level 1: <-0.05, > 0.03 m/s Level 2: <-0.5, > 0.5 down - Level 3: < -2, > 1 m/s up + Accele- Critical: < -7 m/s2 7 8 9 10 ↓ X X Bottom: 2-20% Fig. 22. ‘Initialize’ module flowchart (refer to Fig. 21); from [15] 5 6 ↓ X↓ X ↓ X X ↓ X X X X X X ↓X X X X X ↓ X ↓ X ↓ X X X 2 ration Medium: < -2 m/s m/s2 Low: < 0 Other Barbell just released X X X X X X X X X X X X Final rep X Partial assistance x3 X Table 3: Example of states that can trigger partial assistance [15] Partial assistance required for Rep # 1 Position X Critical: 0-2% of range Bottom: 2-20% % of range 2 3 4 5 X X Middle: 20-80% X Top: 80-100% Fig. 23. ‘User menu’ module flowchart to set exercise parameters [15] Velocity X X X Stall The user menu will be controlled by the user with the ‘up’, ‘down’, ‘enter’ and ‘exit’ buttons. The default setting is 3 sets of 10 reps, intermediate assistance and 30 kg of weight. If the user wishes to change any of these settings, he/she simply needs to navigate to the required menu option and change it with the up/down buttons, pressing ‘enter’ to confirm each selection. A ‘monitor exercise’ option can also be activated to transmit exercise data for each set (like in Fig. 20) to a PC. m/s Level 1: < -.05, > 0.03 Level 2: < -0.5, > 0.5 Level 3: < -2, > 1 m/s Acceleration Critical: < -7 m/s2 X Medium: < -2 m/s2 © N&N Global Technology 2015 DOI : 02.IJES.2015.1.4 Stall for > 2 seconds 11 m/s2 Low: < 0 Other Barbell just released X NNGT Int.J. on Embedded Systems, Vol. 2, Feb 2015 In order to realize a ‘professional’ or commercial quality product, many improvements are needed to produce a more robust and feature-rich ‘Smart Gym’. For example, many professional bodybuilders and competitive weight-lifters tend to squat or bench-press barbells that weigh over 500 lbs (over 227 kg), or sometimes up to 1100 lbs (500 kg), which requires much stronger components (bigger structural framework, cables, bolts and pulleys, plus a much bigger motor and cable brake). A force sensor or load cell could be placed in-line with the cable to monitor cable tension and this can be used to implement more features, such as providing accurate ‘closed-loop’ force control for precise spotting assistance and even calculating the amount of work or energy consumed (Work = Force x Distance). Also, an attractive touch-screen monitor or display can replace the 16x2-line LCD display and the control box shown in Fig. 19. A high-resolution graphical interface could be created to provide the user with a rich GUI (Graphical User Interface) that provides more features, such as detailed operating instructions (with pictures, illustrations, or even video tutorials with audio), coaching advice on how to execute exercises effectively and properly, and perhaps even a personalized digital ‘training log’ or a database feature that records workout achievements. Software can record, monitor, analyze and report strength and performance gains for each user, providing information such as total energy expended for a workout, average power output (Power = Work / time), etc. as long as the user is willing to input accurate information about the barbell weights that were used for each set. Using force-controlled linear actuators, such as pneumatic double-acting air cylinders or ball-screw linear actuators, it is possible for resistance forces to be automatically set by a user so that plates do not need to be manually loaded and unloaded on each side of a barbell, or weight-stack pins do not need to be moved, and load information does not have to be manually entered by a user. ExerboticsTM gym equipment allows users to electronically set the resistance load via a computer screen without having to manually lift any plates or change a weight-stack pin position, therefore, despite being very expensive, they demonstrate excellent levels of convenience and ‘ease of use’ for the end-user. ‘Active’ force-controlled linear actuators, which employ pressurecontrolled pneumatic cylinders or ‘air muscles’, will be the subject of future research work, because they can be built at much lower cost than precision machined ball-screw linear actuators, the kind used on ExerboticsTM gym equipment [14]. Another major improvement to the existing ‘Smart Gym’ design would be to use brushless DC motors (BLDC or stepper motors) to reduce long term maintenance costs. ‘Brushless’ DC motors require much less maintenance compared to ‘brushed’ DC motors (which employ Two ‘lookup tables’ were designed to determine the states or exact conditions when ‘full assistance’ or ‘partial assistance’ is required. These conditions are continually checked during each iteration of the ‘main loop’ in Fig. 21. Tables 2 and 3 show examples of conditions that could trigger ‘full’ or ‘partial’ assistance for each repetition in a set. Each of these states can be checked continuously via software (The ‘X’ can be placed in any desired cell where assistance is required). Such spotting preferences can also be ‘saved’ for each individual user, just like any of the other major exercise parameters, like the preferred number of sets and number of reps. If the keypad ‘E-stop’ (or ‘Emergency stop’) button is pressed at any time, the entire ‘Smart Gym’ will return to the main menu and the cable brake will be engaged, stopping all movement of the barbell almost immediately. 7. Discussion A demonstration video showing the most important features and functions of the ‘Smart Gym’ prototype can be viewed online at [24]. It is interesting to note that the barbell weight ‘feels’ very natural for loads above 20 kg. When lifting weights below 20 kg, the influence of the spring-reel (cable tensioning device) becomes noticeable, especially with small weights. The spring reel tension force could be reduced a lot further without risk of any cable coming off a pulley. Perhaps a gearbox ratio of 100:1 or even 67:1, for the same size motor, would have been more desirable for producing much faster lifting speeds (double or triple the existing speed), because the maximum motor torque was already almost 3 times higher than necessary for lifting 200 kg. At these gear ratios, variable speed control may have been much more noticeable, rather than always running the winch motor at maximum speed, to produce only very low lifting speeds due to the 200:1 gear ratio. The only major disadvantage of a much lower gear ratio is the greater tendency for a large barbell load to ‘back-drive’ the actual drive motor or winch if it is kept in a ‘neutral state’ (with the H-bridge ‘brake’ mode not activated). Although the 200:1 gearbox requires that the SD11 motor runs at full speed almost all of the time during spotting, the same functionality and performance of the H-bridge motor driver circuitry described in this paper can be achieved with a simple DPDT (Double Pole Double Throw) relay to drive the DC motor in the ‘forward’ and ‘reverse’ directions at top speed from an 80V DC power supply. Hence, for a low-cost version of the ‘Smart Gym’, it may be possible to avoid all the effort, complexities and costs involved in implementing and manufacturing a complicated H-bridge circuit using the complex components and control methods described in Section 5.5. © N&N Global Technology 2015 DOI : 02.IJES.2015.1.4 12 NNGT Int.J. on Embedded Systems, Vol. 2, Feb 2015 conductive brushes that may eventually wear out and need replacement after several months of continuous operation). One of the big disadvantages of using BLDC motors is the need for a separate motor controller system, because controlling stepping or switching states for such a motor typically requires a great deal of computational power (using up a lot of chip resources and control time) for a single microcontroller like an AtmelTM AVR ATmega8535. assist or even protect people in their fitness workouts and in their daily training sessions. It is hoped that this paper will encourage and motivate product developers, engineers and researchers to create new useful machines and high-tech devices to further advance the fields of strength and fitness training and to find innovative ways to raise health and safety standards worldwide. 8. Conclusion Acknowledgments All of the original objectives for this project listed in the introduction were achieved and demonstrated successfully using this prototype. The ‘Smart Gym’ described in this paper can successfully detect and respond quickly to different kinds of states that indicate the need for ‘full’ and ‘partial’ assistance, as well as ‘free-fall’ of the barbell. The ‘C-cleat’ (cable brake) design is effective at quickly arresting any cable movement and allowing the motor to lift the total barbell load. The design principles and mechanisms used in simple ‘add-on’ mechatronic systems like the ‘Smart Gym’ could be implemented or combined with most existing gym equipment that use weight-stacks, pulleys and cables. Such additions to standard gym machines would ensure higher workout safety, improve overall training quality and allow the recording of workout activity for monitoring a user’s progress and strength gains over time. ‘Passive’ resistance systems like the ‘Smart Gym’ are much simpler and cheaper to manufacture than ‘active’ force-controlled gym equipment. They also have the potential to become more popular for home users and could capture a larger market share than much more expensive products which employ ‘active’ force-controlled linear ball-screw actuators. In the not-too-distant future, ‘computer controlled’ gym equipment and their force-controlled actuators could eventually become very popular worldwide and may be adopted by many gyms and chains of fitness centers. Such technologies could find practical uses in many other motion control, automation and robotics applications as their controllers, actuators and sensor components become cheaper, faster, easier to control and easier to use. Growing in popularity are devices like pedometers (step counters), heart rate monitors, wireless ad-hoc ‘Smart sensor’ networks and GPS-enabled embedded systems used in team sports like ‘Paint-ball’ and football, mobile phone fitness 'apps', interactive 3D games and workout programs (e.g. for XboxTM Kinect and WiiTM consoles) and other high-tech health-related products. Strength and fitness training is undoubtedly going to be a rapidly growing area for mechatronics, robotics and embedded systems application development in the near future, since there are many opportunities to use such technologies to The first author wishes to thank former Curtin University Engineering students, Grant Wirth, Peter Kneale and Brett Nardi for allowing several figures from their final-year project thesis [15] to be used in this paper. As the project supervisor and adviser of the ‘Smart Gym’ final-year undergraduate project, the first author gives full credit to these three co-authors (now degree-qualified graduate Mechatronic engineers) for coming up with the original ideas and designs shown in most of the figures in this paper (marked with Reference [15]). All the ideas, methods and designs described in this paper are the culmination of hundreds of hours of shared ideas, research and diligent hard work on the part of all team members. The money to purchase materials and parts for this project was kindly provided by the Department of Mechanical Engineering, Curtin University of Technology, Australia. © N&N Global Technology 2015 DOI : 02.IJES.2015.1.4 References [1] [2] [3] [4] [5] [6] [7] [8] [9] 13 http://www.youtube.com/watch?v=un19kzMssBo http://www.youtube.com/watch?v=AUZYeTbyzzQ V. Patteson Lombardi, “Petition Requesting Labeling of Weightlifting Bench-Press Benches to Reduce or Prevent Deaths due to Asphyxia / Anoxia (CP 03-3),” [Online] Available: http://www.cpsc.gov//PageFiles/87044/weightlt.pdf A. Groberman, “Weightlifter Igor Golushkin Drops 400 Pounds on His Chest, Dies ,” Opposing Views [Online] Available: http://www.opposingviews.com/i/sports/othersports/video-weightlifter-igor-golushkin-drops-400pounds-his-chest-dies R. W. Selle, “Bench press safety apparatus,” US Patent 4799673, Jan 24, 1989. [Online]. Available: http://www.google.com/patents/US4799673 V. Gironda, Unleashing the Wild Physique, Harper-Collins Distribution Services, USA, November 1984. T. English, Men’s Health Natural Bodybuilding Bible: A Complete 24-Week Program For Sculpting Muscles That Show, Rodale Books, New York, June 4, 2013. G. D. Stewart, “Computer controlled exercise machine,” US Patent 4869497, Sep 26, 1989. [Online]. Available: http://www.google.com/patents/US4869497 J. L. McIntosh, “Computer controlled exercise system,” US Patent 4934694, Jun 19, 1990. [Online]. Available: http://www.google.com/patents/US4934694 NNGT Int.J. on Embedded Systems, Vol. 2, Feb 2015 [10] J. A. Casler, “Electronically controlled force application mechanism for exercise machines,” US Patent 5015926, May 14, 1991. [Online]. Available: http://www.google.com/patents/US5015926 [11] D. F. Patterson and M. DuPont, “Dedicated microprocessor controlled exercise resistance machine,” US Patent 4865315, Sep 12, 1989. [Online]. Available: http://www.google.com/patents/US4865315 [12] A. D. Greenberg and K. E. Camhi, “Fitness feedback system for weight stack machines,” US Patent 5785632, July 28, 1998. [Online]. Available: http://www.google.com/patents/US5785632 [13] D. A. Ruis, R. W. Polhemus, W. J. Book, “Robotic exercise machine and method,” US Patent 4235437, Nov 25, 1980. [Online]. Available: http://www.google.com/patents/US4235437 [14] Exerbotics website [Online]. Available: http://www.exerbotics.com [15] G. Wirth, P. Kneale and B. Nardi, Smart Gym, Undergraduate Mechatronic Engineering thesis, Department of Mechanical and Mechatronic Engineering, Curtin University of Technology, Western Australia, 2006. (Unpublished) [16] RonstanTM C-cleat [Online] Available: http://www.ronstan.com/marine/range.asp?RnID=061 [17] F. Beer, E. Russell Johnston Jr, and D. Mazurek, Vector Mechanics for Engineers: Statics 10th Ed, McGraw-Hill, USA, 2012 [18] F. Beer, F., E. Russell Johnston, J. DeWolf, and D. Mazurek, Mechanics of Materials 6th Ed, McGraw-Hill, USA, 2011. [19] Atmel AVR ATmega8535 [Online] Available: http://www.atmel.com/devices/ATMEGA8535.aspx [20] HCTL-2022 datasheet [Online] Available: http://www.alldatasheet.com/view.jsp?Searchword=HCTL2022 [21] NE555 datasheet [Online] Available: http://www.alldatasheet.com/view.jsp?Searchword=NE555 [22] Intersil, 2004, HIP4081, 80V High Frequency H-Bridge Driver datasheet FN3659.7 [Online] Available: http://www.intersil.com/data/fn/fn3659.pdf [23] BASCOM-AVR (BASIC) software [Online] Available: http://www.mcselec.com [24] Smart Gym demonstration video [Online] Available: http://www.youtube.com/watch?v=pCnOz58B0Fs Dr. Sam Cubero was born in 1972 and was raised and educated entirely in Australia since the age of 2 after his Filipino parents immigrated from the Philippines to Australia in 1974. He completed his B.Eng (Bachelor of Engineering) degree, with Honours, in 1993, at the University of Queensland, Brisbane, specializing in mechanical engineering. He completed his Ph.D in Mechatronic Engineering at the University of Southern Queensland (USQ) in 1998, specializing in embedded controller development, robotic walking vehicles, simulation programming and variable force, speed and position controlled actuators. From 1998 to 2007, he lectured and developed the teaching and lab materials for several new subjects at Curtin University of Technology, Western Australia, in the areas of 2D and 3D CAD (Engineering Graphics), practical mechatronics (designing, building and controlling custom-made mobile robots, robot arms and embedded systems), automation and motion control, machine design and manufacturing, microcontroller and PC programming, and electronics (for designing and building mobile robots and motion controllers for mechatronic and remote-controlled systems). From 2007 to 2010, he worked at the University of Southern Queensland (USQ), teaching several different engineering subjects, including robotics and machine vision labs, CAD for engineering graphics and surveying, and PBL (project based) engineering design subjects. Dr. Sam Cubero currently works at the Petroleum Institute, Abu Dhabi, United Arab Emirates (UAE), teaching several different engineering subjects and supervising research projects relating to product manufacturing, design, CAD, walking vehicles, exoskeleton robot suits and several different mobile robots. One of Dr. Sam Cubero’s part-time hobbies is amateur bodybuilding (regular weight-training and sports nutrition). You can view his detailed CV and sample movies of many of his successful robotics and machine-vision research and development projects at www.samcubero.com © N&N Global Technology 2015 DOI : 02.IJES.2015.1.4 14