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:


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.

No comments:

Post a Comment