Giter Site home page Giter Site logo

xtra1210's Introduction

xtra1210

STM32F030C8T6 Firmware Created for Epever XTRA1210N MPPT solar charge controller.

This is firmware for MCU STM32F030 (heart of EPEVER solar charge controllers).

WARNING: Author does not respond for possibly destroying Your device! What works:

  • charging 24 volts battery using MPPT algorithm
  • MPPS algorithm (search over the whole panel load curve for maximum power) once per 5 minutes

What does not work

  • load switch
  • statistics: consumed energy per day
  • store statistics to the flash

What is slightly implemented:

  • cs1621 chip driver for showing segments on XDS1 display
  • MODBUS RTU protocol for showing realtime data
  • ADC 10 channels in DMA mode
  • PWM complementary signal for pseudo-synchronous DC/DC step down converter working on 40kHz

STM32F030C8T6 pinout description: GPIO in:

  • PB14 XDS1 button 1
  • PB15 XDS1 button 2
  • PB10 output Vpv/Vbat comparator, set if Vbat > Vpv

GPIO out:

ADC in:

  • PA0 Vpv, I guess Vpv = x[0]*4962/1000 [100mV];
  • PA1 Vbat, I guess Vbat = x[1]*1967/1000 [100mV];
  • PA4 V?
  • PA2 thermal sensor
  • PA3 load current obtained using LMV932
  • PA5 battery current obtained using LMV932 (can be negative), I guess Ibat = (x[5]-0x170)*40/100
  • PA7 177mV reference (3v3-60k-PA7-3k9-GND)
  • PB0 another voltage reference

UART:

  • PA10 Rx
  • PA9 Tx
  • PB9 Rx/Tx switch (low means receive)

SPI (XDS1 driving):

  • PB3 nWR (clock)
  • PA15 nCR (NSS) must be set by software in this mode
  • PB5 data

headers on board:

  • PA12 - pin 2 PS1 heade
  • PB8 - pin1 P5 header

HOWTO build this source:

  • download STM32CubeMX
  • load xtra1210n.ioc from cloned path by git
  • select Makefile in ProjectManager->Project->toolchain inside STM32CubeMX
  • push GENERATE CODE button
  • all necessary files should be shown in your project folder obtained by git
  • build using arm-none-eabi-gcc and make
  • use J6 pin to connect ST-LINK V2, pins ordered from rectangled pin1 3v3, SWDIO, GND, SWCLK, RST (not needed)
  • use stm32-for-vscode plugin, Cortex-debug plugin and openocd to flash compiled code to the solar regulator

xtra1210's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.