High to low power for Arduino

Hi everybody,

I'm trying to take a 0-24v DC input and scale it down to 0-5v DC for the Arduino to monitor. The idea is to monitor some PV solar panels (0-24v) and send that to an Arduino analog-in to rate it between 0-1023 for output to the user.

That is, if the solar panels are generating 24 volts, the Arduino will see 5v, if they're doing 12v, Arduino will see 2.5v, and so on.

I intend to use a separate power supply to power the Arduino itself, unless it happens to be easy to use the scaling one to do that too.

Any advice on how to go about this?

Thanks!

Simple voltage divider.
Vout = Vin R2/(R1+R2)

Vin
|

< R1

|
| Vout
|

< R2

|
|
Gnd

R2 5K
R1 20K
Vout = 24V*5000/(20000+5000) = 4.8V
Tweak values a little to get full 5V if that'ds what you want, like R1 = 19K

Which panels? A panel good to charge a 24V battery will develop perhaps 40V when open circuit in good sunlight...

Thank you so much! I didn't realize it was that simple

No problem. Make sure Gnds are connected together.