I'm trying to get my ArduinoBT to be a bit more power friendly, I have it running in a sensor network and it is constantly drawing power. I want to be able to turn off or put the Bluetooth module to sleep for durations when it isn't in use.
I've tried
Serial.println("SET CONTROL CONFIG 103d");
In my setup method which should put the module into deep sleep mode but it doesn't seem to do anything in terms of power consumption (still draws about 30mA).
Am I not waiting long enough for it to kick in? Does the WT11 iWRAP version not support deep sleep? Am I putting it in the wrong spot in my code? Am I doing something else incredibly ditzy that is stopping it from working??
Best Answer
The code I'm running at the moment is just
but I've also tried the SLEEP command in the setup, and putting this code in the ArduinoBT bootloader. I left the Arduino with sleep enabled running for several hours and it made no difference to the consumption, also "SET CONTROL CONFIG 102d" doesn't make any change. Perhaps I'm issuing the commands in data mode? I understand that data mode is when there is a Bluetooth connection and command is when there isn't a connection but I might be mistaken.
Sorry I've taken so long had my exams and holidays.
My code eventually evolved to be something like this:
Which doesn't work (YAY!)
I then found some code here which had successful iWRAP communication, I modified it to include the iWRAP I wanted, started with "INFO" and found out the version of iWRAP (WRAP THOR AI 2.2.0 build 60) obtained the correct datasheet found that deepsleep was feature of the module and that you could test it using the "TEST DEEPSLEEP" command. I used that command and the board slept! I think... the current sat at around 36mA which is higher than normal unconnected use but the board was incommunicable. The test returned an OK so I'm confident that I can make the board sleep now. Unfortunately issuing the "SLEEP" command doesn't seem to do anything atm, though I don't know if my initial setup commands are being issued yet.
Anyhoo here is the (barely) modified code I'm using now. Basically run it then enter "&" into the serial monitor and it goes to command mode and issues the commands you put in the code, enter "@" and it tells you the response to those commands.
Yay epic edit! Thanks so much for your help, it's been invaluable to my journey :)