The cost of 4 such batteries is around $12.00 at my local CVS in Dec 2013. And these products eat through the batteries like crazy, given the motors, especially in the cradle swings, are pretty powerful and need a lot of juice.
Each D type battery is 1.2V DC. So 4 x 1.2 = 4.8V DC.
A USB cord supplies power at 5V DC (Nominal).
Keep in mind, the power ratings are all nominal, not precise. So you do not need anything fancy like a power regulator chip, and this solution is for the average user, no need for soldering irons, reciprocating saws, V12 automotive engines or nuclear powered turbines or anything. Just duct tape and a small blade / scissors are enough to accomplish this.
Please see the image below. The 4 batteries are connected to each other, in a sense they are stacking on top of one another. If you see the battery compartment with the space for 4 batteries, you will see the terminals interconnected as below.
+1- +2- +3- +4-, so the +ve terminal of 1 is open on one end, the -ve of 1 to the +ve of 2, the -ve of 2 to the +ve of 3, the -ve of 3 to the +ve of 4, and the -ve of 4 is open.
If you want to replace the batteries, all you have to do is supply a power of 5V DC to the +ve of terminal 1 and the -ve of terminal 4.
A USB cable when opened, shows 4 wires. Red for +5V DC, Black for Ground (GND), and green and white for data. One end of the USB cable is connected to a wall adapter. Let us consider the iPhone 4 USB cable charger. There is a wall adapter and a USB Cable. One end of the cable is USB and the other end is the proprietary iPhone style connector which goes in to the iPhone.
Cut the cable near the proprietary connecter. Strip it for a few inches, expose the 4 wires for about 2 inches or so each. Cut and discard the exposed green and white cables. Strip the top inch or so of the red (+5V DC) and black (GND) cables.
Connect the red wire to the +ve terminal of battery terminal 1 in the fisher price product, and the black wire to the -ve terminal of the battery 4 terminal.
Use soldering iron or just duct tape to hold the wires in place on the battery terminals. Then put a knot on the wire and stick it in the compartment and screw the lid of the battery compartment shut. It is important to put the knot, as a stress reliever, in case some one inadvertently pulls the wire too hard. The force of the pull will be "eaten" by the knot which is inside the compartment lid, and thus the wires themselves won't be pulled out of their connections.
Connect the USB connector to the wall charger, and run the Fisher Price product!
You are done, and congratulations on saving $12 a week!!
Note: the battery compartment is sufficiently insulated by the plastic material covering it, and then there is fabric cover on the seat on which the baby is sitting. So even a liquid spill will not cause a short circuit, unless of course some one is deliberately throwing buckets of water or immersing the unit in water.
But even then it won't matter, because +5V DC is harmless. You do touch your USB cable with your hands all the time, don't you?
So it is a safe solution for the baby.
However, I take no responsibility for any accidents or mishaps occurring as an effect of using this instructable.
Kaushik Lodh, MSEE,