# how to calculate hysteresis resistor value TL431

I'm creating a small ESP32 based robot controller board. Partially as a self learning experience (mech engineer, self taught on eletrical front but this is for hobby use :P) and partially because it needs to a fairly bespoke collection of motor, servo and ESC outputs.

On the power mangement front I will be using a 2S lipo battery. The intent of the circuitry below is to provide a physical method to turn power on/off (SW1), provide a low battery power cutoff circuit (using TL431 and Q1) and to provide 5v supply for the servos and the controller.

My main questions are around the low voltage cutoff circuit but i've included the rest for context and in case you fancy letting me know i've done something wrong there also!

So for the battery cutoff circuit I have done the voltage divider calculations such that at the cutoff voltage (7.4v for a 2s lipo is the lower limit of safe discharge based on my research) the reference voltage entering the TL431 is 2.5v in line with it's internal voltage reference. I've simulated this on circuit lab and it seems to work well. My issue is that in the real world there will be some hystersis issues around the 7.4v value - I have found that you can add a feedback resistor (R4) around the TL431 but I can't for the life of my find a guided explanation of how to calculate that value such that i have a lower cutoff limit of 7.3 and a higher cutoff limit of 7.4 creating an effective band to prevent the circuit from flipflopping due to some noise or minor fluctuation in battery voltage.

edit 1 - first attempt at re-drawing the schematic for the TL431 to make it easier to read. bit confused by V+ and Vout in diagram provided in comments. In my head the Vout side should come from the battery so that the voltage divider always provides a reference to the TL431 but Vout notation to me sounds like that should be the voltage out of the IC? Also i swapped it to a P type transistor as per diagram - think the original schematic used an N type and a pull up resistor to reduce current drain?

Edit 2 - Took advice and instead of copying the circuit i tried to re-draw my original one. added some notes to help show my understanding of what each bit is doing. I'm a bit confused how the feedback resistor R8 works and doesn't just allow reduced flow through the circuit? I guess the super high resistance value (just used what was on an example i found online - here) causes a big voltage drop.

Edit 3 - Hi all - I think i got my head round it this morning. here are the calcs i did to set the resistor values!

• Oh man - redraw that TL431 circuit to be logical and obvious. Nov 2, 2020 at 12:55
• Can you advise some pointers to consider when doing it? it's been a bit of a mashup from online sources i found for the schematic. Nov 2, 2020 at 13:06
• @DMason Normal schematic symbol for a TL431 is that of a Zener diode with REF coming out of the body on the side. You'd draw your pass transistor above the TL431 and the resistor divider next to it. Like this: static5.arrow.com/pdfs/2015/6/28/2/24/42/144/ons_/manual/… Nov 2, 2020 at 13:52
• If you take your time inputting the schematic as it is meant to function, it is easier for others (and yourself) to efficiently understand. Follow the Unimportant important link! Nov 2, 2020 at 14:20
• Hi all. I have had a go - see edit 1. first attempt at re-drawing the schematic for the TL431 to make it easier to read. bit confused by V+ and Vout in diagram provided in comments. In my head the Vout side should come from the battery so that the voltage divider always provides a reference to the TL431 but Vout notation to me sounds like that should be the voltage out of the IC? Also i swapped it to a P type transistor as per diagram - think the original schematic used an N type and a pull up resistor to reduce current drain? Nov 2, 2020 at 14:34