How to charge a 12V battery from a 24V battery. Uses a buck converter and a couple of voltage controlled relays.
Modules used: XH-M604, XY-CD63L, Ming He B3008

Hello Today this but first heading up to the shed with my new wire and a screwdriver. Let's turn on the main lights, which is that middle switch. and the idea today is to shift the lighting system off these lead acid batteries and onto this lithium ion phosphate battery. And that's what my piece of wire is for.

It will go from there, that little terminal block down to here, but not onto the lead acid. onto the Lithium. So let's hook that up now. So that's the lead acids disconnected and so I don't accidentally short out the lead acids I've just put those into a a terminal block which is just going to hang there and do nothing.

So the lead acid system will now, just, uh, get charged up to whatever the charge controllers charge it up to 14.2 in the morning I think it is. and about 13.5 in the afternoon? Yeah, that's it, right? that's the wire attached to the lithium ion phosphate battery that now goes up to the lighting board. Uh, 13.2 volts is the voltage across that battery. Okay, let's switch on the lights.

Uh, that drops to 12.5 Which means this, uh, this wire is not not very, uh, thick so we're losing quite a few. Uh, well, quite a few tents of a in that wire. There is four amps being pulled by the lights. Uh, these are the lights.

You got strip lights up there there and down there. Now of course this change over to this Lithium iron phosphate battery. Uh, powering the lighting does not in of itself A video make. um, there's more to this and uh, the point is that even if the lights are switched off, then this little display panel which is on day, day and night will eventually drain this thing down.

And so I reckon it probably run for another 3 or 4 days. But I do now need some means to charge this up and what I'm planning to do is use one of my give and take relay arrangements to charge that 12vt battery from this 25v battery. Um, when the conditions are met that that battery over there is a bit low and this battery here is high enough voltage that it can supply a charge across to the now lighting 12vt battery. right? let's head inside.

Uh, because it's cold out here, it's 9. C Uh, let's head inside and have a look at how I'm going to do this give and take relay. Arrangement So let's see how this thing works. I've got 12 volts.

Uh, I'm limiting to half an amp. just you know, for safety's sake, switch this on. Okay, this unit comes on. Uh, it's reading a little bit low.

It's saying 11.9 volts and after a little delay, the LED comes on and I think the delay is a built-in uh, kind of hysteresis. It's not really hysteresis, but it's a delay so that we don't get relay chatter. Uh, if you press the left button, that's the start button. That's the voltage at which it starts.

uh or turns on the relay 12.5 volts and the stop button is the voltage at which it turns off the relay 14.5 volts. So what is this thing? Well, it's a charge controller. You hook a battery and I'm simulating the battery here up to the battery input when the battery gets a bit low. Um, it turns the relay on and on the other input, you've got your battery charger.
Now of course that has to be a current regulated battery charger and uh, turns on the relay and th the battery is charged. Now when the battery gets up to the higher voltage, uh, it's currently set to 14.5 it turns off the relay so you don't overcharge the battery. Um, now I've got three of these. I've got this one.

I think these two came from IC station I think I bought this one separately on eBay and it is different. It's got a a black uh heat sink here. it's got a different number as well. This one says Hcw M 634 and these are Xh M604.

Uh yeah, that was 634. So I'm just going to put this one on and just see how it differs from this thing, right? Let's switch on that. and uh. the first and most obvious thing is that the voltage measurement is a bit all over the place.

I Think that's flicking between 12 something and 13 point something. or it might be 11 possibly Now I Assume this is because this is measuring voltage very rapidly. Um, and it's actually just seeing the noise on the output of this power supply because a switch mode pass Supply will have noise and so this is responding to the noise. Now if I press the button to see the low voltage, it's set to 12.2 Of course that's stable cuz it's not measuring anything.

The upper voltage is set to 14.3 But the measured voltage. Um, yes, it's all over the place. so they've obviously Rewritten the software in this later version to stabilize this voltage measurement shouldn't be a problem if this is hooked up to a battery because that should have a much more stable voltage. But yeah, output of a switch mode power supply Noisy as heck.

Now like I say I've got three of these things. and I've also got three of these things. Now these are the ones that can be a charge controller and work in the same way as these. They've got a few extra features, but these ones can also be a discharge controller.

So what this can do is if the battery gets up above a certain voltage, the relay will turn on and discharge the battery into something else. and so that's what I want for the source battery. So what I think I'm going to do here because I've got three of each of these I think I'm going to use uh, a pair. which is this one for the source battery and this one down here with the LED display for the destination battery, right? Let's switch this off off and unhook this thing because if I assume that this power supply is my source battery, then that will go into one of the discharge controllers.

So I want to attach that to there? Uh, okay, so let's switch that one on. Um, now my source batter is actually going to be the 25 volt battery, so it wouldn't be a bad idea if I raise this to 25 volts. Uh, just so that uh, things are a little bit more. yeah, that's switched on obviously because its voltage threshold is set lower than 25 volts.
Okay, so 25 volts. Um, this turns on. Now this is the give relay and the give and take system is an and function. So we need two relays and only when they're both on this is on and this is on does it pass current through the two relays and into the destination battery.

But of course you don't want to just connect a battery through two reays to another battery. We need a current controlled charging of the destination battery. So I also need a buck converter. Uh, I'll probably put it between these two, although I was thinking it could go after the second relay.

but I'll come back to that later. So let's put this between these two relays and see how this is looking. Uh, so that's the setup with the source battery. Think of this as a battery.

Uh, the discharge controller. So when the source battery gets high enough, the discharge controller says, okay, I'm making power available you may not be taking at this moment, but I'm making it available. Then we go through the Buck converter in order to step down from the 25 volt battery to the 12vt battery. So this doesn't want to be on 6.5 it wants to be on 12.

probably higher, but I'll put it on 12 for the moment just so we know what's going on. And then we're going to have the Uh Charge controller. So this will be connected to the output of the Buck converter and then the battery connection. Here, we'll go to the destination battery.

Now, if you're thinking okay, this module here can work in either Discharge controller mode or you can reconfigure it for charge controller mode. Um, one of the reasons I don't want to do that is because I've got three of each of these types, so I might as well use them. That gives me three give and take pairs. I'd have to buy more of these if I was going to use these as both Uh Discharge controller and charge controller.

but also this one is not powered by the battery side. Um, well, the battery side is the input if this is a discharge controller. If this is a charge controller, it's powered by the charger. so this would turn on and off as the give relay turns on and off.

This on the other hand, is powered from the battery terminals so this will stay on all the time. Now you could argue that that's not an ideal situation because this little display is drawing drawing power from the destination battery. Um, but I Just like the idea of that this is not being switched on and off. I Mean it might work I might actually experiment with it later, but for the moment I'm just going to Now hook up the Uh charge controller to the output of the buck converter and then this will go to the destination battery.

Might even get a battery and try it right? those are that's the source. Battery Discharge Controller Relay Buck Converter to step 25 Vols down to 12 Vols Charge Controller relay I Now need a battery I've noticed there's a piece of wire on here which I don't like the look of. so I'm going to cut it off just in case it shorts on something. So here's my lead acid battery that's 12.
Vols Um, it's probably quite well charged cuz it was hooked up to those other lead acid batteries in the shed. Now if I connect that to this device, this device might turn on. Uh, because it might say the battery is low that will connect it through to the butt converter that back feeds so it will back feed to these terminals here. I Can't see that being a problem because these terminals don't power this.

These are powered by the input terminals which are connected to my 25 25 volt power supply. Um so I think we should be okay to hook this up. So I'll do that now. Uh, so that's positive.

Let's put negative on. so that's powered up. Will it turn its relay on? Probably not actually. cuz I think that's a oh it has turned the relay on.

Uh, that has rebooted it. which is interesting. Why did that happen? Oh, it must have been just been me. uh, letting go of this connection.

Okay, I'll make that a permanent connection now right? That all looks okay. Um, this is now dropped to 12.5 So this battery is a bit knacked I think cuz it's just not holding up very well at all. So what I could say is let's say if it drops to 12 Vol it turns this relay on. So the low voltage on this device needs to be set to 12.

Vols it's currently set to is that 12.5 is that the reading I Think if you press and hold, you can adjust it. So yeah, we can take it down to 12.0 That's the point. Uh, below which this relay turns on, we can set the upper voltage 14.5 Well, let's bring that down. Let's press and hold to set it.

Let's bring that down to say 14. That seems safe enough. Okay, so this will turn on at 12. Turn off the charging at 14.

Uh, this isn't going to achieve any charging set to 6.5 volts so that needs to be raised up to well, it doesn't really matter, does it? Because this is going to turn off at 14 volts I Can set this to about 15? It's not really important. The main thing this is doing is uh, doing a buck conversion down H Well, the main thing actually it's doing is current limiting. Let's put it to 15. Uh, like.

So and what's the current set to half an amp? Okay, well let's say well, that's probably okay for lead acid, so let's leave it like that. Now the other thing I need to do of course is I need to set the buck converter to automatically when it's powered up. switch on its output and at the moment it's not set like that. it's set so that it Powers up but doesn't enable the output.

Uh I can't remember how to do that I Think you have to press and hold okay while you power it up or something like that. but I'll play with that for a bit and get that set up. Now Yes, it was simply uh, press and hold. Okay, and then it it has the option zero one and two and zero is the on or off uh enabled on switch on.
So let's switch this relay on and you can see that this comes on and enables its output. and if I turn it off, we've got 15 Uh volts and half an amp so that's fine. Uh I think it's ready to be switched on in full I took the fuse out of the battery, but I'll put that back in now. Okay, so that's all running now I Think this battery must have a quite a high impedance cuz it's switching on and off quite quickly so you can see uh, it's charging up to 14.

It's turning the relay off cuz it says that's fully charged. It then drops down below 13 to 12. Point something. I've set the Uh lower trigger to 13.

So when it drops down to 12.9 and holds that for any length of time, there is this time delay thing, turns the relay back on, charges back up, and then turns off again. that's cycling quite quickly as I say because I think there's something wrong with this battery. Um, this en enables itself when it's powered up. I'm manually overriding this to switch on and off the give relay.

so I can switch that off. that uh takes the buck converter out of um Power that powers down the buck converter. However, when this thing turns its relay on, it's powering the buck converter up by back feeding it. so it's back feeding it that way, powering the relay up and now it's asking to be charged.

And in fact, it's now powering the butt converter with its display and this relay so that will probably pull the battery down over time. So when the give system is at a high enough voltage that it wants to give, it turns on that turns on the Bu converter with its current limit which I've set down to now 200 milliamps cuz this battery was charging too quickly, it was cycling too quickly, charges the battery up. the battery now says I don't need anym charge I'm fully charged, turns the relay off, but it's dropped down to 12.8 so now it need to turn back on and uh, this will charge and discharge uh in a cyclic manner. But of course, when I'm in the shed charging the big lithium ion phosphate battery, we won't get this cycling problem.

It's only because this battery is, uh, effectively dead at the end of its useful service life. So this quite neatly shows the and Status Actually, there is a light on here. Now if the LED on this relay board so that relay is on is that getting warm mildly warm? Um and the LED on this relay board are both on, then you've got both inputs to the and and that um enables the transfer of charge from One battery to the other. Interestingly, um, either relay being on Powers up the butt converter.

So the butt converter actually gives you the output of the and Status so that one's off if I now turn this one off, the butt converter turns off. But if if either one of these two relays comes on and this one is going to come on very soon, when the battery drops down to 12.9 volts and stays there for any length of time, this relay will come on. And the but converter. Ah no no it doesn't give the and Status does it because it doesn't show.
Uh no. this gives an or status. So if either one of these relays is on, the butt converter is on. but the energy transfer only occurs when there's an and function when both of these relays are on.

Yeah, that's it. This shows it as an all so this is ready to go out to the shed and then when it's out there, I Need to set a few things: the upper and lower voltages for the destination battery, the upper and lower voltages for the source battery. Uh, the voltage on the buck converter isn't terribly important. So really all I'm setting on here is the current.

but just make sure that the voltage is Ade to fully charge the destination battery. Uh yeah, that should do it. I'm going to take it out to the shed. but anyway, for this video, that's it.

So cheerio.

By Julian

Youtuber, shed dweller, solar charge controller aficionado

14 thoughts on “Give ‘n’ take energy transfer system”
  1. Avataaar/Circle Created with python_avatars Robert Goddard says:

    Great to see that contraption all working together with a knackered battery , shows the full functionality of the principal.

  2. Avataaar/Circle Created with python_avatars Gareth Jones says:

    Great video. It's a shame you can't buy an all in one bidirectional buck converter. 😊

  3. Avataaar/Circle Created with python_avatars Hermit Hill says:

    Seems like a complicated way to do bugger-all. Too many boards drawing too much current to be efficient. I use a ZK-J5X V3 to charge a 12V pack from my main 24V pack.

  4. Avataaar/Circle Created with python_avatars kingkeygear says:

    Looks to me like a fire waiting to happen

  5. Avataaar/Circle Created with python_avatars Jacques B says:

    interesting. i also did something like that for my own "ups" psu at 14V feeds into relay when feeds converter to keep V at 12.4V when psu is off relays goes off and switches other relay on which reconnects battery which is off when psu is on to charge the battery. a little relay circuit that suppose to switch between psu and battery to power something, but it doesnt charge battery.

  6. Avataaar/Circle Created with python_avatars speedsterh says:

    Do you have a link for buying or at least looking at these devices specs ?
    When I enter "give take energy" in aliexpress, I mostly get testoterone boosters proposed 🙂

  7. Avataaar/Circle Created with python_avatars David Potter says:

    You need thicker cables to prevent the voltage drop. I am using 2.5mm multi strand wire, doubled up to equal 5mm square, it still solders into the ring terminals with a bit of manipulation.
    QUESTION:
    Can you please drop me a link for your source of Banana plugs.? I can only find unshielded decent Speaker type ones, which are no good with high current sources, in case of accidental shorts ETC. Even plugged in they are unshielded.

  8. Avataaar/Circle Created with python_avatars Daves Tech says:

    I'd put a diode after the buck converter then go to the battery instead. Not using the one module after the buck converter, as it is not needed. Stopping the battery backfeeding in the process too.

  9. Avataaar/Circle Created with python_avatars jlucasound says:

    The Shed Looks Great!!
    More Room for "Shedanigans"!! 🏠🎛⚡💡👨‍🔧🪛🧰👍🦾

  10. Avataaar/Circle Created with python_avatars Stinky Cheese says:

    Heh, when you get this all finished, people won't see you for days and wonder what happened, only to shockingly discover that you are trapped in your own spider web made of wires. 😉

  11. Avataaar/Circle Created with python_avatars Fred Flintstone says:

    Nice but would a relay or diode stop the back charge of the buck convertor????

  12. Avataaar/Circle Created with python_avatars hello says:

    I love the user interface and scaffolding work!

  13. Avataaar/Circle Created with python_avatars Jens Schröder says:

    LiFePo4 batteries have a built-in BMS.
    At 14.6 volts the BMS disconnects the charging Mosfet and at 10 volts the BMS disconnects the discharging Mosfet.
    You only need a step down regulator to 14.6V and 10A

  14. Avataaar/Circle Created with python_avatars James Hancock says:

    Why not just use a push/pull buck/boost and set limits in it?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.