I had a 6vdc power supply laying around and John Zogg(my friend) wanted to power his scanner from both batteries and power supply. The power supply didn’t have the correct connector. So what could I possibly do to safely run it off of the batteries and power supply at the same time? So I got some rectifier diodes and used one for the batteries and one for the power supply. The rectifier diode will prevent the voltages from going back into the battery or the power supply. The diode I chose was an EGP50G which was a fast recovery diode a 400V and 5 Amps. It doesn’t need to be a fast recovery or 400v or 5 amps. In fact, you could use a 1N4001 diode and it would work the same.
That circuit above makes it act like an Uninterruptable Power Supply(UPS). I drilled four holes into th battery cover so I could use the cover as a Circuit board for the diodes.