• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Part requirements for a DC solenoid project

JJ2430

Member
Thanks for the feedback guys.

Mike, I'm not getting clicks or unwanted motion from solenoids on power-up. Before reaching the end of my tests I had unexpected solenoid activation or solenoid staying on upon button press but I discovered that it was due to a bad grounding: all components were connected to common ground but gate driver's ground pin was not connected to Uc's ground, which in itself was a dumb mistake since the circuit loop between Uc and gate driver was not close (see in my schematic the connection between common ground and uc ground). That drove me mad for days--seeing the motors behaving erratically without knowing why-- until I added that simple connection. After that the whole system became very stable. But I'll try your suggestion of using GPIO 4/5 instead of 23 and placing resistor between connection to IN A and ground. It'll surely be more suitable in the long run. I also burned my Wemos Uc during one of my latest tests when I did the plug-out phase of my final pcb with parts soldered. I inadvertently let the Uc's pin 23 2V wire end touch a 12V connection on the pcb and it fried the Uc's chip. Current seem to have found a way back to board chipset. Dumb unlucky mistake... A new Wemos is on the way. I might be incorporating the opto between GPIO and IN A after all, just to make sure it doesn't happen again.

As for the battery I'll indeed use extra caution. I heard many bad experiences after mishandling of these cells. This is why I want to triple check all the solutions. I lean towards using the Dewalt since it provides 6 amps which is what I need to drive my 2x2.5A solenoids. But this battery pack is 20V, I didn't find 12V packs that provide 6A. That means that I have to remove 4 batteries to drop it's voltage to 12 while keeping the parallel pairs to maintain 6A. I'm not sure how the pack's bms pcb will react to that since it seems to be designed for 10 batteries, not 6 (see image below). I'm not sure what is the safest route: buying 18650 batteries from known reputable source and a good bms system that we can easily find for those, or continue with the Dewalt pack and venture on a path that is uncertain.

DSCF7023.jpg
 
Last edited:

rjenkinsgb

Well-Known Member
Most Helpful Member
Note that the amp-hour capacity and the discharge current capability are two very different things.

Example: https://www.ebay.co.uk/itm/4S-14-8V-35C-5-5Ah-Lipo-RC-Battery-XT60-for-RC-Car-Truck-Airplane-Helicopter-UK/183984502534?epid=6026543109&hash=item2ad654b706:g:DRAAAOSw72JdSUKN

Four cell 5.5AH, rated "35C" which means the maximum load current is 35 x 5.5A; over 190A..

Or three cell, similar rating: https://www.ebay.co.uk/itm/3S-11-1V-5-5Ah-35C-Lipo-RC-Battery-Deans-for-RC-Airplane-Helicopter-Car-Drone-UK/122724347217

Note that four cell gives the nearest range to a 12V battery - around 16V full charge down to 12V when flat. 3S will be at 9V when flat.


If you are using external balance and protection boards, those RC batteries are probably a reasonable choice. They are designed for balance charge circuits and all the cell connections are brought out to the smaller plug, to connect to a separate balance charger.


Any reasonable size power tool battery (or 18650 cells) would also be able to provide 5A without problems - if using the drill can flatten the battery in less than one hour, it's running at more than 1C current. Some only give about 15 mins runtime on a heavy load.
 

JJ2430

Member
Thx RJ and Mike. This Floureon 4S battery pack seems like a very good choice for my application. All cells are already packaged in a neat container and provide just the right amount and range of power. Thanks for bringing that solution RJ. It is much more economical and practical than going with 18650 or powertool pack. And it doesn't require serie/parallel re-assembly. Do you know of any balancing/protection board compatible with those RC packs and what charging device to use? Following Mikes suggestion I could split the output into 2 branches: 1 branch with native 12V 5A for solenoids and 1 branch going through the buck converter for the 5V output (gate driver and Uc).
 

rjenkinsgb

Well-Known Member
Most Helpful Member
A four cell balance & voltage limit version from the same seller as the the three cell one you listed should be fine!

For charging, you need an accurate voltage regulator with a current limit and a diode to prevent discharge when the power is off.
16.5V at the battery will be very close to full charge and keeping it a bit under 4.2V per cell will extend the battery life.

Current limit wise, anything from 250mA to 2 - 3A is fine with one of those batteries.


Edit - Or, if you are only going to charge it occasionally, you could get a matching RC charger - I have one of this style that I use with all my made-up lithium packs; I fit balance leads to them, to suit it.


Occasionally they appear rather cheaply, mine cost £12.
The connectors and extra or extension balance cables are readily available.
 

JJ2430

Member
Awesome, thx RJ. I put together a list of the items in order to fulfill the power requirements. Please share your views guys and if you think there's something off or missing let me know. I'm ordering before the end of the week while stock last at Canadian Ebay stores.

1- HRB 14.8V 6000mAh 4S 50C Lipo Battery XT60 T for RC
2- iMAX B6 B6AC LCD Screen Digital RC Lipo NiMh Battery Balance Charger Adapter Acc
3- 2PCS Supper Mini 3A DC-DC Converter Step Down Buck Power Supply Module 3V 5V 16V
4- 4S 30A 14.8V Li-ion Lithium 18650 Battery BMS PCB Protection Board Cell Balance
(RJ, are you sure that this protection board can also manage Lipo? It is mentioned for 18650 but Amp/Voltage is the same for both battery types. So I guess it is ok).

Again, thanks for your help. It is invaluable!
 
Last edited:

Pommie

Well-Known Member
Most Helpful Member
I don't know enough about Radio Control batteries but THINK they may not last as long due to their construction to allow huge currents to flow - perhaps someone else can comment on this. Is this going to be permanently powered or will the battery be removed for charging? How long do you expect the solenoids to be activated each day? Note that 18650 batteries are Lipo.

Mike.
 

JJ2430

Member
Mike, the system will be shut off while not in use and is going to be powered about an hour 5 times a week. I expect to have around a 100 cycles of few milisecs on the 2 solenoids during each of those hours. The battery will be charged while the system is off and I would prefer if they remain connected to the circuit during charge since the whole electronic compartment, including battery pack, will be closed. The charging plug of the lipo is going to be the only element reaching the outside world. Would it be safer for the system that I detach the battery pack completely while charging? That will introduce a slight change in the original design but nothing serious. By the way you just made me think about an important component that I thought of but completely forgot to implement in my schematic: a on/off switch. This switch will go between battery pack and buck converter providing +5V to microcontroller and gate driver VDD.

Justin
 

rjenkinsgb

Well-Known Member
Most Helpful Member
OK, except you don't actually need both the stand-alone balance charger and the protection board.

The charger will not work without the balance connections & with both connected, if there is any difference between the voltages of the two, it could cause problems. It may not, but I'd be cautious.

With the the PCB, you need an accurately regulated voltage with a current limit.


I don't think battery life will be a problem, as they will be used at relatively trivial current compared to the ratings.
Keeping the charge voltage slightly lower will drastically extend the life as well, eg. using 4.0V per cell compared to the maximum 4.2V
Thay gives around four times longer life, with slightly lower working capacity.

Also don't charge them too often; let them run down to 20 - 30% before recharging, for maximum life.

See the article here for more information on that:


I'd advise you also get some spare XT60 battery power connectors, which are typically less than a dollar a pair.

And a couple of 4S balance cable extenders, eg.

They allow you to use the battery unmodified & the extensions can be used with the charger to avoid straining the battery cable, or cut down to connect to the battery balance PCB.
 

JJ2430

Member
Thx Rj!

OK, except you don't actually need both the stand-alone balance charger and the protection board.
Does it mean that the protection board is not required at all if I'm using the above mentioned balanced charger? The battery pack will not need this board when powering the rig? Is it in fact only required when charging the pack if the charger is unbalanced? I just want to make sure that I understand well. Thanks for your input.
 

rjenkinsgb

Well-Known Member
Most Helpful Member
The battery pack will not need this board when powering the rig? Is it in fact only required when charging the pack if the charger is unbalanced? I just want to make sure that I understand well. Thanks for your input.
Yes; though I have slightly re-thought that..

Balancing is only done during charging, while the cell voltages are increasing; that's when a cell may otherwise be over-charged if the capacities and charge states are not perfectly matched.


On the other side, a simple BMS board that disconnects on overvoltage or undervoltage, connected to the load side of the system, would be practical.

Or that combined function board, with that permanently wired to the load electronics and the battery plugged in to that instead of the charger when it's running the equipment.

The only reason for that is to prevent excess discharge in case of a fault or if the system is not charged for a long period.
If the battery is discharged below around 3V per cell, the cells can be damaged or short out - the BMS disconnected the battery from the load if it is discharged too far.
 

rjenkinsgb

Well-Known Member
Most Helpful Member
It looks OK in principle.

Just to clarify, that is as long as the battery is disconnected for charging - not to both the intelligent charger and the device at the same time.

If you want to charge it while still connected to the balance/protection board, you need the voltage regulator plus current limit setup instead of the separate charger.
 

Pommie

Well-Known Member
Most Helpful Member
A couple of comments on the circuit.
You still don't need R1.
IN B should be grounded (via a 10k resistor maybe).
To prevent problems at startup, a 10k resistor from IN A to ground would be prudent.
If you're going to keep the 12V connected then a 10k resistor from Gate to ground would be prudent. It's possible (not likely) that stray charge could turn on the MOSFET. I now see you are now switching the 12V line so this is irrelevant.

Mike.
 

JJ2430

Member
Thanks guys. Here's an updated schematic based on Mike's comments. Please note that I added an opto between Wemos GPIO pin and gate driver to avoid frying a second board! I added a resistor between gate and ground since it will help keeping the gate off when the SPST switch is on and pin18 is not solicited. I'll figure out a way to simplify the disconnecting of the Lipo's balanced cable from protection board when battery is connected to external charger. There could be a special switch for that type of cable that could be turned on and off instead of manually unplugging the cable itself. I want the minimize as much as possible the handling of connections once the project is completed and enclosed into its protective shell. I really appreciate your quick inputs.

20191011_BTController_V01.JPG
 

alec_t

Well-Known Member
Most Helpful Member
Why have you wired the optoisolator like that? It's acting simply as a diode and not doing any isolation.
 

Pommie

Well-Known Member
Most Helpful Member
The way you've connected that opto does not give me any confidence that you understand any of the circuit. Remove it and replace it with a wire. What makes you think something will fry?

Mike.
 

JJ2430

Member
Darn, I uploaded the wrong version. It was a draft with the opto not oriented and flipped in the right axis. This one should make more sense. I'm still learning and making mistakes is my specialty in the moment. I've never done a project of that magnitude before. I still have a lot to learn from you guys, so please be patient ;-) I can't express how much I appreciate the help you've been giving me over the past months. A lot of this stuff was new to me a couple of weeks ago.

For the opto I'm not sure if I need resistor for the anode/cathode. The reason I'm using the opto is to avoid any high voltage going back to the Wemos. I destroyed my previous board 2 weeks ago when the wire's end on pin 23 came into contact by mistake with a solder running 12V near the Mosfet. I had to wait 2 weeks to get a new board. I'd like the Wemos board to be as isolated as possible from the high currents.

20191011-BTController-V02.jpg
 

Pommie

Well-Known Member
Most Helpful Member
The gate driver (tc1427) will stop the wemos from seeing 12V unless you connect it by accident but even an opto won't stop that. The opto really isn't needed. Also, the way it's currently wired wont work - it's connecting IN A to ground when on and when off R1 is connecting IN A to ground. You are also more likely to damage your wemos as the LED has no current limiting resistor.

Mike.
 

Latest threads

EE World Online Articles

Loading

 
Top