Maybe not cheap , but from salvage stuff , I have a board from a drill battery , and a few boards from single cell battery chargers ? LMK where to buy the thermal boards , or should i program an MCU . On the next pack I plan on it being for road so sooth roads in the summer , and ill come back and build up a more traditional system:) :-+ THANKS :D
If you use the drill battery *unchanged*, except for the connector, then you *might* be okay. Be careful though, that there isn't anything important hiding in the connector. Likewise if you disassemble it more to make it fit somewhere. Look carefully to make sure that you keep everything that was hiding in weird places. A thermal probe, for example, might not be on the board, but next to the cells. Or it might be on the board with the assumption that everything's in close enough thermal contact for that to work. If you provide a way for the cells to heat up without heating the board, then that assumption doesn't work anymore.
Programming an MCU is a quick and easy way to ensure that all the required logic is indeed present. Of course, it does not guarantee that its inputs are correct or that the outputs have the required effect, or that your logic is even correct! It's not magic.
---
One tip about measuring temperature: it can be tricky to calibrate in raw form because of the small, non-linear response that most things have, but there are specialty ADC chips just for that purpose. They handle the non-linearity and scaling for you, and give you a number with real units over SPI or I2C. Usually as a fixed-point number with a few fractional bits. Think of it like an integer representation of 1/16th degrees C or something like that, so that room temperature might be reported as ~400, which is 25*16. Read the datasheet to see what it actually does, and make sure you give it the type of probe that it's designed for. (and that the probe is designed for the temperature that you need to watch for)
---
Then you only need 1 ADC channel in the MCU to read the battery voltage. If you regulate the MCU, then that'll provide a fixed reference for the ADC to use. It then gives you a fraction of that reference as a fixed-point number with all-fractional bits. (a 10-bit ADC gives you 1/1024-ths of full-scale, for example) Then use a resistor divider from the battery to the ADC input. Do the math from there, to figure out what ADC reading corresponds to the correct cutoff voltage.
Do some smoothing in software, which effectively converts the noise in the lower bits to more resolution (more fractional bits, so now you're probably working with 1/65536-ths of full scale in a 16-bit "integer" variable) as well as removing weird spikes, then run that through some hysteresis so that the threshold to turn on is higher than the threshold to cut off. The init code then starts the reading at 0, so that it takes some time to climb up to the higher "okay" threshold. Only at that time does it turn the FET on to power itself.
For a quick-and-easy smoother:
#define SHIFT 2 //adjust this to suit
output -= (output >> SHIFT);
output += ( input >> SHIFT);
That's an arithmetically-rearranged version of an exponential average, or a 1st-order IIR lowpass. Exactly the same response as an analog R-C filter. (chain 2 together if you really need 2nd order, etc.) SHIFT determines the cutoff frequency as a fraction of the sample rate. The equation for it is weird; you can derive it if you want, or you can just give yourself a debugging output and tweak it until you like it. Also, you might be able to use the ADC's justification setting to save yourself some shifts. (left-justified is (input >> 0); right-justified for a 10-bit ADC is (input >> 6) for free) The idea here is to run the ADC as fast as it will go at its full resolution, run this code for every sample, and then the code that actually uses it just picks off what it needs when it gets around to it.
---
If you use a capacitor to limit the time that the "turn-on" button is effective for, it needs to last long enough for the above to happen, and not much longer. More math to figure that out, based on current draw, allowable voltage, and the capacitor equation. Also include a bleeder resistor across the cap so that it has the full capacity the next time it's used. (It starts at 0 voltage across the cap, and the cap charges while powering the circuit. When the cap is fully charged, the circuit is back to 0 volts, so the end point in your calculations needs to be some time before then.)