User Tools

Site Tools


oddstr13:node:atmega328:batterymonitor

WIP

FIXME

BOM

  • 1 × ATmega328P
  • 1 × 28pin IC socket
  • 1 × LM317T
  • Resistors
    • 1 × 470Ω
    • 1 × 680Ω
    • 1 × 3.3kΩ
    • 1 × 47kΩ
  • Capacitors
    • 1 × 10µF Electrolytic
    • 1 × 100µF Electrolytic
    • n × 0.1µF (104) Ceramic
  • 3 × Rectifying Diode 1N4001

Circuit

Voltage regulator

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

 Circuit diagram  Top view  Bottom view

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.

  • RFM69HW 1.8V–3.6V.
  • ATmega328P 1.8V–5.5V.
  • DS18B20 3V–5.5V.

VBATS

Programming

ICSP header
#Function AVR#AVR Name
1SCK 19PB5
2MISO 18PB4
3GND 8GND
4VSYS 7VCC
5MOSI 17PB3
6RESET 1PC6
7VBAT NC

External links

oddstr13/node/atmega328/batterymonitor.txt · Last modified: 2020/06/27 23:02 (external edit)