Software apps and online services
Hand tools and fabrication machines
The Lehman College Exercise Science Department was conducting studies around weight training. There were inconsistencies in range of motion for repetitions, which could significantly influence the data. I was approached to create a device that would identify full range of motion for exercises that used machines or larger weights.
The device needed to meet the following conditions:
- Adjustable Distance
- Not permanently fixed to machines.
- Tripod Compatible
- No wires
Most parts are shown below, but for a full list, refer to the BoM above. The parts used are selected not because they're optimal; that's what I had to work with. The footprint could be greatly reduced with custom PCBs, SMT components, or a LiPo battery.
The NewPing library is required for the code (provided at the bottom) to compile.
The buzzer frequency and the upper/lower bounds are global variables that can be altered. The upper/lower bounds refer to the min and max distance the sensor reads, which is mapped to the analog value [0,5]V from the potentiometer.
int frequency = 700; //Frequency in Hz
int lower_bound = 60; //Distance in mm
int upper_bound = 200; //Distance in mm
3 beeps occur on power up to indicate that the boot was successful (see the
setup() loop). Next,
loop() continuously requests data from the ultrasonic sensor and compares it to the threshold set by the potentiometer.
All files have been uploaded to thingiverse, or one condensed file can be found at the bottom of the page. How to use CAD will not be covered here. The model was made with the limitations of 3D printing in consideration. Overhangs were minimized by using 45 degree chamfers, which reduces support material. Clearances were generous, so parts should fit despite being printed on differently calibrated printers.
Print times will vary, but my print times were as follows:
- Top Piece: 2 hours 40 minutes
- Bottom Piece: 2 hours 20 minutes
- Knob: 20 minutes
The circuit schematics are provided at the bottom of the page. Parts are inserted without being wired to confirm the fits.
Salvaged IDE cables provided all the wires. Groups of wires can be peeled while remaining attached to one another, which provides some order.
Most of the electronics are mounted to one of the printed parts, so some thought must be put into wire routing and management.
The SMD indicator LEDs on the TP4056 board were desoldered. Extension wires and 3mm THT LEDs were soldered in their place. Current limiting resistors are still integrated with the board. There is a video of someone performing this relocation.
The arduino nano only had 2 accessible ground pads, so a stripboard was used to expand the number of ground pads. The same was done with the 5V line, which can be see in the picture below.
Breaking the connection on the strip is necessary so that 5V is not shorted to ground. The red "X" illustrates the location of the break. Only the top copper needs to be disrupted, not the entire fiberglass board.
Components were wired outside the enclosure. They were occasionally fitted in the enclosure to measure wire length and check for wire interference.
The potentiometer was trimmed by 6mm so that it would not protrude as much.
The connection to the 18650 was soldered on directly, which is bad practice. Overheating the cell will damage it and can fail over time. Spot welding an aluminum strip is the correct way of connecting 18650s.
Hot glue was shamefully used to secure the electronics. Avoid using hot glue when possible. Correct mechanical design and fasteners will outlast hot glue. It is bound to fail over time. It is understandable for prototypes, but production parts will never use hot glue.
In retrospect, I would have preferred using an IR sensor rather than the Ultrasonic, but there was no way I could have known this until I began to experiment with the Ultrasonic sensor. IR sensors have a narrower FOV with a tradeoff of a far lower maximum distance (~3ft).
If there were to be a second version, a LiPo would replace the 18650. The large knurled adaper nut is heavy and consumes space. The standard thread for tripod mounts is 1/4", so a simple 1/4" nut from the hardware store suffices. Custom PCBs would reduce the volume by half.
For a prototype that was conceived from concept to hand off within 2 weeks, I am content.Future of the Project
When I was experimenting with the ultrasound sensor, I learned more about its limitations. The first being that its FOV has an angle of ~±15° (30° total). This meant that an object can trigger the buzzer before it's directly above the sensor. This yields inaccuracies and undesirable readings. Additionally, if the object's plane is not perpendicular (or within the angle of tolerance) to the transmitted sound wave, the sensor will not receive a reflected wave and won't be able to process a value for distance.
My initial plan was to have the unit rest on the ground and allow for the plates on a weight training bar to trigger the buzzer when they were lowered past the threshold. This system consisted of a fixed sensor and a moving trigger. My fellow engineering buddy had proposed an alternative solution, which involved inverting the system. He proposed mounting the sensor to the moving bar while pointing it to the ground. This way the ground became the trigger. It also eliminated inaccuracies due to a wide FOV as previously mentioned.
The proposal was not only a great solution to the given issues, but it is also very easy to implement. The order for the 1/4" tripod nut adapter came with a 1/4" -> 3/8" adapter AND a 3/8" -> 1/4" adapter. The second one will actually come into use!
As I did not have access to my dremel when I first began to 3D model, that forced me to account for the entire tripod adapter. This in combination with an 18650 cell increased the weight significantly. I do not want to add any more weight than I need to, so I will cut down the second tripod adapter before modeling the mount. I will get back to the project in a week to complete this alternative mounting solution. Until then, it still works nonetheless!