Showing posts with label Sigma-Delta. Show all posts
Showing posts with label Sigma-Delta. Show all posts

Tuesday, May 28, 2013

Kicad–Schematic 90%–PCB 15%

image

Some slow progress, but it’s coming along. The schematic is about 90% done, but the PCB has barely been touched. I’ve just been doing some trials making sure it all translates well in Kicad from schematic to PCB layout. Below you can see the footprint layout compared to a CR2032. This is quite small. The trace PCB antenna will come off from the integrated balun from ST micro to the right. You can see the peculiar five dot layout next to the nRF51422 QFN footprint. This is ST micros integrated Balun. It’s 2mm^2.

DSC_9226

To give you an idea on where this is going to reside I have added the picture below. The area just behind / below the chainrings seems sufficient for the circuit board. However two major hurdles.

  1. Battery Placement
  2. Antenna Placement

Coin Cell for scale. Note: I’m showing a CR2032, but I plan to use a CR2450 620mah cell. Slightly bigger physically.

DSC_9228

Once I get the schematic and board close to finalization I will order the parts from Digikey. Most of the parts are very inexpensive except the ADS1248. This is considered the heart to the design in my mind.

When I order strain gauges I’ll also be ordering platinum RTDs. Each RTD will sense one of 3 strain gauge locations. (Top and Bottom for Right leg sensor, one for left leg sensing).

This is going to be close to a “NEVER ZERO” power meter. Rotor is pretty much there from what I’ve heard, but mine will be priced much more competitively once out of the beta. FTSH header include for reprogramming / hacking via the CMSIS-DAP.

Hoping to have the rough PCB by the end of the weekend, and a 3D concept of the enclosure which will be 3D printed. The enclosure will likely just resemble a circular battery holder by the crank arm and a simple covering over the board and strain gauges. Nothing fancy.

Monday, April 1, 2013

nRF51 Interrupts–Not what I expected

The interrupts are acting a little different than I expected based on my current limited experience. They seem to be active when the pin is in a certain mode rather then when it changes state. This means that when DRDY (DataReady) asserts low, it wakes up the microcontroller and keeps it awake. The nRF51 can’t go back to sleep until DRDY asserts high. I’m sure I could code around this or some other options exist but luckily I don’t have to – and here is why:

image

When in continuous read mode I need to send it “NOP”, or No OPeration, which is fancy for 0xFFh. Into the first NOP command the DRDY asserts back to high, and once the read operation is complete the nRF51 can go to sleep. DRDY will only assert low when a new conversion is ready.

For those who are interested in the how the ADS1247 operates when reading multiple inputs, instead of NOP you can send a change input command while in continuous read. The next conversion will be the other selected channel.

Here is something neat that you can do with this too. My strain gauge arrangements are full wheatstone bridge differential inputs, meaning that each sensing arrangement requires its own differential pair. However, if you want a half wheatstone bridge for generic strain inputs you can put a voltage divider to input of MUX0, and have 3 inputs to half-bridges. This would be a quick and easy solution for multiple thermally compensated sensing arrangements. I’m currently testing this way with a workpiece I made while in North Carolina at Vishay’s training course. It’s a differential bending beam so it is a half bridge configuration. I’m using two 10k resistors (Vishay 1 ppm, 0.01%) as a voltage divider on MUX0, and this differential beam input to MUX1. I have another full wheatstone bridge wired to MUX2 and MUX3, but sometimes I’ve just sent it to MUX0 and MUX2. That means an ADS1248 with 8 inputs could do 7 half bridge sensing arrangements!

The 2000sps max for this chip is spread over all channels then. So if you set the read rate to 2000sps and have it over 4 input setups then that is only 500sps for each channel. I am planning on testing to determine the ideal rate, but right now this chip is so low noise that I suspect I won’t need to pass 320/channel (640sps total) which will put me in line with most production powermeters. That would give 160 per revolution at 120rpm per leg.

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!)

Wednesday, March 27, 2013

Beta Testers Wanted –(KW/Waterloo/Cambridge/Toronto, Ontario)

image

I have to thank Ray from www.dcrainmaker.com for his post. I think it paints a pretty good picture of things. His posting did highlight something. My initial reluctance to BTLE. This stems from a personal experience choice, but mainly cost. However, if down the road I can get some form of backing and some help with coding I will be dropping in the nRF51922 microcontroller (ANT+/BTLE simultaneously) when released for dual support of both protocols.

One point he made was about getting a product to 95%. I think it’s being misunderstood that the accuracy of my meter is +/-5%. This is NOT the case. My torque testing is easily measuring in the 2% described by other’s products. I believe he means in terms of finishing. That’s a big hurdle. Redesign – Packaging – Waterproofing – Validation – FCC / CE approvals - ANT+/BTLE approvals. That’s the last 5% of developing a product and it’s a big 5%.

I’ve been having good progress with the nRF51422 (ANT+) microcontroller and I’m about 99.9% settled on the ADS1247/8. The ADS1247 is a 2 differential (4 single sided) ADC while the 1248 is 4 differential (8 single sided). Why I might chose the ADS1248 is so that I can have a secondary force sensing arrangement. That means I could do the fancy directional force output that Pioneer has shown off. It’s information overload during riding, but it might be useful. I think I’m going to try and design the board to accept both. Future proofing I’ll call it.

I’m glad a couple of people commented on the gyro situation. 4ma doesn’t sound like a lot, neither does 2ma, but when your coin cell’s life curve shows a maxim total draw for 2ma then that is a problem. I have a gyro I like being put on a breakout board by Protoadvantage now. I’m hoping to have it next week. I like coin cells, but the gyro could kill that… or sticking with coin cells could kill the gyro. If you have an opinion, post in the comments or drop me a line.

Now the other thing which this post is titled. Beta Testers. If you are in any of the above listed area’s, an avid cyclist, and interested in access to some beta prototypes drop me a line at kwakeham@gmail.com or kwakeham@accuity.ca. I’m looking for local first so I can drive over and debug / check / upload new firmware / get your feedback.

I’m looking at two months to get the new design in order and a prototype built. After that I suspect it’d be another month or two before I’ll put a meter in anyone's hands. However, if you are further away and interested drop me a line too. I’ve had several people ask. There is a list being compiled. When www.accuity.ca goes live there will be a sign up section. This will be a closed Beta, more like an Alpha test really. Generally that means I’ll own the device, you have a loan of it and I will eventually take it back.

Thanks for following! And Thanks to Ray again for supporting the industry.

Monday, March 25, 2013

SPI, Buttons, Toasters, and More


Just a small update today on what I’ve been working on.
  • nRF51422 – Talking to the ADS1247 on the SPI bus, figuring out the reference code, and reading and writing pins.
  • Looking into Gyro’s. They have very very high current consumption. 4.2 – 6.4ma. This is much to high. I can’t find any stats on start up time. Sleep mode doesn’t reduce current below 2ma. Still too high.
  • Strain Gauges – Not much new, but I’m hoping I can find 1000 ohm gauges instead of 350 ohm. This will save power
  • Toaster Oven – I’ve decided to make a reflow oven. This should speed testing new circuit boards. I have an SSR on order, and a thermocouple and sensor chip on order from Adafruit. Let’s see if I get dinged with Tarrifs.
  • I’m interested in going to the ANT+ Symposium in Sept, but looks like I’ll have to upgrade to Alliance Membership. $1500 dollars a year is a little hard to swallow right now. If I’m in the market for beta testers by June I’ll sign up then and just suck it up.
  • Beta Testers – If you’re a cyclist in Ontario or know someone who might be interested in testing my next prototypes have them drop me a line at either kwakeham@gmail.com or kwakeham@accuity.com. Oh no, I gave away my new company name! Website coming in a month.
  • I’m thinking about making the board, or a variation of it, available to the hacker community. The plan would be to have space that other sensors (Accelerometer, Gyro, Magnetometer, General Purpose Analog Input with Gain [ADS1247/8]). Idea for now. ANT+ for all I say (but become an Adopter to get the ANT+ Key of course at www.thisisant.com )
  • Below is some testing. I’m sure all are becoming familiar with my laptop layout.
  • While I might pick up a BTLE sensor Tag from TI, I have no ambition to pursue BTLE at this time. Cost mainly. ANT+ will require FCC + $1500 membership + $750 device registration / testing. BTLE requires $22500. I am not joking. I became a BTLE adopter and I can barely understand the documentation and only have the vaguest ideas how it works compared with ANT+. Right now that’s a learning curve I am not willing to accept. If Accuity gets off the ground, has people test some prototypes, then I’ll reconsider.
image

Wednesday, February 13, 2013

More Testing V3 Power Meter and ADS1247

image

Some longer testing (1.5 hours) today and I’ve come to a few conclusions.

  1. My calibration is off
  2. It doesn’t matter that my calibration is off, the crank shear gauge on the inside of the driven arm to measure torque can be skewed by adding a twisting moment to your ankle.
  3. As a result my power balance and power numbers are all wrong! And WAY off from the method of calculating averaged (non-accelerating) power for my Kurt Kinetic Road Trainer.

So I will be adding new strain gauges to V3 on the top and bottom of the crank arm. The arrangement removes bending so it will stabilize and remove this issue. I had said previously that it is the superior arrangement. I didn’t want to have to use two different types of gauges but my hand has been forced. However this raises the question about Stages power meter. What is their arrangement? I suspect it is not a shear arrangement, but rather a double bending arrangement but still on the back side of the crank. It’d lose sensitivity but gains in accuracy.

The ADS1247 is reading out. It’s looking noiser than I want, but this might be a function of my protoboard / power supply / poor wiring / random resistors used as a voltage divider. I still can’t find a potentiometer around my apartment anywhere even though I bought and wired one up specifically for testing months ago. I’ll make a trip to the dollar store tomorrow and hope

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.

Saturday, December 29, 2012

V3–Maybe it will work

image

Okay, so if you look at the Arduino code in the image you’ll see a commented out delay(3); I had put this in the wrong location. Because I’m not properly reading the RTS line I put in the delay, and it cleared up ANT+ communications. However it’s in the wrong location and now it’s a delay after every read! Stupid I know!

More after the break. Also I’m starting to use breaks on the blog so the amount of posting will be short. Just click the read more if you visit the main page.

Saturday, December 22, 2012

Some more notes on ADC’s

I haven’t had much luck getting the SAR’s to work as I’d like. Honestly, it’d work better in Rotor’s or Garmin’s arrangement, that is, if you are essentially running two independent power meters and one just transmits its findings to the master. That way it would effectively double my sampling rate. However, as it stands, I can’t process the data on the Arduino fast enough to average out the signals to reduce the noise enough. I’ve thought about bumping to 16 Mhz. Several people have done this, and so long as you maintain good voltage it should be fine, however it is officially below the minimum requirement of the Atmega328 or Atmega32u4 chips requirements for 16Mhz.