Ryobi batteries have a LV cut off battery cut off if thats what you are worried about. Why would you not run the M12 set up.
That said you can get these low voltage disconnects. if you want to avoid the over discharging them. Run the batteries on a tool till they are "dead" then measure the voltage. You need to set the low voltage cut off a few tenths of a volts higher than what they show.
Here’s what I used for parts:
Slow Charger Shell & connecting prongs
Weewooday DC 12V-36V Voltage Protection Module Digital Low Voltage Protector Disconnect Switch Over Discharge Protection Module Output 6-60V, Low Power Disconnection (2 Pieces) https://smile.amazon.com/dp/B08LDGX2RX/ref=cm_sw_r_cp_api_i_XVT0H3DAS6R06Z056BHK?_encoding=UTF8&psc=1
BANKEE DC Voltage Reducer... https://www.amazon.com/dp/B0928JCLS1?ref=ppx_pop_mob_ap_share
Linkstyle 12V 4.2A https://smile.amazon.com/dp/B07GF1CPV8/ref=cm_sw_r_cp_api_i_Q8N79MZ58TM75TAF2ZQQ
12V Cigarette Lighter Socket Car Marine Motorcycle ATV RV Lighter Socket Power Outlet Socket Receptacle Waterproof Plug By MUZHI https://smile.amazon.com/dp/B07S91C3H6/ref=cm_sw_r_cp_api_i_44G31MM23ATK7KHE11E4
So, I pulled the charger body apart and then cut the wires connecting the prongs to the circuit board, leaving the main positive and negative wires as long as possible and trimming the balancing wires fairly short. I taped off the ends of the balancing wires to reduce the chance of them causing trouble later. Removing the circuit board from the bottom of the shell took a little elbow grease but mine was just snapped into place. I desoldered the LED from the board for possible use later.
Connect the red and black wires from the prongs to the input terminals on the Low Voltage Cut Off. Connect the input wires from the 12v converter to the output terminals on the LVC.
Find and mark where you want the charger sockets to mount, then drill holes to fit. This was the hardest part of the project for me as there is not a lot of flat surface on the charger body. Install the sockets.
I was concerned that I would run out of room under the sockets, so I soldered the 12 converter output directly to the connection tabs. I used 3M double sided automotive tape to fix the LVC and 12v Converter in place. I am planning to run some very light wire from the LED on the LVC to the LED salvaged from the original board as an additional “on” light.
The main idea for this was taken from this YouTube video. https://youtu.be/guLmVq9xPiE
Hope this helps! Good luck and let me know if you come up with any improvements!
I use this
Weewooday DC 12V-36V Voltage... https://www.amazon.com/dp/B08LDGX2RX?ref=ppx_pop_mob_ap_share