Close

Update #2

A project log for RISE

Solar powered Bluetooth Low Energy window blinds

tiit-rtsepTiit Rätsep 01/28/2015 at 16:580 Comments

Today I worked on minimizing power consumption of the device. I found a serious problem with the sensors we are using. We use GMR magnetic sensors to detect a rotating magnet. We couldn't use the more common hall effect sensors because we need to sense a tiny magnet quite far away and the GMR sensor is much more sensitive. But the problem is that it uses a lot of current. Something like 10 mA. Our whole power budget for this thing is ideally under 1 mA. Right now we can go from about 1 mA to about 20 uA average by changing the advertising interval. We are going to try and get the optimum point with acceptable current draw and fast response times but we definitely need to stay under 1 mA average. So these sensors are going to be a problem. There is an easy solution but that will require a new spin of the PCB. Since we know we only need the sensors to work when the motor is powered we can just tie the supply voltage for them to the motor driver enable signal and we can save a lot of standby power. When the motor is moving it's going to be drawing something like 0.5 ... 1.5 A anyway so the sensors won't really matter there.

At the power level we are operating at every little thing counts. So we had to make our main loop faster. We had to remove all unnecessary pull-ups from pins that didn't really need them. We needed to configure all pins with analog voltages on them to disable digital input buffers. We needed to disable all the peripheral blocks that we don't use and even the ones we use we have to enable only for the brief times we actually need them. We are turning the main 16 MHz oscillator off for most of the time. We did add a 32.768 kHz external crystal to the board but right now there seems to be a problem with using that (connection drops in about 30 s). The Nordic SOC has amazing power saving features built-in. It controls the main oscillator very well if you just follow the guidelines given. In addition it has superb support forums and sample code. The thing that amazed me the most at first was that it's possible to run all the low frequency timing operations from an internal RC oscillator that is periodically calibrated against the main 16 MHz crystal source. This does add about 10 uA of average current draw and is not very precise in the long run. We are trying to run a software RTC and it's drifting a bit. So we plan to use the external crystal instead of the RC but for some reason that is giving us problems at the moment.

Tomorrow is a new day and a new chance to tackle all these issues.

Discussions