Saturday, December 21, 2013
Mega Fitness Software Review Project
I’m evaluating where to live for my new job: sleepy town with a 5 minute walk to work, or big centre that is a 20 – 30 minute low traffic drive. There is a lot to things to think about going forward, but the big thing I’m interested in is getting back on a training plan.
Going forward I’ll be working more on sports and fitness technology. I really want to converge my job and my lifestyle, which is something that is commonplace in new, young, vibrant companies whereas there is less of that in older corporate companies. For me, that means that work can be a bit more flexible, but I don’t mind long days or testing a piece of hardware on a bike ride on my own time. In fact, the more sports tech I have access to, the better.
I’ve found that older style corporate environments are not ideal to a more physically active lifestyle. I won’t go into specifics, but the short of it is that it can feel more accepting of smokers than runners or cyclists. In some cases a lack of a shower or an open ideology to being active means can mean there is no chance of a physically active employee.
So what does this change mean for me:
It means a dedicated training (and food) plan. While some people use exercise and training interchangeably, I think of them as distinct and very different. Exercise is great but usually less structured and focus, while a training plan means something is planned with long term vision and each workout is decided beforehand – and you fight through an off day, or use a rest day as expected.
So this gets to something I’d like to do. I’ve been using several pieces of software and I haven’t found a good summary of them, their uses, etc. I kind of want to do something similar to what Ray does with his in-depth reviews, but for online workout tracking software. The biggest challenge is that they change – so a review 3 months old might not be valid. So here is a quick review and for reference TGI = Thoughts Going Into the Evaluation.
Friday, November 29, 2013
“Do you want to build fifty in a basement, or do you…”
On Friday, the 15th of November, a piece of paper was signed which saw my work change hands taking me along with it. I don’t remember what the rest of that quote was from my first telephone call with the CEO that I nervously made from my car in a parking lot. I want to insert something like “change the world” or “change the face of cycling” or maybe it was just a larger number. I walked away from the call a little confused with a lot of thinking to do. I trust and believe in the people at this company.
I truly think this is the best thing possible route for me to take. I didn’t want to be another late and under delivering Kickstarter with production troubles due to my inexperience with outsourcing or marketing. Striking while the iron is hot is hard when you can only dedicated 15 – 25 hours a week to something and maybe a few hundred dollars a month.
As for the blog, it will remain (no posts will be deleted) but it will stop any further documentation of the development as it’s going to be under a commercial entity. There is going to be a major design change, and the final product will look nothing like what I’ve developed and conceptualized.
This is a super exciting time and I’d love to explain the new and unique ideas on the table or just how we think we can shake things up. The people I’ve met truly feel very like minded, and in a the few days with them I felt like part of the team even though we were just in the initial phases of talking.
Below are a few imaginary FAQ question about the situation and general explanations.
Monday, October 21, 2013
Cheap Arm Programmer
So you have a custom ARM Cortex-m0 (or other) board you want to program. Perhaps, like me, it’s a custom board using Nordic Semiconductors nRF51422/822/922. You may have bought an Evaluation Kit with a built in J-Link debugger. However, once you move to a custom board you now face the problem of programming it.
I bought both the nRF51422-EK and nRF51422-DK. Each kit was $100 USD. The EK did what I wanted, the DK “requires” the nRFgo development kit which is $400 dollars. What you might not know is that this board provides only power and the nRF51422-DK comes with a Segger J-Link lite. The J-link Lite is what I’ve been using to program my custom boards. I think $100 dollars for a programmer is ridiculous. My AVR was $50 dollars and that allows me to do everything.
Enter CMSIS-DAP. It seems this is intended to add debug functionality and firmware updating to embedded applications but looks like you can use it as a standalone programmer without any restrictions (like with the J-Link EDU; Cost effective but limited to Educational).
So pick yourself up a $14 Freescale Freedom FRDM-KL25Z. Cheaper than an Arduino and way more powerful with a 3 axis accelerometer, a tri colour LED and a capacitive sensor. It has two microcontrollers – the main one and a little one running OpenSDA. With OpenSDA you can load up a CMSIS-DAP firmware from Freescale and program other boards. Credit to www.mcuoneclipse.com for the idea.
Here is how:
- Cut J11 Trace. This disables programming the main KL25Z microcontroller.
- Install a 1mm pitch, 10 Pin header at J6. Little bit difficult to solder due to the fine pitch.
- Break Pin 7 off – This is the Key pin. This isn’t needed if you don’t have a blocked pin on your ribbon cable.
- Hold RST while plugging it in. This loads it into OpenSDA firmware upload mode.
- See a new drive
- Download Freescale Quickstart here and copy CMSIS-DAP_OpenSDA.S19 to the Bootloader
- Unplug and plug back in. Now Freescale is in CMSIS-DAP mode.
- Connect your custom board
- Set to CMSIS-DAP (I’m using Keil)
- Switch to SW programming and not JTAG
There are other firmwares for programming but they are locked to Freescale Devices. The CMSIS-DAP isn’t. The trade off is that you lose the Serial to USB lines on the OpenSDA programmer. Oh well.
Saturday, October 19, 2013
Random Trip to Alberta
AB Ride
As some of you may have read, I recently travelled to Alberta and I got to take my bike with me. Everyone had talked to me about riding from Canmore to Banff, but having seen the drive to Canmore from North West Calgary, it was a bit of a longer round trip plus I had to go Karting later that afternoon. A lot more after the break. Less powermeter, more adventure stuff.
Thursday, October 17, 2013
More on Accuity + Quarq
After spending a few nights dealing with the required decoupling math for the Quarq + Accuity unit I’m still not 100% there. I feel I’m 95% there, but something is eluding me.
The right measurement is dead on, within 1-3% of the Quarq.
The left measurement is another story ranging from 5 – 8% out.
What I thought was the original issue was due to the non-integrated spider and that I didn’t place the shear strain gauge deep enough down the hole. As a result it can see some of the stain caused by the torque on the right arm in the left sensor. A few ways of dealing with this:
- Reinstrument with another strain gauge (about 3 evenings of work)
- De-coupling Math (in theory short, but probably 3 evenings of work… to get right)
Essentially the math works by calculating the torque on right arm from the right strain sensor setup, and then subtracting that small percentage from the left arm. How much are we talking?
For every 1 N-M on the right arm, I can see 0.0075 N-M on the left arm. I messed up the math earlier which caused each arm to work nicely independently but together they didn’t work right which resulted in a significantly reduced measurement of power and the balance skewed 100% right.
Now that this is all sorted I have the problem that the Left sensor is reading low, both independently and concurrently. I can artificially dial it into the Quarq but I don’t believe that is the correct thing to do.
Question I’m trying to determine. Could the loss of torque due to the bottom bracket bearings be affecting the calibration? Would the Quarq have been calibrated for each side and then averaged? Am I missing something?
I was checking for force sensitivity due to twisting the arm and at best I could muster was adding more force, not losing it.
Other things of note
The small Sunnto style m-ANT (tiny) stick DOES NOT WORK with the old .NET libraries. You need the latest ones! Having realized that I’ve started using my double powermeter recording software with an AP1 or AP2 usb stick. I dislike how it sticks out on my laptop though. I think I just need to replace a .DLL file but haven’t tried it.
To summarize:
- Carbon fibre remaining linear; multiple calibrations resulted in nearly the same numbers (18.62 versus 18.82 bits/N-M) with multiple points.
- There is some permanent strain in the carbon caused somewhere between flying it from ON to AB. Didn’t affect calibration really.
- Bad decoupling math was the problem with it not functioning correctly in AB and resulted in swapping to my Aluminum Rival Crank which still works very well.
- Still investigating the small percentage difference between prototype and Quarq
- m-ANT stick requires new libraries for .NET development
- Samsung commits to ANT+; At least on flagship
- If you have an idea on why my calibration might be off write me here
Personal notes: I wish that the Nexus 5 will be reasonably priced and have ANT+.
Tuesday, October 15, 2013
Short Break–Back Very Soon
There have been a lot of things going on in the background which has prevented me from posting anything for the last few weeks. I’m currently refining the Quarq + Accuity unit. It’s working well but there are some force sensitivity investigations that I want to conduct and I might want to reinstall the left leg sensing strain gauge.
Upcoming potential posts
- Carbon, carbon, carbon – the good and bad. Surprisingly little bad thus far.
- My interview with Auto21 which funded my Masters research. Canadian Automotive research at it’s finest
- Potentially a biweekly podcast with some other good folks interested in cycling and power (still working out details).
- Strain gauges and some issues
- Trip to Alberta – Less bike related and didn’t make it to the ANT+ symposium but some fun things to do in AB. Must cycle Banff and Canmore next time. This time was just outside Calgary area cycling. Also, Go-Karts.
Monday, September 30, 2013
Quarq or Accuity
Quarq or Accuity? Guess which is which.
Testing right side then left side!
Close, almost perfect. Going back to check calibration data. This one requires some "Decoupling" math which I'll get into when I do a serious post soon. Very very busy week.
Friday, September 27, 2013
Quar-ccuity (or Accuiq?) and ANTride
Quarq + Accuity
The Quarq + Accuity crankset is almost ready. Major changes since the Rival based version include:
- Zero offset (or “calibration response”) programming has had a major change. Rather than a separate function that takes over control temporarily, it uses the existing code in the main body read the strain gauges. This probably sounds unimportant, but it’s the result of a peculiar issue where current drain was increasing when I tried to zero only the right side. By leaving it to alternatively read left then right sensors like it normally does it maintains currrent draw as is.This improves stability and how “clean” the code is. I think this is the result of the higher impedance wiring used combined with a capacitor issue. Either way, this makes the system more robust over the usable voltage of the battery.
- When you use a cycle computer to tell it to Zero offset (or “calibrate”), it reads back the offset (eg –417 when I zero my Quarq Cinqo). Unlike Quarq, which translates this value to 1/32 N-M, mine is left as the raw ADC values. I’d be surprised if Quarq isn’t doing this as well and it just happens to be “about” 1/32 of a N-M. For this Accuity build each value is 1/20.26th of a N-M for the left and 1/17.50 of a N-M for the right.
- This Build uses a different strain gauge setup for the right leg compared to the Rival unit. The S900 crank is using the actual intended setup that was intended for Accuity and not re-working the existing setup of V3. V3 was more sensitive setup, but it’s a pain to wire and difficult to integrate the setup into the board without some lead wire resistance mismatching.
- Detection for when the rider has stopped pedalling gives better / “cleaner” restart values. It’s still not perfect, but it generally doesn’t interfere with data. David Johnstone over at cyclinganalytics.com has been picking apart my L/R data and pointing out an issue that the values go to 100% left value when you resume pedalling. I haven’t fully nailed this down but I’m almost there (I think).
- Reduced power consumption. The Rival crank has a different voltage drop resistor and received the power from the battery directly. Now the strain gauges are powered from the 2.048V linear regulator on the ADS1248. That’s a 1 volt drop plus the same 750 ohm in line resistor. The strain gauges are operating at less than 0.5V. This is important because in the planned sleep mode (ie: not riding) it can turn off the strain gauge power supply.
The next major step (to hopefully happen Sunday) is doing my initial indoor tests. Kurt pointed out to me via twitter that I could use the small cup cone on the lever skewer. I didn’t trust it when I got the trainer so I swapped it. I’ll carefully try it. I’m not 160lbs climber. More Clydesdale.
ANTride
This isn’t really a real name. I’ve had a lot of traffic thanks to Ray over at Dcrainmaker.com due to tweeting in response to the Muin review. He linked to a short post (here) asking for feedback on his week end review.
What is ANTride? The short explanation is that cycle trainers are predictable devices. Things like TrainerRoad and the Lemond trainer have taken advantage of this to create “virtual power”. This is the indoor equivalent of what iBike tries to do outside. Kurt built the inride as an application of their regression curve for average power on their site. However, they were very clever having already tried a basic cycle computer before – they incorporated a spin down test to to measure acceleration and possibly rolling resistance to increase the accuracy. As you can see from the review there are a few people asking about ANT+ since it’s a BTLE only device.
If you’ve used a powermeter then you know that outdoors it can be tough to dial in on a number and hold it since there are so many competing factors such as wind, hills, other riders, etc. Eventually you get better at this but it takes a while. On a trainer this is much easier. If you already own a powermeter then there isn’t a point to this device. If you don’t own a powermeter, or one is out of financial reach than this can be an attractive option to a lot of people. Off season training means training with power.
Why build this if you can indoor train at a computer using a speed sensor. A few reasons.
- You want to capture that data to your ANT+ cycle computer
- You don’t train in front of a computer (Garage, basement, spare room, etc)
- Improved accuracy
That last one is something that Inride does well at a fraction of the price of a direct force power meter. However it comes at a price. Location. In order to determine the acceleration of a wheel accurately a simple magnetic switch sensor doesn’t cut it. This means that none of the Speed interpolators can have that level of accuracy. That is why Inride senses at the roller. It’s higher speed means it can detect accelerations much more accurately.
So going forward there is a choice here. I can achieve the same accuracy as Kurt Kinetic Inride putting it within 2% of a real powermeter but only if I can get more accurate measurements of acceleration. This is where people might say that “all hope is lost”. Hold tight.
There is another way to pull this off with very good accuracy. Enter the MEMs gyro. I discounted this for the powermeter (though I’m thinking about it again, mainly in terms of wanting to offer every possible feature out there at a fraction of the price – and a high speed mode will need it). A gyro attached to the wheel can provide very accurate information.
I’m going to test the magnet sensor on my kurt kinetic and see if I can make the calibration work.
I’m low on available development time so I’m going to think about this some more. In the meantime feel free to leave a comment or email me at kwakeham@gmail.com.
Monday, September 23, 2013
DIY Power without the Meter
That really didn’t take very long for a proof of concept!
Okay, so you can see the code in the background there and ANT+ is getting super easy for me especially since I re-use a lot of code. The real goal would be setting this up as a small updatable device so that other trainers can be configured. The best way to do this is to aggregate data from multiple peoples rides on different trainers with powermeters to develop quality regressions that can then be uploaded onto the device for people who don’t have powermeters but still want to train with power.
Sunday, September 22, 2013
ANT+ Trainer Power transmitter?
I was just reading DCrainmaker’s latest post on the a new silent trainer here, the Elite Turbo Muin. A lot of the feedback from people has been asking if the App does power why couldn’t they build in power transmission via a sensor!
Seriously!
Here is how I can do this, and I’ve thought about doing it.
- Get the regression curve
- Make it yourself with a real powermeter (Powertap, Quarq, SRM) with the LINEST feature in Excel for a 3rd or 4th order polynomial.
- Use the CSV file from the App and regress the curve yourself
- Using the reference code from Nordic Semiconductor in the SDK you setup a speed measurement with a reed switch / magnetic sensor and measure rotational speed.
- Two lines of code
- Calculate power based on speed
- Update ANT+ transmission
Saturday, September 21, 2013
Enclosure and Carbon Fibre Cranks
The enclosure is getting closer to what I want. I’ve ditched the wrap-around plastic on the drive side arm and I’m contemplating using a wire from the BB Axle (plastic cap) to the electronics enclosure. This is similar to Pioneer’s design. It’s not great but it’s easier and may help with speeding up the process to beta and compatibility initially with other cranksets.
As for calibration of the carbon fibre crankset, it looks very linear at least initially. Way to go SRAM for QA. This’ll make the comparison of the Quarq unit to Accuity so much easier. It’s expected to be linear as a new crank but my background research shows that at higher usage factors it’ll go non-linear. I can’t get the specific answer out of any manufacturer I tired so far. If it goes non-linear it can be calibrated out, however a much more sophisticated calibration is needed – unlike the simple hanging weight test.
A load cell rated to 1000lbs is tested at multiple points including 1000lbs and quotes linearity. If anyone ever gets a power meter from me they will be getting documentation on the calibration values and it won’t just be a single weight test. I want it tested to at least about 170N-M of torque which correlates to a 100kg person’s entire weight.
The calibration values all come out to be nearly identical. The weights that were used were measured on a calibrated scale at work and confirmed (to the 0.1 gram) with my household scale to the gram. The linear regressions are almost perfect
I plotted the R^2 values. Looks nice and linear to me. Also, keep in mind that the number of counts is only on a 16 bit scale. I’m capturing at 24 bits, but the last few are noisy. At 16 bits it’s noise free (it’s actually noise free to 18 bits, but it’s hard to do 18 bit math with a 32 bit microcontroller without pointless programming).
Back to the carbon crank, until there are some fatigue cycles on the crank, a new carbon fibre crankset is giving reliable and accurate readings. Time will tell once the carbon starts to fatigue.
Tuesday, September 17, 2013
Enclosures and More
It’s been a few days since I’ve written anything. It’s been a very busy few weeks. Nothing overwhelming stands out but the enclosure design in progressing. I’ve also been prepping the Quarq + Accuity comparison unit.
Above is the first design attempt. A small amount of plastic wraps around the outside of the arm and protects the wires leading to the axle.
Generally it’s hollow inside and the enclosure supports an off the shelf battery holder. This contributes to the larger lower enclosure size. I’m concerned about clearances all around. I generally don’t like this design, however the board was specifically designed to go on the backside of the drive arm between the chainrings and the crank arm.
I attempted to diverge a little from the original design and try a setup with the board and battery above the crank arm. This is not idea because all the fragile wires from the strain gauges have a greater distance to travel. This leads to all sorts of issues. The most ideal is to keep things short. This comes back to trying to place the board inside the crank arm.
Having given up on the second design I’m revisiting how to make the first more effective. I’m integrating the battery holder into the design to minimize size and weight. There isn’t much room around the crank arm. Lots more work ahead.
On to the Quarq + Accuity unit.
First the S950 (S900 compact version) crank has it’s spider removed. Just 3 simple Torx bolts. I wish everyone would use this design. SRAM (well Quarq really) should push this as the standard for everyone who wants to make a crank with removable spider. Right now the Cannondale, FSA, and SRAM units are not interchangeable. We can use ANT+ but can’t have a physical standard?
Then I removed the Quarq unit from the S975 Cinqo. The Cinqo holds much much tighter tolerances and was on a bit more snuggly. I’ll chalk this up to China / Taiwan manufacturing versus American. While swapping the chain rings requires recalibration, removal of the whole setup does not. There has been some talk about the removal of the chain rings and torqueing the bolts over at the Slowtwitch forums. I haven’t done this myself and don’t plan too. In the event I do then I’d like to check the calibration with the iPhone app – which as soon as I get a Wahoo dongle I can as I was given a “broken” iPhone 3GS. The screen is crack but still functions fine. Amazing. Maybe I’ll just send it in to Quarq with the Accuity prototype in tow and get them to calibrate it then?
I prepared the crank arms carbon fibre just like Vishay’s tech notes say to and applied the strain gauges.
Another picture with a better view.
I also installed the inside torque sensing strain gauge. All gauges were installed very quickly but I haven’t tested them yet except for resistance. Carbon prep time is much faster as abrasives can eat into the epoxy very quickly. DO NOT USE CONDITIONER A. Conditioner A is a mild acid, and a mild acid eats the plastic. The neutralizer (base) is fine to use. When sanding using isopropyl alcohol only.
Recently I’ve been testing the boards and their connection and function with the Texas Instruments ADS1248. Remember the four boards I made up and transmitted fine? I didn’t test the ADC interface. There were some bad connections on this board with the ADS1248 which meant it was acting very stupid. Finally got it working just before bed time last night.
Here is a picture of testing the board with my four sensor setup Rival arm used for thermal and force sensitivity testing.
So that’s everything. I’m hoping in 1 – 2 weeks to have a Quarq to Accuity comparison but don’t hold your breath. I’ll get the bike on the trainer inside to do this and if I can find another Garmin Edge 500 or similar for a decent price I’ll setup them both up outside for a ride.
Sunday, September 1, 2013
Prelude to Launching a Beta Test
Above you see the culmination of 13 hours of work – 4 simple circuit boards. They aren’t fully tested at this stage either. They have all been programmed and checked to see if they transmit but I still have to test the ADS1248 interface to make sure they measure the strain gauges and the cadence circuits. Bad connections between the nRF51422 and the circuit board could mean that a board can’t function as a power meter.
This marks the beginning of preparations for the beta test.
I would like to diverge a little to talk about startups, and the effort it takes to get to this stage.
I was sent an article on Inc.com (here) about startups, depression, burn out, drive, ambition, etc. It’s a very good article and it reflects my own work to a smaller extent. It can be a serious struggle to balance a day job, build a “company” and a powermeter (I consider these two different things and the first is neglected), and maintain a level of health and activity, all while staying up to date on several industries. Oh, and when I have a chance Tweet and Blog.
My goals have been lofty but I am very proud that I have a functioning powermeter of my own design on my bike right now. Over the three prototypes I’ve built in the last year It has low power consumption and though it has some minor issues it’s working very well and is quite usable – unless it rains. It still needs a little more programming and an enclosure but it’s done 100km outside. This is far from an endurance test but it’s a good start. The last two rides were solid and now I have to track down a bug – one that doesn’t quite interfere with it’s operation. So now I’m moving on to building up my beta test units.
Recently I received an email asking about the beta test. It reminded me that I’m behind my original schedule. I had posted a couple of times that I’m off schedule because I had to revise the circuit board due to Balun problems. It’s a major pain to be on the verge of something and spend even second of your free time to just find out something doesn’t work.
So the email frazzled me a little but I’m seeing that right now is the time to grow thicker skin. I’m finding I need that more every day. I’m starting to see comments, even from the innovative and startup laden Waterloo, Ontario area extolling how they could build a powermeter, but that they’d rather be riding.
I’ll never be a pro cyclist but I can be a a pro engineer. That’s my choice, and I made that choice long before I ever loved cycling. I made that choice when I was five years old - I decided I’ll engineer for the rest of my life. And that means hands on, not just desk work. This is one project that I chose to dedicate myself to. If it doesn’t pan out I’ll know a lot more, and if it does maybe those who would rather ride than engineer can ride a little better, a little farther, a little faster all by using something I made.
As it stands am now 2 weeks into oblivion. Sadly planning is part of the business side and as I mentioned I’ve neglected. However, I’m not three years off thankfully! I think I need another month or two. I might have to start looking south for testers. Boulder Colorado maybe?
So, I’m on the cusp of building up beta units, talking to potential users on a regular basis, getting feedback, documenting everything, etc. If I thought building a powermeter was going to be a daunting task, an even larger task lay ahead of me and one that I am even less familiar with.
I was advised that there are two ways to go with building a startup. Either you protect your concept with a patent, or you have to build a product and customer base. Reviewing the patent situation it’s apparently that you can’t really patent much in terms of powermeters. So that’s left me with only the later option. I’ve been exploring this via the concepts of Lean Startup and Minimum Viable Product. It’s a huge learning curve, but I’m been working on it about 20 hours a week for the last year.
Nothing is perfect. There is a lot to live up to in the cycling market. There are going to be arguments about products. There will be those who ridicule me, telling me that it’s not needed or telling me that I’m a disappointment. Customers who, no matter my intentions, will tell me that my product is junk – even when I offer them a new replacement or a full refund or both. A startup isn’t an easy prospect. It’s not for the faint of heart.
If you’re reading this blog as a potential customer, you’re the most important person to me and I’ll do my best to make things right.
If you’re reading this blog as a hardware hacker, I want to share this knowledge with you – hackers lead directly to innovation. You can’t invent something if you don’t know how to do something. So what if you have to build a diy bulky version of DI2 or an Arduino cycle computer, you’re learning and eventually you’ll have enough background and knowledge to innovate.
If you’re reading this blog as a fellow startup, then research hard, work hard, believe in your product, and know when to pivot or exit. Try hard to maintain a balance in your life. Startup’s are hard and can cause burnout, depression, and more. I’m so glad that testing now coincides with riding but I did a poor job balancing things until this point. Learn from my examples. However long something should take, double it. At least then you’ll have a buffer.
Monday, August 26, 2013
Accuity V4.1 Working Well; Safety First!
I went on my third ride last night (fit file here) with zero dropouts, but there is one spike for some reason I’ve yet to determine. The Garmin connect link is here for those who are interested. To do is check the calibration. To get to a minimum viable product I need to finish the enclosure and auto shutdown when not pedalling for a few minutes. 150 hours of life (estimated) doesn’t seem that long when it spends 22 hours a day not in use.
I made a video tonight explaining how pedal based power meters such as Garmin Vector and Look Power Pedal work. It also explains how Resonant String Gauges for the Swedish Adrenaline indiegogo project likely work (here). The video is still uploading, and it’s fairly basic whiteboard video. It’ll be here later tonight. Direct link / post tomorrow.
I want to apologize for taking video in an unsafe manner for Accuity V4.1’s first ride. Please don’t do the same. It was stupid and reckless endangering myself unnecessarily. If you must take video buy a cheap camera mount or a GoPro. I ordered a mount today to take some video. It’s cheap from China but I suspect it’ll do the job.
Wednesday, August 21, 2013
Accuity Powermeter Testing Video and Data File
I’ve also made my Garmin Connect file public (Garmin here, Fit File here) so everyone can download it. There are anomalies and this is a first test!
- Bad battery connection means that it loses it’s zero and causes massive offset showing as huge power numbers (up to 18000 watts!)
- A few times during the video it’s noticeable that if the crank hasn’t been rotated in a while and during the first rotation there is an abnormally high power number. There is an overflow issue or double tripping of the Magnetic reed switch causing an erroneously high power for the first 1 – 2 rotations then it stops. I didn’t see this as much in the later part of the ride. I think it’s an ultra low cadence problem.
- The bump issue is related to the magnet position I found out later during the ride. If I hold my legs level with my right leg on the back side it can trip the reed switch multiple times in a very short period with half my weight on it. Obviously a false 200+RPM reading combined with 100NM torque will give over 1000 watt reading. This is solved on SRM and Quarq by putting the magnetic pickup not in line with either crank arm. Smart for them, I missed this in designing.
- Reads back a random value when told to calibrate. Minor but would be useful to implement an actual value. It’s standard with Quarq and SRM.
- Have to calibrate twice – once for each side. Not really needed but it’s left as a debug measure. It could be useful to know the offset of each side as the ANT+ protocol only supports one value.
- Sorry it’s hard to see the actual values in the video.
Tuesday, August 20, 2013
SparqEE: Enabling Cell phone tech for DIYers
Originally I started this blog as a more general purpose hacking site, however it’s been a little more dedicated to sports sensors and ANT+ the last few months. I’ve talked about Kickstarter a lot lately and its potential role with my powermeter project, so it goes without saying that when something cool pops up I’d let my followers know about it.
The short: Easy to use Cell phone data technology for Raspberry Pi and Arduino. Some cool additional boards too!
Keep in mind that my V3 power meter was Arduino based, so this could be a cool extension for ANT+ technology. Switch my code into receiving mode and broadcast your data for live triathlon / race telemetry for coaches, friends, and data / tech geeks like me on the web! If interested sign up for the kickstarter here. These guys have the engineering skills and creativity to make this product happen!
So what could you use it for? Followers of the Tour De France will likely know that the HTC Columbia team did something very interesting with their ANT+ enabled phone here. Their ANT+ sensors (speed, cadence, heart rate and power) talked to their ANT+ enabled cell phones and the cell phone relays that data to the HTC website. Up until now recreating this would be a very difficult prospect – few phones are ANT+ enabled (even HTC ones) and you’d have to deal with making a server to receive and display the data. Sparkfun has some cell modules but they’ve always come off difficult to me and not very inviting to use.
SparqEE is doing the heavy lift on this! They are going to have libraries for easy coding with both Arduino and Raspberry Pi as well as having a server for your projects to communicate with! This means easier cell phone enabled projects. Wouldn’t it be cool for a coach to watch your data in a competitive tri, or a hard training ride remotely?
They also have some really cool low cost add on modules to help fill out your projects in addition to the easy to use shields for using the same module on either an Arduino or Raspberry Pi. The add on board that entices me most is a relatively low cost GPS board. Low cost bicycle tracker? Call it up and find a stolen bike so long as it has GPS signal / power / isn’t in the middle of nowhere. How about a remote g-force logger – lots of sporting applications. Track that “24 hours of Lemons” race or your downhill skiing and snowboarding. People involved in SAE competitions like Formula SAE or Mini Baja can now easily add telemetry! Great experience and all for a about a hundred dollars to set it up.
Some other suggestions for the SparqEE that comes to mind:
Garmin sells a online tracker for about $200 dollars. You could easily build your own for less and add a lot of feature sets such as relaying other useful data. Track your fellow Nordic Skiers on a trail perhaps? Or your Dog?
Competitive Geocaching – track others as they get close to difficult to find / challenging to reach caches! Relay their locations to your cell phone and race them to the goal.
Or maybe do you own Top Gear Style race with a Google maps tracking. This is my favourite. I’m a cycling enthusiast but I also love spirited driving. I’d love to have a distance race between friends!
This project has a lot of potential, and I’ve been avoiding the obvious things: Household monitoring, finding your car in a parking lot, finding your significant other in the parking lot before you find your car, etc. Take a look at it and see if it suits your application here!
Some other items of interest from the team shown below
Press Release: http://www.sparqee.com/kickstarter/20130820_pressRelease.html
Pictures: http://www.sparqee.com/kickstarter/20130820_pics.html
Blog we posted: http://www.blog.sparqee.com/?p=53
Monday, August 19, 2013
Accuity Works - but no video yet
On August 12, 2012 I made the first post on my blog (here) which was a recap of an old site I was working on over a year earlier. I was interested in a powermeter but as a Masters student it was too expensive so I became curious. I had been using my Kurt Kinetic trainer with a regressed power curve as a training tool. After talking to a coach about my training software and potential development (virtual coach) using regressed power curves I can rightly say I was very discouraged from pursuing anything further. A combination of lack of time, thesis, training for triathlons, looking for a job, and that small advice from the training community led to shelving the project. I should note that my local bike shop in NL (here) was quite supportive. Below is what I’ve called V1 now, or version 1, which never had a dedicated circuit board.
Next came V2 out of my curiosity for strain gauges which continued. It used a similar arrangement for the strain gauges as V1, but now it was a full bridge rather than half bridge. This is important as I now understood more about how sensitive the wheatstone bridges are to temperatures. I demoed this shortly after building at the startup accelerator Communitech to one of the coordinators, but honestly it didn’t go well. The problem is a lack of experience plus it really wasn’t ready for prime time. It was hard to setup, get working, and keep working and transmitting well.
This lead me to develop V3. V3 had the exact same electronics but it fixed several problems. The biggest being that an antenna in the axle doesn’t transmit well and running wires through it was a terrible idea. So instead of a bending bridge arrangement for the left arm, I used a double shear gauge inside the axle. It worked great, but V3 was huge and prevented me from running in the 53t ring safely without damaging the circuit board and connections. Major shortfalls include power consumption and noise on the ADC.
And so V4 is born. I switched to a different microcontroller, the new nRF51422, which allowed me to drop the power consumption and move to a one chip design (microcontroller and RF transceiver in one chip). Combined with a new, lower noise (but slower) ADC called a Sigma-Delta rather than the Successive Approximation Register (SAR) ADC but it kept the power in check all with more noise free bits. I built a reflow oven, and learned a lot about RF (and I still know very little), but after a second attempt at a circuit board (V4.1) I was successful. I had named this version Accuity which took me ages to come to. I think it conveys the precision of the unit with the double c’s to remind that it measures two legs.
I’ve spent a lot of time getting this working in a table top debug form, and slowly transferring it to a bike crank. I am low on strain gauges so I decided to reuse the instrumented crank from V3. You can see the programmer hanging off it above. The programming cable can’t be removed without removing the chain ring which is another mistake to be rectified further down the road. After hours of debugging and rewriting the de-bounce filter for the magnetic switch, I found out that I had accidently been sending “Power_L” over ANT+ and not “Power_T”. I had previously been debugging something and it required that I simplify things, but I forgot to revert the code. I’m ready to move on to the next phase of testing on my bicycle trainer and……..FULL STOP.
It’s hard to tell from the above picture, but the cup that holds the skewer cannot clear the area around it. Thus I can’t test it inside! I’m willing to tighten it to the point I can turn 60 – 70 watts by hand, but I don’t dare put my weight on the frame. I just bought this frame recently, and I don’t want to damage it.
This means that I can only “test” it outside, but I can’t compare its data with anything. The plan was to regress a power curve myself on the kinetic and switch out to the prototype and regress another curve and see how they line up. My other option is to rent a powertap again, but this is a 200km round trip to London Ontario. The final option, and possibly cheapest is to get another cassette and a derailleur to setup my old GT Series 4 such that I can ride it as a single speed on the trainer. More money is required to solve all problems.
Tuesday, August 13, 2013
Accuity V4.1–95% Complete!
It’s coded. It’s been running for about 70+ hours of testing and programming and forgetting to disconnect it on a CR2450 and still has life. It’s been extensively calibrated on the bike (this is necessary for removing bending from the left leg sensor). All parts (crank included) is less than $200 dollars. However skilled labour required is very high in terms of both skill and time. No, I won’t be selling these for $200 – my time is very valuable – but I still think a dent can be made in the $1500 mark. Powertap is forging the way.
To do:
- Move the Reed Switch closer to the Quarq Magnet location
- My Madone has a different magnet taped on. The Nice Quarq ring magnet is on the old GT GTR Series 4.
- Put on Chain rings
- RIGHT! I knew I forgot something.
- Test on Trainer
- But I’m so out of shape.
- Test on Road
- See above…? I’m really out of shape lately.
- Finish Enclosure design
- Don’t ride in the rain until then!
- Torque effectiveness and Pedal Smoothness
- Easy to calculate, but need to spend more time modifying the nRF51422 ANT+ library to support it.
It’s taken a while, but it’s doing well. It has 16 – 18 bits noise free. I’m using only 16 bits of the 24 the ADC is as it’s just about 100% noise free. It’s about 15 and 24 counts per N-M. Essentially this relates to < <1% error BUT keep in mind there is some sensitivity to pedal offset. It’ll likely come in at the competitions 1.5% – 2% quoted marks.
Okay, so maybe not 95%. I am very close. I am off schedule though, but honestly not by much:
I really didn’t include a prototype stage! Major oversight. However, if I build another 4 in a few days I’m 100% on schedule. No, I don’t expect this to happen. I need another month. So mid September for beta group I suspect.
What can it do?
It’s a powermeter so:
- Measure Left and Right legs torque individually
- Measure Cadence
- Calculate Power
- Transmit power data on the most common wireless powermeter standard - ANT+
- Calculates L/R power balance
- Costs a lot less than the competitors, but a lot of build time (Mixed feelings!)
Here are some pictures
Calibrating the non-drive side. The 5k on the right is to keep the rope stretched and the cranks level. 15kg “calibration weights” measured on calibrated scales at work which are good for 0.1g.
Debugging: Programmer talks to Accuity. Arduino receives the serial output. The .NETMF Fez Panda talks to another ADS1248 that’s also measuring one of the sensors to ensure Accuity is reading right. The Gripper is connected to a test strain gauge beam to ensure the Fez Panda ADS1248 is working.
Accuity up close. Personal. And poorly soldered!.
Serial Terminal and ANT+ Display Simulator.
So long for now