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.

Wednesday, January 16, 2013

V3–Power Meter–The Complete How To

For the current visitors to the blog, it's finally here! For new visitors welcome to the complete how to. What I am going to explain start to finish how to make and advanced left and right measuring power meter. The quickest and easiest way to figure out how to put your own together or find out how other power meters work such as SRM, Quarq, Cycleops or Power2max is watch the videos in sequence below.DSC_9066
Left to Right V1, V2, V3 of my power meter. Questions? kwakeham@gmail.com

Monday, January 14, 2013

V3 - Demo

Short Demo Video while I render out most of the tutorial overnight. It will still be a couple of days before I post them as I need more footage related to the strain gauge installation.

V3 - Video Editing


There is going to be a lot of video to watch. I might try and make an abbreviated version that just shows the meter rather than all the background and how to instrument. Right now it'll be broken into 5 or 6 videos ranging from 3 - 15 minutes each. Yes, I know it sounds like a lot, but you'll be able to watch it in sections. Most will just jump to the last video seeing me (a little chubby and out of shape due to my desk job) with the ANT+ display simulator synced to my video (approximately, +/- 1/30th of a second).

Cheers, and stay tuned, only a few more days before it all gets posted

Saturday, January 12, 2013

V3–Video and Tutorial Coming Soon

I’m working on a video that details the whole process of instrumenting and building the power meter as well as explaining the concepts. I’m starting from scratch in the video. How power is calculated, how rotational velocity measured, and most importantly, and in-depth, how torque is measured via strain gauges as well as how a strain gauge works. Below are some screenshots of the upcoming video. Currently I’m planning on shooting the table top demo of V3 and the on bike video to conclude the raw footage capture Sunday (Jan 13th, 2013). I might have it edited together in the evening for posting Monday or Tuesday.

vlcsnap-2013-01-12-19h03m39s7

Overview. More pictures after the break.

Monday, January 7, 2013

V3–Why it works now and the Power Meter CODE!

 

DSC_9045a

In the above picture you’ll see the MOSI (Master out Slave in) and RTS connection point for the AP2 module on the other side. There was a short. A super fine wire or a sliver of solder. Either way, there was a barely noticeable connection. More after the break including the working code!

Sunday, January 6, 2013

V3-Almost ready for prime time demoing

I found the problem that has been messing up V3 the last month and a half. It’ll be explained tomorrow evening. Suffice it to say that while I’ll test a new ADC, the current ones do perform now, and the meter measures look good. It was an electrical problem

More tomorrow

Generic Updates for January 2013

I’d like to thank all the visitors to the blog so far. So what to expect in the new year.

1) V3 Power Meter – I’m a little off track due to the holidays and sorting out the averaging issue, but I’m getting back at to it soon. This weekend I’ll be sorting out ANT+ not updating consistently issue. I haven’t talked about this much, but as it stands sometimes it’s calculating everything but not updating the ANT+ transmission.

2) BT 2.0 to ANT+ Bridge – I’m received a little criticism but I’m going to carry ahead to see if it works. I think I have a voltage mismatch so I’ll have to sort that potentially if the BT module won’t run on 3.3V. It lists 3.6v to 6v, so I suspect it won’t run. The ANT+ module needs 3.3 and I don’t think will survive much beyond that. If this works out maybe I’ll look at making a schematic for the BT and AP2 Modules. Possibly set it up for individual usage or maybe

3) nRF51422 development – This might be a little longer in the works. I’ve been holding off on ordering the EK or the DK kits until the new year. Now that it’s the New Year I’ll get around to it soon.

4) V4? This will be a long way off, but I’m currently envisioning an nRF51422 with ADS1247 ADC and a simple digital SPI/I2C interfaced gyro. Continuous updates.

So what else is new, more after the break:

Wednesday, January 2, 2013

The Bluetooth-ANT Bridge concept

Blant

I’ve talked about it a little, but I figured I should outline how the Bluetooth-ANT Bridge concept will work. I’d love to call it Blue-ANT but another company already has that, and BLANT sounds really stupid. ANTBL? ANTBuLL perhaps?

Anyway. The ANT+ Transceiver has 3 modes of operation, bit mode, byte mode, and Async mode. Bit and Byte modes are akin to SPI but the big difference is that the ANT+ transceiver (AP1 or AP2) is the master. For Arduino style projects this can pose a little difficulty as you’ll need it to interrupt the current code, handle the receiving, and then continue. I’ve had issues with interrupts in the past. However “Async” is pretty much the serial mode that we are all used to.  It’s buffered so long as you check your buffer for data every so often it’s not a problem.  But with this, that can all be handled by software. So it should just be a direct connection to the Bluetooth SPP (Serial Port Profile) board. I have to check the voltages.

I still have a discontinued ANT+ Sparkfun module I mentioned earlier. Basically it just needs to be wired as shown in the image above. I haven’t noticed RTS being 100% necessary but I’ve seen it mentioned on the “thisisant” forum as important and it might be one of the reasons I’ve had some issues communicating with the AP2. I seem to miss receiving updates that it’s sent a signal… this is causing miscounts for the crank torque profile as every 4th message should be basic power.

Some potential issues after the jump.