Is it possible to make something like this to get power at daytime from solar and at night from a battery?
You can use diodes to automatically switch between power sources.
Hi,
This is usually called a "Solar Power Charge Controller".
See Amazon and also Google, like THIS
--
Mark