My project involves an Arduino Nano V3, an SG90 OLED and an SSD1306 oled that communicates with Nano via I2C.
The Nano is in sleep mode most of the time, and only wakes up when a button is pressed. It then displays some stuff on the OLED display and move the servo around a bit for a period as short as a few seconds and goes to sleep again.
I got programming stuff mostly figured out, but I suspect that power supply could be a huge problem later on.
The first issue involves power consumption. I need this gadget to last as long as possible on battery power. I understand that both OLED and servo could draw current even when they 'do nothing at all'. OLED draws approximately 1mA even when it shows a blank screen. While servo draws 10mA in idle state. Thus I made a transistor switch for each of them, each controlled by a pin so I could turn them off completely with software. Idealy, after a short working cycle mentioned above, Nano first turns off OLED and servo, then puts itself to sleep.
My 1st question is, is there anything more I could do to save power on Nano other than calling the sleep functions provided by avr/sleep.h?
The second issue involves a series of voltage levels. By hands-on measuring, I found out that supplying Nano with 4.7V DC power resulted in a 3.6V logic high level on its pins, so when I connected OLED's VCC to 4.7V, an insufficient 3.6V logic high messed with I2C protocol and caused the OLED to show a bunch of garbage. So I decided to have 2 power supply voltage on board: one 9V to power the Arduino and one 4.7V (or 5.0V) to power OLED and servo. It seems to me that the only way I could get a 5V out of 9V battery is through a DC converter like LM2596.
My 2nd question is, will a single 9V battery do the job? And if the answer is yes,
my 3rd question would be, can I connect a Nano directly to a 9V battery? and
the 4th, how well can LM2596 converter mitigate voltage dropoff as the battery die out? e.g. will LM2596 hold output voltage at 5.0V when battery voltage drops from 9V to say, 8.0V?
Any suggestions you have are welcome! Thanks in advance.
Edit:
Here's a picture of 4 diagrams to showcase my circuit, as per requested by @ledsyn
On the upper left is a diagram of PSU. 9V is drawn from batteries, a DC converter converts 9V to 5V. So basically PSU supplies both 5V and 9V power voltage.
Upper right shows how OLED connects to 5V power. SDA and SCL are I2C wires that are connected to corresponding pins on Nano. D4 switches OLED on/off.
Lower right shows how the SG90 servo works, practically the same as OLED except being controlled by PWM.
Lower left shows how Nano is powered and connected. 9V power goes in Vin pin, which I assume could properly push logic pins like SDA, SCL, PWM, D4 and D5 to 5V level.
All 4 sub-circuits (if that's a thing) connect to the same ground.