Friday, February 8, 2013

Snow Storms, ADS1247, .NETMF, and Friday Night

image

Snow day today which means I didn’t make it into work. Seriously though, I tried. Shovelling out at 8am when the snow was at it’s worse and not a plow in sight. Heard it was going to abate by 10am so figured I’d try again then. Everything I had shovelled looked filled in, waited until 12pm. It stopped, so shovelled again. Test run to Tim Horton’s made me realize it’s a death trap out there. Nothing that my Subaru Impreza with some Falken Eurowinter’s couldn’t handle, in fact I enjoyed it (once I turned OFF traction control). No, the problem is that people in Ontario tend not to buy winter tires, park on the street when they have a perfectly good driveway (filled with snow?), and generally do not know how to drive. In Newfoundland things would have likely remained opened and I would have gotten a coffee downtown with friends in that weather. In Ontario, 200+ accidents, not a plow in sight because they “wait” until it’s over. My street isn’t cleared and more poorly parked cars are now making it improbable to get down the road.

Tuesday, February 5, 2013

ADS1248 / ADS 1247 Received and Mounted

DSC_9068

I got my breakout boards today for the 24 bit Sigma-Delta ADC’s. Soldered and conductivity tested. Now to wire them to an Arduino and a strain gauge. Approximately 3ma for the ADS1247, 2.048 reference means 5.85ma to each 350 ohm strain gauge setup. Still a little high, but we’ll see. Proto-Advantage was super quick in sending with regular snail mail. I live close to them (Hamilton, ON I think) so it’s not surprising.

Thursday, January 31, 2013

ADS1247 / ADS1248

image

Well now that V3 is complete I’ve turned to debating what to do. I placed up my BT to ANT+ adapter, though few seem to have interest in that, or perhaps it was all the Hackaday traffic overshadowing everything on my V3 How To.

I mentioned that I might be looking to reduce complexity of the analog side and switch to a Sigma-Delta instead of an SAR. They are slower for the same amount of power but higher accuracy and less noise.

Well the 1247 (two differential input) and the 1248 (4 differential input) have been ordered as well as DIP Breakouts for the TSSOP-20 and TSSOP-28 from Proto-Advantage. I’m not in a rush currently as I have some major decisions to make in terms of continuing the power meter project.

That being said, Josh at Josh.to, has some ADS1247 code that he’s using to build an espresso machine. Like myself just over a year ago, he’s currently swamped in grad school. The code he’s developed in that time will certainly speed up my execution of the use of the ADS1247.

One thing Josh mentioned to me was that in order to switch inputs I would have to send a reconfiguration command. I infer I’d have to do a single read and then switch back and do another single read. While it would max out at 2000sps over 2 inputs, I’m sure the overhead in telling it to switch inputs would reduce that down.

An alternative would be to have an ADS1247 do one strain gauge and possibly a temperature sensor, and an ADS1246 single differential input do the other strain gauge but use the Vref from the ADS1247. These chips are about 12 dollars each, but compared to the 18 for the ADS8321 and the supporting electronics it still ends up being cheaper and simpler.

V4 would likely be coupled to an nRF51422 and again attempt for coin cell operation. This would be a copy of the reference design.

Sunday, January 27, 2013

BT2.0 to ANT+ Video

I made a video that explains how to get the BT to ANT+ bridge working. Simple wiring as proposed with a how to and shows using my cell phone to pretend it’s a power meter. Works the other way as well as a receiver.

Can I instrument a Carbon Crank?

I noticed a lot of traffic from www.slowtwitch.com which I found out is a huge forum on cycling. One of the largest I’ve ever seen. Someone mentioned my summary post here. I figured I’d sign up and thank them for all the traffic. A question emerged and I’ve been working on it in the back of my mind. Can I instrument a carbon crank? I’ve learned that Stages have mentioned hysterisis which is that the deformation while loading is different than the deformation while unloading. I’ve done some searching and found out that part of the answer (well one here) to this question depends on essentially the loading cycles.

Lets assume a constant sinusoidal loading. Assuming that this is constant eventually the crank will fail at some point. This is referred to as fatigue life. Below is a curve for the fatigue life of aluminium. At a given stress (Left hand scale) it’ll only survive so many repeated loadings. E.G: 200Mpa Stress = 1000 cycles, or 150MPA = 10000 cycles. You’ll notice how a small loading change can make a significant impact in the life before fatigue.

More after the break.

Thursday, January 24, 2013

BT 2.0 to ANT+ - So Cheap and Easy

DSC_9067 

Ignoring the other things on the board (AP2 Module and an AD623 which are not connected).

After some initial configuration using an Arduino to set the baud rate to 4800 I disconnected the BT module and wired in the Sparkfun AP1 board seen in the bottom of the picture. Setting RealTerm to Hex Mode I sent a string to set the network key. The AP2 Module from Dynastream will work too. Just set it to serial mode and the correct bit rate.

image

After pulling out my big binder of ANT+ stuff  I decoded it. So I sent the Set Network Key: A4 Sync, 09 length, 46 Command Set Network Key, 00 for channel 0…. key + checksum

I received the response: A4 Sync, 03 Length, 40 Response, 00 Channel, 46 (Command it’s responding to, Set Network Key), 00 Response_NO_ERROR, A1 Checksum

Here is something to note

THERE IS NO MICROCONTROLLER INVOLVED.

Pretty cool right? I’m going to try and get it just streaming back ANT+ data from the ANT+ Device Simulator soon. Maybe tomorrow or Sunday depending on free time. Hilarious.

UPDATE: Look at it go, I just copied out all the lines, sent them over Realterm via BT to setup the ANT+ AP1 and voila! BT to ANT+. I’m shocked at how stupidly easy this is!

image

Sunday, January 20, 2013

V3 Accuracy

Thanks to Hackaday viewers, Ray Maker at dcrainmaker.com, the various forums, twitter, reddit, and more. Again, feel free to ask questions or put in some comments. I’ll be sure to reply, and I’d love to clarify any deficiency that people have pointed out – like this one.

I’ve seen some comments about the web wondering about the accuracy of my power meter design. The short answer is that due to the simplicity of the design, the left measure should be better than average, while the right should be in line with the Stages Stage One design.

One of the things that I’ve never seen is how SRM, Quarq, Powertap, Power2Max, etc come up with their accuracy claims. This is slightly concerning as it might be like response times on monitors; all practically made up and skewed depending on how. In this interview Jim Meyers, founder of Quarq, explained how you could have 50 strain gauges and terrible accuracy. He also claimed that the last one he calibrated was 0.25%, but their company claims 2% to give a margin – sensible!

Based on explanations it seems they base this accuracy on the torque measuring accuracy. So what would that mean? It means that rotational measures might be accurate enough that it’s not the significant contributor. Since the microcontrollers in these power meters run at a high frequency, the time sample measurement could be down to the microsecond accurate, that it doesn’t matter. Back to the torque, it’s likely based on static torque measures with various calibration weights and looking for the worse measurement. Careful that your calibration weights need to be highly accurate.

V3 right arm (and possibly Stages Stage One) should have increased error measurements as the shear gauge used can be affected by pedal offset and that should be calculated in – however I’m not even sure of the methodology to do so. I’d be curious even if Stages Stage One has this figured out. However, Quarq and SRM both require a decoupling algorithm and have 4 – 5 sensor pickups which measure you have several analog-digital stages that could contribute to error.

The long short of it is that the 2% that is often quoted is a function of the use of strain gauges and electronics to pick them up. So, empirically I can say that mine would be about 2%. However to confirm I would need to get some high accuracy calibration weights. Once actually fully calibrated in the range, it should easily be within 2%.

One thing to note on calibration. Technically it’s bad practice to use a load that is below a load you expect. For instance, if you expect 200 N-M of torque, using 20 N-M of torque is not a good idea. I’ve been involved in QA programs and testing. If you have a 100lb load cell it’s calibrated with usually about 5 test points including 100lb. You don’t test to 20lb and assume it’ll be linear even if you’re experienced enough to say so. That’s just bad engineering.

So my calibration currently is in the extrapolation range and is therefore a bad calibration. I’ll eventually rectify this and I’ve tested several different weights and taken the mean in the past and will again in the future.