Wednesday, May 22, 2013

LCD character screen and photo resolution

It seems every day that my list of issues on my google code issue tracker are always increasing, or at least never decreasing. But I got a few knocked off or at least reduced in severity over the last couple days.

To reduce power consumption I used my DMM to study which parts of the system used the most power, and to validate the power savings mode on the camera. What I found:

  • Entire system was using 280 mA at the start of my fixes.
  • The power LED was using almost 13 mA, so replacing the resistor in series with the LED brought that down to 3 mA. Further savings might be made by flashing the LED instead.
  • The IR LEDs were always on, using about 140 mA of power. I replaced the photocell with a 1K resistor which made the system think it was always light, and turned the IR LEDs permanently off.
  • The power savings mode was not initially working, but a delay in the code fixed that. During power savings, the camera uses 50 mA, and during normal mode it uses 70 mA. 
  • The XBee uses 70 mA. There is some sort of cyclic power savings mode that might be applicable for my application, but the effort in implementing it does not yet justify it. 
Overall I managed to reduce my power consumption to about 40% of its original, which should extend the battery life nicely. 

Another feature I wanted to implement is a higher resolution photo mode. This was actually quite trivial, and just consisted of another command sent to the camera during startup. However I had a small bug to sort out: the files became longer than 2^16 bytes, meaning I could not use a 'word' to store the location of file I was currently reading. 

Adding an 16x2 LCD character screen was also remarkably easy with the LiquidCrystal library. The sample code was easy to implement, and now I can operate my camera basestation without needing a computer which is a huge bonus. The LCD character screen takes care of providing user feedback and indicating which photo is currently being captured, and how long is left in the transferring process.

Later I will add a couple photos and video of the system in action: I turned a couple plant pots around and I'm hoping to capture the plants turning back towards the sun over the course of the day. It will be a good test of how the battery is holding up as well.

No comments:

Post a Comment