Voltage divider

A voltage divider is the wrong circuit or device to use for this particular kind of application. Don't use voltage dividers if the intention is to power a device. Or at least, if the device that you're trying to power draws significant current (and that current can vary ie...change with time), then avoid using voltage divider.

The solution is to either obtain a 5 V power supply, and maybe rating of 1 amp or 2 amp...... or use DC to DC step-down (buck) converter that takes your 12V DC and converts it to regulated 5V output.

The reason for voltage divider not being used for this kind of thing is because a load that draws significant current will alter the voltage at the middle of the divider circuit........ which just means that the voltage divider won't work in the way that you had intended.