Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:35 25 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Solar : cheap adjustable Voltage Sense relay / co

     Page 1 of 2    
Author Message
john61ct
Newbie

Joined: 07/02/2019
Location: United States
Posts: 27
Posted: 02:07am 07 Feb 2019
Copy link to clipboard 
Print this post

Hi if this isn't the right sub, mod please move.

Looking to buy or create a device to control balance charging, open / close the connection between each cell and the charge buss at a programmed voltage.

Say the target stop voltage is 3.47Vpc, while the charge source CV/Absorb target is set at 3.5V, and resting full is defined as 3.41.

As SoC climbs, the buss Voltage does as well, sensors measure voltage on each cell, when one detects 3.49V, that cell gets disconnected off the buss after X minutes.

If the isolated cell drops below 3.41V, the relay closes and charging resumes, again until 3.49V, holds for X minutes, then opens.

These are just examples, please no debates on the "big picture" use case, specific voltage / current numbers, cell chemistry / count / capacities etc, would like to keep the focus on a generalized "How To" implement this specific idea.

To be clear, the wiring harness and buss power supply issues are "a given" for purposes of this thread, also OT here.

Assuming nothing off the shelf will do this, suggestions as to components?

which type of controller PLC vs rPi vs Arduino?

suggestions as to get started learning how to get it done would be most appreciated.

Separate (optional) challenge, may be manually controlled:

Once all the cells are resting at 3.41V or higher, there is no further current draw on the charge source for Y minutes, the buss charge source gets shut down.

 
LadyN

Guru

Joined: 26/01/2019
Location: United States
Posts: 408
Posted: 05:37pm 07 Feb 2019
Copy link to clipboard 
Print this post

I am happy to design this with you using Arduino running on the dual core ESP32 if you have the time and patience to work with me.

There are a large number of experts here who can review our work and give us valuable input but they will not start something from scratch for you.

How quickly do you need this and can you DIY with me?
 
john61ct
Newbie

Joined: 07/02/2019
Location: United States
Posts: 27
Posted: 04:05am 08 Feb 2019
Copy link to clipboard 
Print this post

Wow, that is incredibly generous!

Could we start by building a list of purchases required, including tools & supplies, to be able to control say 12 cells?

What an incredible learning opportunity, likely for many others too counting future Googlers.


 
john61ct
Newbie

Joined: 07/02/2019
Location: United States
Posts: 27
Posted: 04:25am 08 Feb 2019
Copy link to clipboard 
Print this post

Is this a good starting point?

https://learn.sparkfun.com/tutorials/esp32-thing-hookup-guide

Ships with a built in charger supporting a 1S LiPo, fed by 5V USB
 
LadyN

Guru

Joined: 26/01/2019
Location: United States
Posts: 408
Posted: 05:05am 08 Feb 2019
Copy link to clipboard 
Print this post

Sure, but I use this: https://www.aliexpress.com/item/ESP32-Development-Board-WiFi-Bluetooth-Ultra-Low-Power-Consumption-Dual-Cores-ESP-32-ESP -32S-Board/32801337284.html

Please, dont forget to answer my question: How quickly do you need this?

Next question would be what budget you are working with and what tools you have already.

Also, start writing a design document on google docs or something.

Here we are trying to control the charging of a battery: let's be very clear about that.

This design WILL NOT worry about charging the battery itself but simply follow what you wrote exactly: it will monitor voltages and control the charger accordingly like you mentioned in the op.

We are not designing a battery charger or a BMS

I just want to ensure we are on the same page
Edited by LadyN 2019-02-09
 
john61ct
Newbie

Joined: 07/02/2019
Location: United States
Posts: 27
Posted: 12:21pm 08 Feb 2019
Copy link to clipboard 
Print this post

I have no schedule other than excitement, and can spend a few hundred this month, maybe $200 per month after.

I need to buy tools, have a couple screwdrivers is all.

The Ali board will take too long, Chinese New Year n all, and I like as much local NES community support as possible.

Not sure what a "design doc" would entail, maybe link to a template or example?

Yes this device is specifically to connect / disconnect cells to / from a low-voltage buss based on cell vs circuit voltage and hysteresis delays, basically a CV-only delta-peak style algorithm.

A separate goal to disconnect the upstream charge source, or switch its output to another pack's buss or whatever as mentioned in the op is an optional extra.

The LV / HV voltages and delay setpoints must all be user adjustable.

I assume Arduino voltage sensors are straightforward, but am curious about keeping the per-cell relay / contacts affordable. I'm thinking designing for 20-30Ah LFP cells, a gentle ~.5C charge current for longevity, so 10-15A per cell?

I remain open to suggestions about design changes if needed or additional functionality, but agree about scope creep. So if you want to just keep goals as is, we can also build a wishlist for a later version 0.2, e.g. temperature limits, protection if ambient temps are freezing, or against a bad cell overheating for example. . .
Edited by john61ct 2019-02-09
 
nickskethisniks
Guru

Joined: 17/10/2017
Location: Belgium
Posts: 458
Posted: 01:16pm 08 Feb 2019
Copy link to clipboard 
Print this post

Are the cells on the same ground / potential or are they all connected in series?Edited by nickskethisniks 2019-02-09
 
LadyN

Guru

Joined: 26/01/2019
Location: United States
Posts: 408
Posted: 06:26pm 08 Feb 2019
Copy link to clipboard 
Print this post

Yes, just like nickskethisniks asked for, next we need to see your proposed schematics so we can figure out:

1. What parts we need
2. What the specifications of those parts COULD be (we won't know for sure until we have first simulated the circuit and later, actually made it with our own hands)

The traditional way of designing schematics used to be to use a CAD suite like Eagle, Protel, Altium or the like of which there are many.

However, the new way is to do all of it in code: https://cdelker.bitbucket.io/SchemDraw/SchemDraw.html

So please, draw a rough digram using SchemDraw. If that's too much to being with, nothing to worry about: draw it clearly on paper and we will work through it.

Next, we will simulate the circuit to ensure it works the way we expect it to, before we build it with our own hands.

I am getting excited about this project: you realize this will be a completely wireless solution to control battery charging for less than $10 right? (you could have halved the price by waiting for parts from Ali but hey!)
 
john61ct
Newbie

Joined: 07/02/2019
Location: United States
Posts: 27
Posted: 11:27pm 08 Feb 2019
Copy link to clipboard 
Print this post

  nickskethisniks said   Are the cells on the same ground / potential or are they all connected in series?

I think usually neither?

Certainly no Earth Ground, nor chassis / frame connections.

A Common Reference maybe, but only due to the fact that while charging they all share the same Negative Return buss, as well as the shared positive charge circuit.

I suppose in a sense they are all wired in Parallel, to the extent / while each cell's contactor is closed connecting it to the + / - busses.

But, when a given cell's contactor opens, that cell is 100% isolated, you could say "at rest". Does that make sense?

And I suppose it should be the positive connection that the contactor controls?

The ultimate goal will be to ensure as close as possible balance of resting voltage (as a proxy for SoC) between all the cells on that charge buss, without using measurement of trailing current, egg-timing the CV/Absorb stage, etc.

When the pack is ready to be put back in service, its cells will be returned to whatever xPyS full-bank topology delivers the voltage and Ah capacity required by the intended use case at the time. But that stage's configuration / wiring, details on the use case(s) is off-topic here; I think getting into that would divert the focus of the thread.
 
john61ct
Newbie

Joined: 07/02/2019
Location: United States
Posts: 27
Posted: 11:55pm 08 Feb 2019
Copy link to clipboard 
Print this post

  LadyN said  we need to see your proposed schematics
Not sure what that means? I'm pretty much a noob when it comes to component level & circuit board stuff, only purchased off the shelf gear so far, except I have been crimping ring terminators on wires.

> https://cdelker.bitbucket.io/SchemDraw/SchemDraw.html

I don't have any idea what nearly anything on that page means.

> simulate the circuit to ensure it works the way we expect it to

Not sure how that would work either, do you mean like an animation showing how the current flows around the wires when the relays are turning on and off as voltages are changing?

I am on an Android phone, so could certainly take a photo of a hand drawing, but I do not know what I would even draw at this point, that is not clearly (I hope) outlined in my text so far.

> I am getting excited about this project: you realize this will be a completely wireless solution to control battery charging for less than $10 right?

Hmm, color me skeptical, but I would indeed be ecstatic if that proved true, I was hoping in that range as a **per-cell** cost.

HVD / LVD cutoffs that I've found OTS are far too expensive to use one per cell, only at the pack / whole-bank level, and at those very high current levels they still get very expensive.

And in the end I will want cases, coating at least if not potting etc to withstand mobile usage, exposure to sea spray, desert air-borne dust etc.

I guess I need to also buy some cheap (smaller or second-hand) cells for experimenting, rather than risk abusing expensive new ones.

I'll start a separate thread for that though, the US market seems to have very thin distribution of LFP batteries, a meaty topic of its own.
 
LadyN

Guru

Joined: 26/01/2019
Location: United States
Posts: 408
Posted: 01:03am 09 Feb 2019
Copy link to clipboard 
Print this post

I am REALLY REALLY interested in LTO batteries: do you know of any good and affordabe sources for the same? (I only see ~$47/cell+ shipped JAN 2019)

What attracts you to LFP over LTO?

Back to the topic on hand:

We really need a schematic. Please draw one by hand and I will upload a SchemDraw once I have time next week.

So one of the components you will need is a unidirectional switch.

A regular bidirectional switch is a relay: and it works excellent when it connects power to a load.

if you are careful in this design, we can just use relays and be done with it.

However:

0. You need it to be compact and relays get extremely expensive as you make them go more compact
1. I would love to learn about N-Channel MOSFETS :D
2. It won't be cool to use simpler relays when we can complicate the design by using N-Channel MOSFETS
3. We both get to learn about N-Channel MOSFETS :D
4. here you are connecting one power source to another and so power will (try) flow from higher to lower voltage and we want to stop that from happenning

You don't want to have power flow out from the batteries back into the charger, so we build this unidirectional switch using two back to back N-Channel MOSFETS.

How does HY4008 look to you?

Are you able to source HY4008 locally? If not, order a few just so that they arrive in time for you/us to play with. We can locally source the MOSFET drivers.
 
john61ct
Newbie

Joined: 07/02/2019
Location: United States
Posts: 27
Posted: 04:15am 09 Feb 2019
Copy link to clipboard 
Print this post

LFP is a known quantity to me, care reports from hundreds of users in production, many known to me personally in daily cycling use with zero loss of capacity for 5-7 years. I've barely heard of LTO, and can't really afford to be a pioneer when it comes to the large size packs I'll be managing.

Again I do not know from schematics, but I'll get a rough sketch uploaded soon and any further questions as to what my thoughts are would be welcome, although I suspect I'm likely to following more than leading.

I've been using "contactor" but in googling I see that at such low voltages - 3-4V - the term relay is a better fit. Not sure how "switch" relates, I just know the hand operated on/off type.

No idea about uni- vs bi- directional, tried googling and infer it's about swapping polarity? No idea how that would relate either.

> 0. You need it to be compact and relays get extremely expensive as you make them go more compact

I do not really need that compact, if that raises price too much, inches rather than mm is OK.

> 2. It won't be cool to use simpler relays when we can complicate the design by using N-Channel MOSFETS

No idea what MOSFETS do, much less N-Channel.

Reliability, robust are important to me, KISS a value but redundancy more so. Failure mode open for example. . .

> 4. here you are connecting one power source to another and so power will (try) flow from higher to lower voltage and we want to stop that from happening

Hmm, ?? Here the cells are a load only, only the charger / PSU is a source AFAICT.

True resting V of the cells(hours isolated, once top SoC surface charge is dispersed) is maybe 3.3V, likely a bit lower.

Charge source CV is set to 3.5V, but our charge regulators disconnect before the cell gets there.

So AFAICT we are just taking advantage of the natural flow from higher V to lower, not fighting it. When circuit / cell 3.49 is reached, isolate, if the cell then drops below 3.41V, connect, really that (plus delays to prevent relay chattering) is all that's involved.

> You don't want to have power flow out from the batteries back into the charger

I cannot see how that could happen, the charging voltage will always be higher than the cells' voltage. The "extra challenge" of switching (off) the charger / PSU once no relay has closed for X minutes can be ignored for now, just power down our regulator instead, normally open relays then keep all cells in the pack fully isolated without any parasitic draw.

> How does HY4008 look to you?

I have no idea what it is or what it does, even after trying to decipher the spec sheet don't know if we need something like that or not.

> Are you able to source HY4008 locally?

I only see Chinese sellers, and of course it's New Years there.

I'm willing to start ordering stuff, but would prefer us building up a solid understanding of the design first, and at the same time, a big long list of what's needed, trying to ensure not wasting money on stuff we don't need.

Will I need a soldering iron? I imagine at least a cheap DMM?
 
john61ct
Newbie

Joined: 07/02/2019
Location: United States
Posts: 27
Posted: 04:41am 09 Feb 2019
Copy link to clipboard 
Print this post

Probably not a schematic, but shows the wiring layout well enough?


 
john61ct
Newbie

Joined: 07/02/2019
Location: United States
Posts: 27
Posted: 05:47am 09 Feb 2019
Copy link to clipboard 
Print this post

Description of possible states

"Relay open" means cell isolated, relay closed means cell connected to charge buss.

Voltage sensed on both cell side and buss. No voltage or delay numbers are hard-coded, profile customizable by user.

0. If no power to regulator or regulator fails: relay opens, aka relay is NO, normally open.

Below states, regulator is powered and functioning

1. Relay open or closed, if cell voltage not between 2.95 and 3.48V, OR charge buss / circuit voltage not between 2.95 and 3.55V: relay opens (remains open).

2. Relay open, charge buss voltage between 2.95 and 3.55V, and cell voltage between 2.95 and 3.49: relay closes for a minimum of 3min.

3. Relay closed, remains closed as long as circuit voltage is between 2.95 and 3.48V.

4. Relay closed, opens isolating cell for a minimum of 3min if circuit voltage reaches 3.49V.

5. Relay open, if cell voltage drops to 3.40, then relay closes and charging resumes for a minimum of 3min

Repeat 3-5 loop, until cell remains at rest at or above 3.41V
 
john61ct
Newbie

Joined: 07/02/2019
Location: United States
Posts: 27
Posted: 07:33pm 09 Feb 2019
Copy link to clipboard 
Print this post

Came across this

https://hackaday.com/2016/01/08/super-cheap-lifepo4-battery-charger/

seems like may be relevant?

"almost like a Zener diode except for that the voltage rating is programmable"

The data sheet has example circuits starting pg 27 some of which seem relevant?

http://www.ti.com/product/TL431

Also
https://electronicsforu.com/electronics-projects/hardware-diy/smart-battery-protector-shunt-regulator

https://endless-sphere.com/forums/viewtopic.php?p=99395#p99395

https://www.reddit.com/r/AskElectronics/comments/4ny5y4/tl431_high_current_shunt/

http://www.ti.com/vrefebook

Please ignore if I'm way off base, this stuff is way over my head
Edited by john61ct 2019-02-11
 
LadyN

Guru

Joined: 26/01/2019
Location: United States
Posts: 408
Posted: 06:53pm 11 Feb 2019
Copy link to clipboard 
Print this post

Nothing is over your head - if I can do it, ANYONE can!

It's all about how much time you are willing to put in and learn and experiment.

So your find about the TL431 is very interesting! I think it can be used for your project and make your project super simple.

At this point, I would say you have a decision to make:

1. Should you and I spend some time to learn about the TL431? I don't have a TL431 at hand yet and once I order it from Ali, could take a few weeks. I do think learning about it would be useful for us both and simplify the project
2. Continue with designing a ESP32 based controller. This is an overly complicated design compared to what you need but has a coolness factor and extremely extensible

Think about it and let me know what you think

The schematic you drew is good work in the positive direction - now we need to add:

i. a blackbox or two that controls the relays. So the relays have atleast 3 inputs: the ground, the main bus voltage and the coil activation signal. you want to draw some blackboxes that manage the coil activation signal. Mention the threshold voltages on those boxes
ii. what happens if the blackbox fails to do what it should do? could that damage the batteries? think of a way to handle that situation and update the schematic
 
john61ct
Newbie

Joined: 07/02/2019
Location: United States
Posts: 27
Posted: 10:36pm 12 Feb 2019
Copy link to clipboard 
Print this post

I literally stumbled over that chip randomly googling around! I have nothing invested in following one path over another

So my answer is Yes, no either / or, just yes

the guiding factor should be how to accomplish the objectives I've laid out, although learning for its own sake is always good too, need limiting scope to work toward specific goals.

So Yes to learning / playing, as long as it is in line with the goals and doesn't cost too much of the budget

Can you explain why the ESP32 would be "overly complicated"? Do you mean compared to another Arduino platform? or just compared to only cell-level controls?

I always thought a centralized top-down controller would be needed, whether rPi, Arduino, PLC or whatever, only sensors and relay at the cell-level.

Remember the setpoints, both voltage targets & delay timers, need to be user-adjustable from one session to the next, I can only see that being relatively easy if centralized.

> i. a blackbox or two that controls the relays. So the relays have at least 3 inputs: the ground, the main bus voltage and the coil activation signal. you want to draw some blackboxes that manage the coil activation signal. Mention the threshold voltages on those boxes

I thought the central controller (Arduino?) sends out the signals to open / close the relays based on the voltage sensing?

Sorry I just do not know what missing or added functionality requires these "black boxes".

And wouldn't the "threshold voltage" be determined by the cell-level relays? So finding / choosing those would be an immediate priority I would think, and perhaps a pretty big challenge.

> ii. what happens if the blackbox fails to do what it should do? could that damage the batteries? think of a way to handle that situation and update the schematic

I mentioned "normally open" above, which means cell are fully isolated at rest. Not sure if that also means failure mode is open, I've heard of contactors getting "welded" closed? Correct me if I'm wrong, but I'd think it's a per-cell cost factor, the rated "under load" ampacity and cycle lifetime of the relay, cost / benefit as opposed to a (hopefully rare) cell replacement?

Assuming small cell sizes like 20-30Ah and gentle C rate like .5C, we'd need contactors designed to open / close with say 10-20A currents per cell.

I think that type of relay failure event would be detected as over-voltage at the cell?

Handling it could be addressed in the "optional or Level 2 stage" design, when the logic for shutting down the upstream whole-bank charge source is addressed.

Now that I think of it, current control could be a major issue, and not just the limitation of the relays, but for longevity, not stressing cells like EV service levels.

The upstream power supply can be "offering" a certain overall current level, say 200A for 16 cells. But as each cell hits the target relay-open voltage,

fewer cells being online means each can accept a higher current rate, with a third open, C rate will increase by 50%, under half left online we'd be getting over 1C current rates!

Have to think about that. . .

 
Solar Mike
Guru

Joined: 08/02/2015
Location: New Zealand
Posts: 1138
Posted: 01:55am 13 Feb 2019
Copy link to clipboard 
Print this post

  john61ct said   Assuming small cell sizes like 20-30Ah and gentle C rate like .5C, we'd need contactors designed to open / close with say 10-20A currents per cell.....


The upstream power supply can be "offering" a certain overall current level, say 200A for 16 cells. But as each cell hits the target relay-open voltage,

fewer cells being online means each can accept a higher current rate, with a third open, C rate will increase by 50%, under half left online we'd be getting over 1C current rates!

Have to think about that. . .



Hi, I will make a couple of design comments here to guide you a little, if you are adding Lifepo4 batteries to be charged in an ad-hoc manner across the common charge bus and they have dis-similar states of charge, then the flattest battery will attempt to consume ALL the current you can throw at it.
So each battery must have its own current limiter to meet your spec, 0.5C is quite high, unless there is a very good reason to charge at that level I would reduce this to 0.2C to prevent undue heating of the cell.

So each "black box" circuit would contain a current limiter, and output a cell voltage for measurement by a master CPU, that in turn would scan all batteries as they were connected to your charge bus and instruct the "Black Box" to isolate its battery when state of charge spec set points reached.

As individual charge currents are not too high you could get away with using a heat-sinked current limiting power mosfet or transistor operating in linear mode, this will simplify your design a little.

Cheers
Mike
 
LadyN

Guru

Joined: 26/01/2019
Location: United States
Posts: 408
Posted: 04:47am 13 Feb 2019
Copy link to clipboard 
Print this post

  Solar Mike said  
As individual charge currents are not too high you could get away with using a heat-sinked current limiting power mosfet or transistor operating in linear mode, this will simplify your design a little.


Exactly Mike. My current concerns with the project is the following:

1. We are both inexperienced with MOSFETs. I understand operating MOSFETs in the linear region but the Chinese HY4008 are really not meant to be operated in the linear region from what I can see. Neither are any of the power FETs that are designed to be operated in the saturated/active region. I see both of us blowing a few power FETs, but I don't know what to start with. I am conflicted between IRF510 and IRF640 because they are built better than HY4008. I think

2. I can envision a very simple design with TL431 and comparators. No uC needed
3. However, ESP32 is really cool and since the OP does not have practical electronics experience, debugging code could be easier than debugging analog electronics

I am giving this a few thoughts between classes and look forward to all your opinion on this.

My next step would be to design a higher level diagram (HLD) with the OP. He knows what needs to be done next and I will help him along the way.
 
Solar Mike
Guru

Joined: 08/02/2015
Location: New Zealand
Posts: 1138
Posted: 10:18am 13 Feb 2019
Copy link to clipboard 
Print this post

Look at the data sheet specs for the Max Safe Operating Area graph, there will be a DC load line, if you limit the voltage across the device to a few volts then currents can be very high, just make sure the voltages and current remain below the line, see example below for an IRPF4468, that I use in my inverters.




Cheers
Mike
 
     Page 1 of 2    
Print this page
© JAQ Software 2024