Showing posts with label power meter. Show all posts
Showing posts with label power meter. Show all posts

Tuesday, October 25, 2016

How hard is it to make a cleat based Powermeter?

I woke up this morning and I saw that Brim Brothers had quit. I’m sure if I had ever met Barry Redmond I’d likely be asking the question that probably kept him and his team working so hard. 

“How do you know the crank angle, or the appropriate relative angle between pedal and crankset?”

So if you want the short answer – It’s hard! It’s VERY VERY VERY hard.

I predicted this was going to be a nearly impossible problem with inertial sensors and I hate that I was right (Or wrong, you’ll see at the end – no comfort for Pre-order people, but the tech is out there). I had played with inertial sensors in University while working on active vehicle suspension design for automotive. And I said things like “I’ll just double integrate acceleration to get position” to which my Masters supervisor said “Doesn’t work” and I marched on my way to find that no matter what I did position drifted and accelerated away in under 2 seconds. The accelerometer was taped down to a heavy old wooden table and the math said it was flying away at 1000m/s. You have two options then; believe that I invented a new form of transport… or accept that the math didn’t work.

So below is a picture that will take a couple of paragraphs to explain, but the short is Brim Brothers measured force on the cleat in two directions (purple) and could be resolved into a single force and direction (red), but not all this force made torque (green, perpendicular to the crank). There are two angles relative to the world (the reference frame I’m using).

A really good inertial algorithm using accelerometers and gyro’s and any other MEM’s could figure out the angle of the shoe (theat_shoe). Those two things only tell us the vertical component and the horizontal in the “world” reference frame. Without knowing the crank angle very precisely you have no idea what torque is. We know the force and direction relative to the shoe and we can convert that to the world, but not the crank reference frame.

image

In fact, if we leave all the forces the exact same and only change the crank angle the resulting torque is different and reversed. This isn’t even unrealistic as the “lazy leg” has to be lifted by the other. Try cycling with one leg and see how tiring it is (those with Power Cranks are exempt).

image

We have zero different information (not really, but I’m getting to that). Accelerometers on the shoe state this is the position and angle using a simple algorithm. Let’s ignore time history integration for a second and only look at data which can determine reliably orientation in 3D space. The shoe angle is known, the force vector is known, but we know nothing about the relative orientation against the crank.

So basic inertial is useless because we can’t resolve torque, so that means two things

1) The Luck shoe is 1/100th where the Brim Brothers were years ago and only senses in one direction therefore it can never accurately get power. Some sort of half baked tuned version

2) Brim Brothers were into some very advanced predictive methods to predict and calculate crank angle

Ignoring point one, lets say we can integrate the velocity. Keep in mind we are moving outside and we can only figure out velocity relative to the world (this is how accelerometers work, the reference is the world with gravity vector being “down”). So we know the velocity which is a circle except when we move forward. Then the velocity profile is more of a spirograph. So from this we can figure out just about where we are in the crank rotation as velocity should be tangent to the crank + some averaged forward velocity + some drift. So assuming the filtering cleans up the drift and we can remove the forward velocity component we now have a vector that tells us crank position.

EXCEPT – well, it’s an estimate of crank position. It’s not necessarily true crank position, and it’s a weak filter since we never directly measure truth. So now we must supplement it some how. We can use the cyclic nature of the accelerometer going up and down and that helps stabilize the reference. OR we can use this to find the top and bottom of the pedal stroke, calculate cadence and use that estimate crank position allowing you to calculate torque.

Except if you change how your feet are angled like getting out of the saddle could change expected orientation, or small vibrations, or a speed bump, or even angle change due to starting to ride up a hill.

This is only one example of the problems associated with all this inertial sensor stuff. I don’t really know for certain what was the real problem, but my speculation puts it in the inertial algorithm area. Any time with a powermeter you have to make a guess like estimate an angle, or estimate a position, the answer is wrong. There hasn’t been a powermeter that works reliability that has an algorithm beyond a rotation measurement and been proven accurate yet. That doesn’t mean their won’t be, but when a company uses the words algorithm in terms of power sensing be wary. My suggestion is to avoid anyone who says  algorithm too much until you can test their product.

However, I also read today about something that is using inertial sensing to figure out position, orientation, velocity, and acceleration… cheaply ($1500 USD for 32 points). It’s a full body motion capture suit (NOITOM) and it is amazing. It’s been used on a lot of videos. Normally motion capture is IR camera’s and reflective balls with a lot of software. This is just inertial, calibrated to positions, and some amazing filtering algorithm. I’m not sure it would be accurate or fast enough for what the Brim Brothers needed, nor know if it would give enough to back out crank angles without multiple placements, but it’s amazing to see a company able to put together a system that must have a build cost of only 500 – 700 dollars so they can sell for $1500 for the 32 node version. Check it out. It’s this tech which could enable a successor.

From Tom’s Hardware

Friday, September 9, 2016

The case of protocols–Kinetic and ANT+/BLE

It has been a long time since I’ve posted, but I wanted to chime in on something that affects me more as a consumer than a developer. It’s the recent choice by Kurt Kinetic to continue to avoid ANT+ and the standard BLE profiles.

I’ve recently read the Simon Sinek book “Start with Why” and I’ve watched the Ted talk (here) numerous times annually as a reminder. Having worked with a startup and poured my heart and soul, and not to mention 60 – 80 hours a week for over two years, I feel that I’m a little in touch with the why I do things. The why for me is connected with my what – as in my personal history. Motivation to make a cheaper powermeter extends from being poor and being fat, and changing that with smart purchases. One of my first smart purchases was the Kurt Kinetic Road Machine.

I wanted a trainer for my used road bike. My choices were Cyclops, 1up, or Kurt Kinetic at the time and these were all big purchases for a poor Masters student. As a person of engineering I researched and researched and researched. What I came up with was that over long periods of use (think years, like 5+ years) the Cycleops may leak. The 1UP, while well reviewed looked cheap and dated. Then Kurt Kinetic, new in the world of trainers, only one product, a little louder than the competition, had a trainer that was guaranteed not to leak. And boy was the technology amazing. It couldn’t leak! EVER! I was amazed. So I bought it, and I stayed home all morning waiting as long as I could for the UPS guy to show up… only to find that he just left it outside on a busy street. Mixed emotions that day.

[DSC_89214.jpg]

Not only this, but there was a power curve. I had just heard about training with power and I was intrigued. I built up a little Arduino platform, wrote some software that pre-dated TrainerRoad and Zwift by years that allowed me to follow my workouts from the Andy Coggan / Hunter Allen book “Training and Racing with a Powermeter”. I trained to this power curve using my own software for 2 years. Over this time I migrated to using the ANT+ Speed / Cadence sensor instead of the Arduino.  Then I got a Quarq Cinqo Saturn and adapted the software to use the ANT+ power profile. But the power curve of the Road Machine was in the software still and I tested it against the power meter and I was happy with the results from Kurt Kinetic for all those years. The ANT+ profile was so easy to implement. It could be done in a day!

[DSC_9595%255B4%255D.jpg]

If you go through my photos on this blog you’ll see my trainer in the background in a lot of them. It doesn’t matter what I’m working on, the Kurt Kinetic Road Machine is always there. It was my rock. It was a powermeter test device. It was a calibration stand. I even got a dial gage and magnetic base and it became an AMAZING truing stand saving me hundreds of dollars.

Over the years Kurt Kinetic grew and I was excited. I was also loyal. They came out with the rock and roll and I loved the idea (but couldn’t afford it). They believed in a reliable trainer that never leaked and innovation! That was their why. They had a cycle computer that had a regressed power curve, like I was doing, but it couldn’t log data and was expensive. I forgave this because I believed in the why of Kurt Kinetic. I would say “They make good hardware. Bad electronics from a probably Chinese outfit can be forgiven”.

Then Kurt Kinetic replaced the bad cycle computer with a little pod. I was excited until I found out that it was only BLE. My Cell phone didn’t have BLE (Samsung Galaxy S). I have a background in mechanical simulation so I don’t use a Mac because there is no Solidworks or ANSYS or ABAQUS or CATIA or Unigraphics or PRO-E or Altium or ORCAD or.. well you get the idea. I make things, and to make things with professional software I use Windows. Windows had almost no good Bluetooth support then, let alone BLE. I figured I’d forgive this transgression because “Kinetic” (dropping the Kurt) does awesome hardware. This module is probably outsourced. It’s not part of their “why” as a company. It’s just to fill a gap to try and catch up with Wahoo. Or maybe they believe in BLE only – not a large sin, but still a sin in my eyes.

Enter Smart trainers. I didn’t like the original Wahoo Kickr. Maybe it was early firmware, maybe it was that the cassette didn’t align properly to my wheel and I’d have to constantly adjust the rear derailleur between riding indoors or outdoors. Maybe it was that it never appealed to my price conscientious history – again, being very poor growing up means that high profit margins can put a very foul taste in my mouth. Gouging customers is akin to murder with me. Charging over an MSRP for instance should be met with the end of the Rick and Morty episode re-enacting “The Purge”.

So I brush it off. Smart trainers aren’t (at the time) my thing. They aren’t even close to accurate to a real powermeter at the time. Software control of the trainers was non-existent and slow and BAD. I also thought there cannot be a market for this 1800 CAD product (Bad exchange rate at one time). However, the market grew and smart trainers were a thing. Wahoo had invented an all new product, and after some teething pains, they got it right. Early adopters through to creating a market. Congrats to Wahoo. Awesome work. Now for the bicycle paddle boat that Chip wants to make.

So now I’m thinking about how most things work so nice together over the years because I got into the right ecosystem. I had a Garmin FR60, replaced with FR910xt and an Edge 500 replaced with 520. I have Trek Bikes with built in Speed/Cadence sensors. I have a HRM from Garmin and one from 4iiii’s. I have numerous pieces of software, all working with an ANT+ USB stick perfectly, reliably, without fail. Multiple devices can receive and transmit. It’s a wonderful ecosystem – now owned by Garmin. However, they try VERY hard every year at the symposium to say “guys, if you have ideas we’ll help you write a whole profile, just work with us!”. They invented Connect IQ as a way to accelerate this! They allow for Private manufacturer pages to be reserved and tested openly with Connect IQ. Garmin wants peripherals! What they probably don’t want is watch and head unit competition – but that’s another story. The only reason I see to not support ANT+ is because you are going to make a BLE only head unit.

Which brings me to Polar. Polar right now is where Nokia was when smart phones were invented (or maybe a few years after). If they survive I’ll be impressed, and if they do, their only saviour is the iPhone and later Android, by latching on (poorly) to the BLE profile and still trying to act superior. I don’t know the story well, so I won’t speculate too much, but it did lead me into an interesting problem.I’ve used the $500 CAD Polar V800. It’s a joke compared to the FR920xt or the new FR735xt. I’d pay 100 – 150 CAD for it personally. Same goes for the Sunnto Ambit 3. So disappointed in these. In a few years they may get their act together and maybe (doubtful) Apple will help out people with the power profile and push the implementation. To Apple, who really is the push for BLE, the dedicated sports market is a small market. Their money comes from the every person who wants to “feel different” and is willing to pay.

Now we can segway into how this affected me and my girlfriend. My girlfriend has a Nike runwatch made by TomTom. It uses the Nike proprietary footpod and a Polar proprietary HRM. While I had spare ANT+ and BLE HRM’s nothing would work with the watch except the nearly $100 CAD Nike specific Polar HRM. She wanted heart rate data while running, but baring multiple devices she couldn’t. She wanted Strava data from here watch, but had to use numerous websites to upload here data or also capture to her very large phone. She couldn’t merge the HRM data with the Nike data from a non-GPS watch. It was bad. Everything was just harder. Initially the BLE was flaky too due to poor implementation in most apps. In fact it was so frustrating as Nike updated their site, removing a lot of features, that she pretty much gave up on Nike altogether. Nike and Polar had blocked her from her own data. So now what?

We got a used FR910XT for her cheap and the Nike watch we don’t know where it is. It was cheaper than buying more proprietary stuff. It uses the FIT format and ANT+ and even though it’s older, it’s way more capable than other newer products I’ve used.

So let’s look at the pro’s and cons of Implement ANT+ / BLE.

Pro Cons
Instant compatibility with software 0.25 USD Licence Fee for nRF52
Ability to support new profiles quickly May have to switch from nRF51822 to 51422 and increase cost
Felt as part of an ecosystem, can implement new features and roll them out to others as part of the working group Develop BLE support or migrate existing proprietary takes time and money
Can use Connect IQ on Garmin products for apps and widgets Develop ANT+ Transmit / Receive takes development effort, again time and money
Increased industry contacts and exposure via working groups Risk competitors finding out your ideas
Existing profiles can be quick to implement with reference code Could be major costs on changing IC – restocking fee’s to lost reels = up to 10000 dollars USD

And now the Pro’s and Con’s of proprietary

Pro Cons
Build an Ecosystem Single company implementation is same effort as multiple
Control of development of new features Slower implementation by 3rd Parties
Control Power consumption Deploying features could break others API implementation, meaning a lot of support, and risk of it being dropped
Deploy features faster Risk a 3rd Party API replacing yours causing incompatibility (See Wahoo BLE API)
  Risk of loss of market share to competitors
  Risk of loss of investors (If any) due to incompatibility (testing by investors) or failure to meet sales objectives of new products

I’ve heard that Kinetic will try and explain it’s position, and I welcome them to doing this. Maybe I have missed something in my several years working with the ANT+ and BLE protocols. I also know that working with a single company with something proprietary is harder than a standard for 10 companies. The biggest thing it comes down to is normally feeling like you’re in the Garmin sandbox. Frankly, that’s why people are doing ANT+ and BLE. For choice. Implementing ANT+ gives you access to a whole new Connect IQ platform. Companies like Stryd have used it to implement power recording in run modes – Genius!. Companies like Specialized have used the Apps mode for their MTB demo about a year ago. It could have been done on a smart phone but I don’t know many people who ride a MTB with a smart phone strapped to it. Could Stryd have “worked with Garmin” prior to Connect IQ to implement this – yes and no. Yes because they want to implement a new product. However, implementing power on a non-power watch could turn a run only watch to a tri-watch competitor, so Garmin may have said NO. By taking that risk you could say Garmin could damage their own sales, but for ever sale they damage they probably grew 2+ because of Stryd.

Unless you have a lot of developers it’s going to be harder to do anything on power consumption and getting companies to implement a new feature and recompile and re-release an app is time consuming. And if your new feature you’re pushing to market hasn’t been tested and vetted you risk breaking someone else's software. That makes people less ambitious to update API usage.

There is a smaller development cost to implement existing compared to re-inventing the wheel, a small cost on the chips if thought out from the beginning, and a lot of positive PR. However, if the choice was made and the chips aren’t ANT+ compatible then it could mean a major design change. However, if they use the nRF51xxx series that means they can drop in the ANT+ compatible chip and swap the stack. They likely haven’t purchased more than a reel of IC’s and that could have run them 10k USD. However, that is the lost sales of maybe < 50 trainers profit margins? How many sales would (or have lost) by not supporting it from the start?

I just read all the comments on Ray’s post. Joel from Kinetic is trying so hard to be diplomatic which must be so hard. They have an internal decision that see’s him being beat up on. Not only that, but personally I’m saddened. The Road Machine allowed me to train effectively with power before my powermeter journey. I made my own ANT+ transmitter for it. I tested it’s power curves. I’ve shown my girlfriend how to use her Power Meter with it, and do an FTP test, and ride with TrainerRoad. I watched a new market come to light and I would stand by my Road Machine saying it’s awesome and doesn’t need to be stupidly plugged in. That it was solid with my 100kg putting out a 1200 watt 10 second sprint when I cinched down the tire. I don’t personally stand by their decision and I’ll eventually vote with my dollar. A few months ago I thought my Road Machines bearings were going – I still haven’t confirmed it. They suggested an RMA and I felt a little bad. It’s 6 years old now. It’s seen hundreds of hours. However, I had to pack it up and figured maybe I’ll just buy something new. After today I don’t believe in the why of Kinetic any more. I’m sorry and saddened. They lost their way. They lost their why. I know what it’s like to see a company lose it’s why. It hurts so much.

I’ve seen these type of decisions made because companies want an “ecosystem” but then they don’t realize that it doesn’t matter. It’s ambitious and unless it’s your only focus then you’re developing nothing. If something is a published standard that means there is a way to test and check that it works. If you have to send an API, hold someone's hand walking through it to implement while they are also implementing a standard, then who will get integrated first? It’s cheaper emotionally and time wise to a consumer to buy a whole new trainer than to wait for someone else’s product to be compatible. You’ll never be first to be incorporated into software, you’ll always be last. You don’t get to do what everyone did last year – show off Zwift or whatever new software is being shown in every trainer booth at Eurobike, but you get to do it later after it’s no longer novel. You get to be the last guy to show up to the party, but nobody is waiting for you because they are already starting to leave.

I don’t know what the reason behind avoiding FE-C, Power, Speed, and Cadence on ANT+  or why they are using their own proprietary BLE spec. I mean the ANT+ working group got beat up a lot for “holding back FE-C” but it’s now the unifying body. The problem is that these are standards that are already fighting it out. And as much as I hate to say it, ANT+ may lose. It’s easier to implement, quicker to get right, cheaper to get certified, but BLE is in every cell phone now. However writing your own proprietary characteristics for BLE and not publishing them means you are the third guy – the guy that’s forgotten about before anything starts. The Nokia, the Polar, and the Kinetic?

If Kinetic jumped, listened to the hundreds of thousands of dollars customers are saying they won’t spend, and say “We hear you” – then I’d consider them when I buy a smart trainer in a few months. You were already late to the smart trainer party being hosted by Wahoo and attended by Elite and Tacx with special guests Zwift, TrainerRoad, Training Peaks, Strava and more. Having your own party down the road the next morning isn’t going to be as fun.

BUT

Kinetic has a great opportunity here. There is no unified FE-C equivalent for BLE. What if Kinetic steps up and says “We might only do BLE, but we are going to lead Bluetooth SIG to making a profile because the industry needs it! We are going to reach out to TACX and Wahoo and get us all on the same page”. Without ANT+ I still don’t think I’d buy, but they would have found their why again.

Wednesday, September 10, 2014

4iiii’s Powermeter Promo Code + Story time

It’s been about 10 months since my last post about the powermeter development. Those who have emailed me have been stone walled about it, getting a response such as “I can’t talk about what I am working on in my new job”. The answer is that part of it was in fact a powermeter. So, to the loyal followers (and even the not so loyal) we are offering a discount promo code of Acuity for a 20% discount on all 4iiii’s products as a thank you for supporting me and following! Oh, here’s the “catch”. It’ll be the most accurate, lowest cost and user installed (no new crank needed for most riders!). And now I do what I love full time. So thank you!
UPDATE: Code was valid until midnight of Sept 12. The last day of interbike.  Thank you all that participated.

Now, if you’re still reading but want to hear how this came to pass, I give you the long story
During my Masters degree I had used strain gauges. I needed a tiny load cell to test active suspension. It worked but wasn’t great. I decided to take these “student strain gauges” for a side project.  My FSA vero crank, instrumented like almost all crank based meters, showed some results, but it was noisy, drifting, and unusable. After much experimentation I found that cheap off the shelf electronics were not cutting it. I shelved the idea and started working on some training software for use with the regressed power curve of my Kurt Kinetic. That was 2009 – 2011.
In the meantime a friend of mine in Waterloo was doing a Masters with someone at Babcock and Wilcox, the nuclear steam generator company, and passed off my resume. Five interviews, a security background check, and relocating my life from St. John’s, NL to Cambridge, Ontario I was now working in Nuclear Engineering. Most of my work was Finite Element Analysis, or FEA. Essentially I my intuitive understanding of how mechanics, stress, strain, deformation, etc work was being put to work for steam generators. I had been using FEA since the second year of my undergrad and at that point had used FEA on and off for almost six years. I even wrote a free book on using Ansys and FEA to design race car chassis' (link here).
It wasn’t long before a customer concern required experimental work measuring strain. Prior work was inconclusive. I heard the design manager going cube to cube in cube-ville (which was my home) and I ran after him (coffee in hand) and said I know a and used strain gauges, Eventually I disclosed my electronic hacking which had been featured on Hackaday and I was chosen as the ideal candidate.
However, I needed credentials. Everyone knows most engineers never touch things with their hands, but in order to do strain gauges I would. I’d add it to my machining and welding skills. So I was sent to a strain gauge course. After the courseof training later I knew exactly how to fix my vero crank powermeter! I was excited beyond belief. The problems I had seen were so minor!
For the next year I spent most of my time conducting experiments at B&W using strain gauges to great customer satisfaction. Between my FEA, electronics, and attention to detail combined with my knowledge of Design of Experiments and higher level statistics my work was deemed impeccable in execution. I was achieving 1% error with theoretical. A former Pratt and Whitney employee now at B&W stated his work was up to 15% error. I was so proud to be executing things at such an accurate level. In the mean time I had spent thousands of dollars and countless hours building up my own circuit boards and instrumenting cranks.
Vero, which was never self contained, was V1. Later a C-channel shaped SRAM Rival was V2. It was arduino pro micro based with an AP1 ANT+ stick from sparkfun and some analog components that weren’t suitable. V3 combined those onto a Rival OCT (hollow forged) crankset. However there was issues, clearances, etc. I had tried some different ideas and realized forces on a crank aren’t as simple as the industry thinks (or markets). However, I got my powermeter on the famed Hackaday and tens of thousands of visits to my little blog later I felt I was on to something.
So for V4, I moved to a lot of new components and a small custom board. I spent countless hours pouring over datasheets to chose the components.  I built both a Rival OCT and Carbon S900 / Quarq unit. Both worked well. Very well. In fact I was on the verge of building up a bunch and starting to beta test. I had a listing of people who were interested from all over the world.
I got an email from the father of a lady who works at 4iiii’s. He was so interested in my work and has remained a strong believer of me. Eventually it seemed to fall to the wayside of the people there or was being evaluated at a slower pace than I wanted. However I liked this company. The founder had built Dynastream, the creator of ANT+. I was impressed. So I eventually sent him a message on Linked In.
A few super early morning calls later and I was using my barely touched vacation time to impromptu fly to Alberta to meet this guy and his team with my bike in tow. I had no idea what to expect. A short drive from Calgary to Cochrane later and I find a small building labeled the 4iiii Innovation Centre.
I had mucked around adjusting code on the carbon crank for more accuracy and messed up some math, so eventually I swapped in my Rival the night before. The battery kept disconnecting during the demo in his office but he was convinced.
Some interviewing and a discussion later on what he wanted to bring to market and I was confused, full of reservations but generally sold. He wanted user installable. He didn’t want into the crank buying, installing, selling market. He wanted to let people have choice. He wanted to drop the price and change the game.
I spent most of the next 6 months working on the basics. Can it be done? What material? What gauges? etc. What I found was that 2% bending error was not actually achievable on a crank arm with the generally accepted setup (a bending bridge).  If you narrow your scope to a fine window it does but that didn’t sit well, but if you start introducing some cases that fall to the edge of  the norm just a tiny bit (and encountered regularly in mountain biking) you’ll find that it’s closer to +/- 7% to +/-9% on torque accuracy depending on the setup. Let alone rotational accuracy from an accelerometer algorithm.
I’m 4 months in, looking at these numbers thinking I’m a not going to be able to pull it off - not with the accuracy everyone is claiming! I quietly start looking for a solution. How do I make this better. I’ve figured out the fundamental issues with user install but how do meet the accuracy. It doesn’t change from user install to pro installed. I tried angling the sensors, adjusting things, compensating for the non-symmetric cross section of the crank. Nothing!
Then I tried something else. What about adding a second setup! Something that can sense torque but that is very different from the first. Then, using my Design of experiments mythology and statistics I figured out that there is a super cool correlation. I was blown away! This was big, this was the answer to my hopes to get me that 2%. Not only that, but generally gave 0.5% error! This idea is so revolutionary that we put patent pending in place on this technology, among many other things.
We needed to package it, and admittedly the packaging isn’t perfect for the drive side and the last few years we’ve seen a mess in bottom brackets and now we’re seeing a mess on the chain ring bolt patterns causing incompatibility of some manufacturers cranks. This is sad. However I’m glad to say the last 3 generations of Shimano 105 (5600, 5700, 5800) work, Ultegra (6600, 6700, 6800 {this is actually epoxied together!]), and Dura-Ace (7800, 7900, 9000) all work. The latest Deore XT works for the Shimano MTB front. The 10 Speed SRAM Rival OCT works (my original workhorse on the prototype front) and the X9 looks good. FSA Energy is good too but their new 5 bolt asymmetric and SRAM’s 11 speed put bolts where we want the sensor. We are still searching for a solution. On the Carbon front the SRAM S900 works but we haven’t finalized our testing. We will be recommending using the calibration load cell that comes with the kit every year at least to check calibrations depending on crank arm.
Right now the product works, but in my bosses opinion is huge physically, so there will be a shrink in size and weight when we ship in a few months. This will also improve install-ability and compatibility as well as easing access to the battery.
However, one of the coolest things I’ve done which I hope to open to the public is my test data on the existing meters. It turns out it my original bending only design was better than existing solutions but was still +/-7% while the best off the shelf solution once we hacked into it’s sensor produced +/- 9% when we introduces pedal offsets.
Enjoy the promo code while it lasts. It’s our gift to you guys who believed in me on a personal level and going forward believing that we change the face of power for serious athletes at all financial levels.
*gage is generally considered the American spelling and gauge the British form.

Saturday, December 21, 2013

Mega Fitness Software Review Project

Things have been crazy for me the last few weeks. I’m finishing up one job with a major project that has been dragging on way too long. It’s the lynchpin that has held me to my old job – plus it really takes a significant amount of time and organization to move. Everything I own sans my road bike, clothing, and laptop was picked up Friday.
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.

Saturday, October 19, 2013

Random Trip to Alberta

AB Ride

2013-10-06 11.05.342013-10-06 11.05.56
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.

Friday, September 27, 2013

Quar-ccuity (or Accuiq?) and ANTride

DSC_9660

Quarq + Accuity

The Quarq + Accuity crankset is almost ready. Major changes since the Rival based version include:

  1. 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.
  2. 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.
  3. 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.
  4. 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).
  5. 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.

DSC_9658

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.

Saturday, September 21, 2013

Enclosure and Carbon Fibre Cranks

Assem1

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.

DSC_9655

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.

image

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

image

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.

rival-sectionb

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.

rival-sectiona

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.

rival-section-MKII

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.

rival-section-MKIII

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.

DSC_9641

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?

DSC_9648

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?

DSC_9642

I prepared the crank arms carbon fibre just like Vishay’s tech notes say to and applied the strain gauges.

DSC_9646

Another picture with a better view.

DSC_9647

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.

DSC_9645

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.

DSC_9644

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.

Wednesday, August 21, 2013

Accuity Powermeter Testing Video and Data File

DSC_9616

Testing Accuity V4.1 Bicycle Powermeter

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.
Some more pictures
DSC_9612DSC_9624

Tuesday, August 13, 2013

Accuity V4.1–95% Complete!

DSC_9596

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:

  1. 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.
  2. Put on Chain rings
    • RIGHT! I knew I forgot something.
  3. Test on Trainer
    • But I’m so out of shape.
  4. Test on Road
    • See above…? I’m really out of shape lately.
  5. Finish Enclosure design
    • Don’t ride in the rain until then!
  6. 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:

imageimage

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.

DSC_9594

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.

DSC_9595

Accuity up close. Personal. And poorly soldered!.

DSC_9599

Serial Terminal and ANT+ Display Simulator.

DSC_9600

So long for now

Wednesday, July 24, 2013

Launching a “Product”

image

Some people have remarked that they may have either been confused about the goals of the project. This is the result of these goals being fairly fluid. Shown above are the next three major phases left in this project. First is to finish building the latest prototype (70%+ Complete) which will serve as the template for the beta units. Once this is debugged I will be producing several Beta units. Initially I’ll loan them out locally, then I will loan them via mail to other candidates. Assuming that things go well I am going to take a serious look at using Kickstarter as a launch platform for development kits and potentially a final FCC / ANT+ approved version. Development kits would be targeted for Delivery in Jan / Feb 2014 while a finalized version would likely be Spring of 2014.

More details of each phase after the break.

Sunday, July 21, 2013

Single Sided Measurement, Kickstater Coming to Canada

DSC_9429

Just a reminder, the above board made by APCircuits has worked out well. They are a 7/7 mil service however the board was designed for 6/6 mil process of OSHpark. The problem was the turn around. APCircuits had the order on a Wednesday night and it was delivered Monday afternoon. Total cost is $88 dollars shipped with Fedex Priority which was $30 for 4 boards. OSHpark is 17 shipped for 6 boards.

APCircuits are very good, they reminded me that there were “errors” in the board, but as previously mentioned I told them to go ahead. I haven’t found a single problem with the boards and I’ve tested all the small traces. I have tested the RTD sensor lines but they are larger to decrease resistance so I’m not concerned.

DSC_9434

Above is the board connected to the debugger, battery and a single full bridge setup which is connected to my 4 setup test arm used in thermal testing from here. This means it’s pretty much equivalent to the Stages One powermeter. Single sided, but that’s just for testing out, coding and debugging.

Below are a few more pictures.

DSC_9438DSC_9440

I expect that I’m going to have to re-adjust timelines. I’m away beginning of next month for a wedding and waiting until I’m back to order the strain gauges needed. I’m going to look into re-adjusting my proposed schedule and see what I can do. The “to do” list is still extensive but nothing impossible. The hardest thing really was the reflow. While still not perfect it’s fine. Again, the solution was to ditch the BGA package. That’s advice for any hobbyist with a DIY reflow oven. BGA is too much of a headache, QFN is hard but not impossible. Still haven’t received any import bill for mouser yet.

  1. Finish coding that couldn’t proceed until the boards were completed and working
    • I only coded initially for one side
    • I’m cheating and only outputting raw reads to the power, this is mainly for debugging
    • Sort out UART connection to help “debug”
    • Look at implementing TE/PS measurements – This is low priority as no head units can read it
    • I won’t code thermal until later and I get a sample RTD from omega
  2. Enclosure design – I decided to hold back a bit on this due to adjustments that might need to be made for the board design.
  3. Instrument another crank (or V3 to conserve cranks, have to rework it by removing old gauges and installing the new ones in the right locations (slight movement and different gauges)) and connect up powermeter.
  4. Mount battery, measure current consumption.

My rate of work on this has to slow down anyway from both a financial position and a time position. The board was the main hurdle at this point, right now getting it together. However I am seriously looking at Kickstarter when it comes to Canada in order to offer the Board (~$40), Dev units ($500 – 600), and final units on Hollow Forged Cranks ($700 FCC Approved). At least that’s the goal. I’ll know more when I get circuit board manufacturing quotes and find out minimum order quantities in a few weeks.

Friday, May 10, 2013

Progress Update and Commentary – With Finn and Jake

Anyone who knows me personally know that I’m a big Adventure Time fan. I love the nonsensical nature of the show as it provides a nice relaxing escape. Lately I’ve been gathering all the pieces for my Trek Madone 5.2. It’s not really a 5.2 as it is not going to be kitted out with Shimano (Ultegra) gear. It will receive my SRAM Rival group set that was purchased a few years ago and put on my GT GTR Series 4 which had originally came with Sora / ST-2200 shifters. I’ve tried to keep my bike with my ability level – however a Madone 5 Series is well beyond my need. I promise this is going somewhere. Just stick with me after the break.

Commentary

While I’ve trained with what I’ll call “Virtual Power”, which is using the regression curves for my Kurt Kinetic for 3 winters now, I haven’t experienced outdoor power until now. It is a very different experience having those numbers in front of you on a road. It’s teaching me it’s hard to zone in on a specific number and stay there. For my weight (100kg, I’m a big, dense boy) I’ve found that if I don’t push 400-500 watts then I don’t really go up even the smallest of hills very quickly. I recently read in the Wattage group that you really need a year of playing before you can seriously use this data. I’d say I’m not a novice, but I am not intermediate with data.

Having used this “Virtual Power” for a few years I thought I would be decent at evaluating power meters and what makes them good or bad. I’m a much more technical person, and as such I consistently forget that the coaches and athletes who use these tools while not knowing really how they work really. They don’t understand what would make one better than the other, which is why most people blindly say one is better than the other without understanding the technical merits of one over the other.

I’m not making any evaluations on products here, but I’ve been reading quietly in a lot of forums. In a previous post I showed how strain gauges, even in thermally compensated designs, can drift – very repeatedly drift as a function of temperature. A “good” auto-zero algorithm would adjust the zero based on this temperature – the holy grail, the platinum standard, etc, of power meters which wouldn’t require the user to do so much interacting. I don’t know the algorithms used by Powertap, SRM, Quarq, Rotor Power, etc but I do know that I am incorporating an auto zero adjustment because it will make it more accurate.

Rounding full circle to how I began, I will soon have a bike of very high level equipped with a tool that I think should be bought long before other bike upgrades but most people won’t get a power meter until they have a 4000 dollar bike. I am in no way capable of fully utilizing the performance of such a high quality frame. I’m nervous about this frame but not for the reasons you would expect. I’m nervous because showing off my prototype on it may illicit feelings that this is going to be another 2000 dollar plus product.

My goal in trying to create a lower cost power meter is to allow those aluminum framed, entry level, Shimano 105 / SRAM Apex/Rival / Campy Athena people who want to train more effectively to do so. It’s the 1500 – 2500 dollar bike people. The people who’s bike is equivalent to the price of one of these training tools currently. I think I will keep my 2008 GT GTR frame such that when I show off the new prototypes I can show them working on both my old used aluminum frame and my new carbon bike.

Progress Update

image

Seriously, I want to give a huge shout out to the people who made Arduino possible. What they did was translate the cryptic language of microcontrollers to something more easily digestible and along the way made some simple tools. I’ve been stuck for two plus weeks on “Basic Code”. I’ve been stressed out because it’s been improbably annoying to replicate the millis() function of the Arduino which is necessary for calculating cadence from any pulse type sensor. It had to do with existing “Timer.c” library that came in the reference code. It was quite annoying.

This has throw off the schedule somewhat, however I believe I have it sorted finally. However, in sorting this out I found out that the reference code doesn’t work like I thought it did and is therefore less power efficient than I thought. This comes as a surprise, though I am seriously behind on a couple of tasks. The Gyro Evaluation still shows up and I still want to do it, but it’s hard to make it happen. The priority now is the current measurements. I have to get this done this weekend now that the cadence calculation is almost worked out. At least I’m 3 weeks ahead on ordering cranks.

I really wanted to be doing PCB design this week which is why I took three days off work – such that I could do more work. Who knows, I might get to start on it yet.

Tuesday, April 16, 2013

Compensating for Something–Thermal

image

No, this has nothing to do with a midlife crisis. It has all to do with heat, expansion, and the dreaded thermal drift in power meters. In one of my last posts, here, I talk a good deal about a minimum viable product but managed to segway myself  into a discussion on thermal compensation.

Wednesday, April 10, 2013

80% Coded for an MVP and Thoughts


For those of you who are unfamiliar with the term MVP in the context of a startup, it is simply the “Minimum Viable Product”. A minimum viable product is a product that is to enter the market and test a market hypothesis. Things in today’s economies change quickly, very quickly, and because of that Eric Ries recommends that business plans are essentially a terrible idea for a startup. For SRM powermeters were a startup, for Cycleops less so, Quarq even less so. And the rest of us, we are behind the curve in some respects. Everyone’s startup now revolves around something novel about the power meter, but nothing equivalent to the revolutionary effect of a powermeter.

Friday, April 5, 2013

Code Mostly Ported and Other Things

image

I’ve been working in the background on things that most people will find dull – more coding. No major breakthroughs, but no breakthroughs are needed at this point. I’ve ported about 65% – 70% of the code and what is left to do is below. More after the break.

Thursday, March 28, 2013

Wake up nRF51, wake up! You have Math to do!

DSC_0019

Ah ha! I found it! How to have the nRF51422 wake up on sensing the ADS1247 is ready to be read. Unlike the ADS8321 I previously used which converts as it reads out, the ADS1247 takes a little while to do a conversion (depending on the rate it is set to), and as such the nRF51422 can take a nap most of the time. Otherwise it’s just burning through electrons pointlessly.

In the included libraries it defines the pins generically… but without interrupt, however in the powermeter example it defines the buttons manually in another library… with interrupts.

Below is an excerpt for button press with interrupt:

GPIO_PIN_CNF_SENSE_Low     << GPIO_PIN_CNF_SENSE_Pos

Below is an excerpt for a generic GPIO without interrupt:

GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos

Some additional coding and configuration should allow me to sense the gpio pin that the DRDY line from the ADS1247 is connected to. When the line goes low the data is ready, and the nRF51 can wake up do a read, store the data, and sent it back to me via UART on the SEGGER J-Link. Later it’ll store the data for averaging later. This is the last major breakthrough I needed to figure out how to keep the nRF51422 in sleepy-time mode (Without using the above pictured Tea).

image

Onto gyro evaluation next. I just got confirmation my order shipped. My order from Adafruit on the thermocouple and thermocouple IC shipped. I haven’t heard about my solidstate relay though.

image

(Needed some other supplies too!)