The voltage regulator circuit is based on the LM317, mainly because this is what I currently had handy, that would give me a comfortable margin of error. There can be up to a 40V difference between input and output voltage, which means this circuit should be able to handle a input voltage of up to 43V between GND and VBAT
The values of R1 and R2 where chosen from resistors I had available, using this LM317 Voltage Calculator. I was aiming for something around 3.3V.
R1=470Ω R2=680Ω, which gives a output voltage of about 3.06V, which is acceptable for all of the components.
VBATS
| ICSP header | |||
|---|---|---|---|
| # | Function | AVR# | AVR Name |
| 1 | SCK | 19 | PB5 |
| 2 | MISO | 18 | PB4 |
| 3 | GND | 8 | GND |
| 4 | VSYS | 7 | VCC |
| 5 | MOSI | 17 | PB3 |
| 6 | RESET | 1 | PC6 |
| 7 | VBAT | NC | |