I'm developing a handheld Arduino temperature/datalogging project that I would like to be able to power using 4x AAA batteries connected to the Vin port on the Arduino so that measurements can be made remotely. However, I would also like to be able to power the unit using a switching power supply (9V 1A wall wart) through the DC-jack for longer-term monitoring when AC power is available. Are both of these power options possible in the same unit without removal of the batteries?
I have general electrical/wiring skills, but I do know that these questions are currently at the edge of my "for-sure" knowledge and I'd rather not ruin the Arduino or have a battery meltdown. Can someone describe how I might wire this "dual-power" design so that is works properly?
My understanding (which is quite possibly wrong) is that the Vin is actually connected to the DC-jack and if this is the case I can imagine issues such as reversed current flow when the unit is powered by the 9V wall wart, if the batteries are not isolated. Is this true? If so can you offer recommendations for how to isolate the batteries? Place a diode between the Vin and the batteries? If this is the right route can you recommend how to size the diode?
I may be off base too and would appreciate any help clarifying misconceptions I may have about the issues involved in this design
Thanks for you help,