Hi everyone, I'm fairly new to Arduino and the froum, and to micro controllers in general. I am currently working on a small Arduino Uno or Nano project in which two sensors, a LM35 and a Guva S12SD, measure temperature and UV (as millivolt), respectively, and display the readings to a OLED display. All of this powered by a 9v (6xAA) battery pack. The question I have is the following: Considering this configuration, can I power this three devices directly from 5v pin of the Arduino while supplying the board through the Vin pin? Won't there be issues with readings given the current supplied by the 5V pin? Sorry if this questions are basics or if I am misunderstanding concepts here. Thank you for your time
LM35 datasheet
- 4 V to 30 V
- Less than 60-μA
GUVA-S12SD datasheet
- 1 mA
- 5 V
OLED datasheet
- 7.5v to 15v
- 15mA
Total Amperes: 16.06 mA is within Arduino absolute maximum of 20mA 40mA per pin, 100mA total pins.
Thanks for the answer so quickly! Another question, if I may. Reading your answer, the docs of the OLED display (which is the same we are planing on using), if the VCC pin range is from 7V to 15V, won't 5V from the Ardiuno be enough to power it or am I missing something?
When I went to school, 5V is LESS than 7V so is definitely not in the range of 7V to 15V
Hi! welcome to the Forum.
You´re missing giving us the model of your OLED display. There are some SSD1306 based displays (e.g. 0.96'') that can operate on 3V.
Oh ok. It is a 0.96" 128x64 ssd1306
Then yes, you can power your setup from the Arduino 5V
Thanks for the answer @Brazilino
You´re welcome!
Sorry to ask another question I am quite new to electronics. A new requirement was added: Now it also has to measure the charge of the battery pack. So can it be done with a voltage divider? If so, what would be a rule of thumb to choose the correct size and ratio of the resistors, as we must consider that the voltage of the analog pin is 5V?
Yes.
Kirchoff´s Law
Summarizing for your case (9V-->5V), any combination where R2=1.25xR1 will be suitable, but of course you don´t want the voltage divider to have a lot of current passing through, so 1.2K and 1.5K is a possible combination.
OK. thank you for answering!!