DefectiveDave Posted March 13, 2014 Share Posted March 13, 2014 I've been undertaking a project this winter which I thought I might share. This post is a bit lengthy, so there are videos at the end if you'd like to skip some of the details. Right before Christmas a friend lent me their copy of the West Coast Slalom DVD and I thought it was a great video which made some really good points. I wanted to get out on the water and start trying some stuff out, but it was almost Christmas and everyone I know had already stopped skiing and winterized their boat (including myself). So here I was obsessing over skiing with no way to actually get out on the water, so I redirected my energy. I really liked the section where they had measured the intermittent loads as Terry and Marcus had performed their various runs and I was curious what my own loads might be. It also seemed to me that load data could be a good quantitative metric to help judge my own performance run-to-run and to evaluate the effects of changes to my technique. So I started looking around to see if such a thing existed and found nothing which fit my criterion. I could either get a mechanical dynamometer for around $500-1000 and let someone monitor or video it, or I could get a commercial of the shelf (COTS) data acquisition (DAQ) unit with load cell and pay around $2000-2500. I didn't like the dynamometer while the COTS option was just way out of my budget and didn't do exactly what I wanted, so I decided to build my own. I'd never done embedded systems before so I started out with the Arduino platform, which has a supportive hobbist community and lots of documentation. I needed a microcontroller, load cell, signal conditioner, data logger, and an LCD to interact with the device. The Arduino platform itself provides the microcontroller and I readily found available “shields” for Arduino which gave me a data logger and LCD. Shields are really just prepackaged electronics board which are designed to be easily attached to the Arduino boards. I was also able to track down a cheap $95 1000 lb (450 kg) s-type load cell and I built the signal conditioner myself. I packaged it all into a “water-proof” box which I hope will survive next season and beyond. Here is the final prototype including load cell: I used a bayonet connector to make sure the load cell can be securely attached to the electronics box. I also only used two switches in the design, the first switch controls battery power (on-off) and the second functions as the sole input switch for the user interface (UI). The single UI switch was meant to keep things as simple as possible so I can focus on skiing and not fiddling with the data acquisition system. The 1000 lb load cell might be a bit of overkill, but I wanted that extra factor of safety in there just in case. Better too much capacity than too little. It still provides a resolution on the order of about 0.9 lb (0.4 kg), which is more than enough for my purposes. It's notable that the signal conditioning does slightly limit the range and in the end the device can capture loads from 0-900 lbs (0-410 kg). I also used 2x 18650 lithium ion batteries to provide enough juice for a full day of skiing (more on this later). I did all the programming and software architecture myself, but I used several libraries available from the community to help expedite the process (sdFat, wire, and nilrtos). I made sure to store data to an SD card in comma separated value (CSV) format so that it would be easily readable and portable across systems. This also provided lots of space so I could record data for very long periods of time. However, the SD card also created plenty of lag in the system due to it's write latency and I was forced to implement a real time operating system (RTOS). For this purpose I used NilRTOS by Giovanni Di Sirio (the Arduino port was provided by Bill Greiman), which allowed me to easily deal with the latency of the SD write and better control time intervals between write operations (down to the microsecond). In the end I was able to get data acquisition rates of approximately 488 Hz using the Atmega 328 microcontroller in the Arduino Uno R3 while still performing some simple data processing to output calibrated loads rather than scale values. The Atmega 328 is an old 8-bit microcontroller which functions at 16 Mhz and has very limited memory, modern options such as the Cortex M4 platform would provide much higher data acquisition rates and allow for more comprehensive data processing. The first thing I did after getting the system up and running was get an approximation of the battery life. The system uses 2x 18650 protected lithium ion batteries connected in series. These batteries each provide 3.7-4.2 V of juice and are rated at 2400 mah. I simply measured the input current directly from the battery during data acquisition and found that the entire system draws between 70-100 ma depending on whether a write operation to the SD card is taking place. This indicates that the total battery life is approximately 24 hours in the worse case scenario and 34 hours in the best case. It seems too good to be true, but these are pretty substantial batteries and I wouldn't be surprised if those measurements hold. In any case we'll see next season. I also provided a calibration by using the load cell to measure various objects around the house. That data can be seen in the plot below: In general, load cells exhibit a linear response. However, their signal output is approximately 3mV/V which means that an amplifier is required to measure the signal. I used a texas instruemnts INA125p op-amp to boost the signal to be read by the Arduino's 10-bit ADC. Unfortunately, in the low range this op-amp is not able to provide a linear signal transformation, which is why the data above is non-linear for small loads. There are ways that I could fix this electronically such as by using a negative source voltage, but it wasn't necessary. I simply compensated for it in software by building it into the calibration. I also wanted to test the device in course like conditions, but I had no way of getting out on the water at this time of year. So I setup a little test on the deck as seen in the video below: Here is a plot of the data collected during the video: If you zoom in you can even see where the rope slipped: Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now