Close

Power Usage Characterization

A project log for DWM1000 Cat Tracker

Using the DWM1000s amazing ability to pinpoint tags to within 10cm we will track the cats positions in the house with amazing precision.

dryerziniaDrYerzinia 03/29/2017 at 02:320 Comments

So I decided to try and graph the power consumption of my tags when ranging by hooking them up to a huge capacitor and sampling the voltage with an Arduino.

Pretty simple setup and it resulted in a very interesting graph of the voltage

This shows that the bottle neck is clearly the transmit, the 30 seconds between ranging's counts for essentially none of the battery usage. This means to increase my battery life, or shrink the battery size I'm using I will either have to push those further apart, which I am working on using a motion sensor to detect when to update the location because why update if the cat has not moved.

The other is to optimize power usage in the beacon cycle. My first though was to combine the 3 rangings into a single shot, though that could cut it in half, but when I zoomed in something else stuck out at me.

Two different slopes, it didn't make sense the entire ranging was taking ~600ms to do. So what was going on? Turns out my code is bad.

		if(mode == MODE_TAG){

			check_sleep = true;

			delay_ms(500);

			reenable_dwt();

			// TODO retry up to 3 times if ranging fails
			ds_twr_init(ancor1_addr);
			delay_ms(10);
			ds_twr_init(ancor2_addr);
			delay_ms(10);
			ds_twr_init(ancor3_addr);
			goto_sleep = true;
			sleeping = true;

		}

I am delaying for 500ms after it comes out of SLEEP! And whats worse is there is no apparent reason why I should do such a thing, it hasn't even started bringing back up the DWM1000! 58% of my power usage is just the chip sitting there doing nothing!!! FAIL!

Remove that 1 line of code should double my battery life. So how does it look after the code change is made?

A 55% change in voltage drop and instead of 600ms it only takes 80ms. Now instead of 44 days I should get 90 days out of the battery. Hopefully this plus motion sensing and combing the 3 ranging into a single shot will let me shrink the battery and also give it a year long run time.

Discussions