

MCB19
Modulo de carregamento das baterias auxiliares
- Size
- 172.9 × 81.5 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 137
- Nets
- 68
- Pads
- 398
- Tracks, vias
- 1,308, 44
- Pours
- 7
- Routed
- Yes
- KiCad
- KiCad 5 (file 20171130)
- Created
- 2 Aug 2019
- Updated
- 16 May 2025
Overview
MCB19 is an open-source printed circuit board by ZeniteSolar, from the ZeniteSolar/MCB19 repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 172.9 × 81.5 mm with 137 parts on 68 nets, routed with 1,308 tracks and 44 vias.
It is built around the ATMEGA328P-PU, MCP2551-I/SN and INA240A4D, with the LM324, LM7805 and LM7812 among its other parts. Its parts include 50 capacitors, 31 resistors, 14 diodes, 8 ICs and 8 connectors. It belongs with the power and interfaces and adapters boards and the AVR (ATmega, ATtiny) boards of this library.
Main components
12ATMEGA328P-PU
DIP-28-300mil-40℃~+85℃ 1.8V~5.5V 10bit 1KB 20MHz 23 2KB 32KB 8 Bit AVR Built-in FLASH DIP-28-300mil Microcontrollers (MCU/MPU/SOC) ROHSMicrochip TechnologyMicrocontrollers (MCU/MPU/SOC)MCP2551-I/SN
SOIC-8-40℃~+85℃ 1Mbps 365uA 4.5V~5.5V 75mA CAN Transceiver SOIC-8 CAN Transceivers ROHSMicrochip TechnologyCAN TransceiversINA240A4D
SOIC-8-40℃~+125℃ -4V~80V 1 1.8mA 132dB 2.7V~5.5V 200V/V 250nV/℃ 2V/us 400kHz 40nV/√Hz@1kHz 5uV 90uA Bidirectional detection、Zero drift / auto-zero、Programmable output reference level、Analog output interface ±80V SOIC-8 Current Sense Amplifiers ROHSTexas InstrumentsCurrent Sense AmplifiersLM324
SOP-14-1.5V~10V 0℃~+70℃ 24V 250nA 3V~20V 4 40mA 50nA 700uA 7mV 80dB SOP-14 Operational Amplifier ROHSHXY MOSFETOperational AmplifierLM7805
TO-2630℃~+125℃ 1 1A 20V 2V 42uV 5V 62dB@(120Hz) 8mA Fixed Over Temperature Protection、Short Circuit Protection Positive TO-263 Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSYONGYUTAIVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsLM7812
TO-263TO-263 Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSYONGYUTAIUncategorisedLL4148
LL-341 Independent 1V@10mA 200mA 4A 4ns 500mW 5uA@75V 75V LL-34 Switching Diodes ROHSMDDSwitching DiodesES2A
SMA(DO-214AC)Fast Recovery / High Efficiency DiodeshongjiachengIRFP260N
TO-247MOSFETsMinosRJ45
TH-12PTH-12P SMT ROHSJLCPCB AssemblyUncategorisedBC847
SOT-231 NPN 100MHz 100mA 100nA 110 200mW 45V 500mV 6V NPN SOT-23 Bipolar (BJT) ROHSShikuesBipolar (BJT)BC857
SOT-231 PNP 100MHz 100mA 15nA 200mW 45V 5V 650mV 800 PNP SOT-23 Bipolar (BJT) ROHSSTMicroelectronicsBipolar (BJT)
README
README.mdMCB19
Módulo Carregamento das Baterias 2019
Embarcação Guarapuvu II
Equipe Zênite Solar
LICENSES
- All firmware (unless otherwise noted), is licensed under GPL-3.0 or any later version
- All hardware is licensed under CERN-OHL-S v2 or any later version
Sobre
Este módulo é responsável por carregar e gerenciar a carga da bateria auxiliar (rádio e bombas de porão) e da bateria extra (direção elétrica) a partir da energia da bateria principal.


Requisitos
-
Carregar a bateria
-
Carregar por CC e CV
- Controlar a tensao com controlador PI em cascata com controlador PI de corrente.
-
Proteções
- Sobrecorrente na entrada e saída
- Curto-circuito na entrada e saída
- Sobre/sub-tensão na entrada e saída
- Não permitir corrente da saída para a entrada: Um relé em série com a carga é usado para permitir a leitura da tensão na saída antes de entregar corrente para ela, seguindo as seguintes regras:
- Somente ligar o relé da saída quando o sistema estiver em regime (sem oscilações na entrada ou na saída).
- Somente ligar o relé da saída quando a tensão na bateria estiver em niveis dentro do esperado.
-
-
Monitoramento do estado das baterias
- Enviar pela rede CAN:
- Corrente de carga
- Tensão da bateria
- Tensão da bateria principal
- Enviar pela rede CAN:
Abordagens
- Especificação do conversor
- Tensão de entrada: 30-50V
- Corrente de saida: 8A
- Tensão de saida: 10-15V
Como no sistema, a tensão da bateria principal (entrada) será sempre maior que a tensão a tenão da bateria extra/auxiliar (saída), foi escolhido projetar um conversor estatico CC-CC Buck, com chaveamento síncrono (dois mosfets) para maior obter eficiencia.
Projeto do Buck
- Para as condições especificadas anteriormente foram escolhidos:
- Capacitor de saida: 200uF
- Indutor de saida 300uH
- Controlador
- Por sua simplicidade de implementação e por permitir ajustes empíricos, controladores PI foram escolhidos para controlar tanto a tensão de saída quanto a corrente de saída.
- Simulações
- Para a simulação foi usado o programa Psim pois ele oferece a simulação de bloco C onde foi possivel simular de uma forma simplificada o comportamento do atmega328p, alem de ter ferramentas para controle.
![]() | ![]() |
|---|
- Hardware
- Para o design da Placa de circuito impresso (PCB) foi utilizado o software KiCad por ser uma ferramenta OpenSource. A PCB foi fabricada usando transferencia termica.
É importante a utilização de snubber para amortecer os picos de tensão nas chaves
- Firmware
- A cada interrupção do ADC é chamada a função de controle. Ao finalizar a maquina de estados é executada onde as mensagens CAN são enviadas e recebidas.
src/conf.h
Configurações gerais do sistema
//#Definições do conversor
#define VO_SETPOINT 13.2
#define IO_MAX 8
#define VI_MIN 21src/adc.c
No arquivo adc.c são lidos os valores dos ADCs e convertidos a valores "humanos", tambem é chamada a função de controle
- Coeficientes de linearização
- Com estes coeficientes é convertido o valor lido pelo ADC em uma unidade de medida
static const float vi_coeff = 0.06582490575070313f;
static const float vo_coeff = 0.06717781789490249f;
static const float io_coeff = 0.01599315004f; src/control.c
No arquivo control.c é executado o algoritmo de controle (PiVo em cascata com PiIo), para sintonizar o controlador tem que mudar as constantes Kp e Ti
/* PI CONTROL ALGORITHM - SERIES IMPLEMENTATION
** /desc Algoritimo para Controlador Proporcional Integrativo Diferencial.
** ref1:
https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/902/PI-controller-equations.pdf
** /var r é o valor desejado para a saída, o 'set-point'.
** /var y é o valor da saída.
** /ret retorna a ação de controle u.
*/
inline float piVo(float r, float y){
// PI CONFIGURATIONS:
const float Kp = 0.5; // analog series proportional gain
const float Ti = 0.1; // analog series integration period
const float Ts = PERIOD; // digital sampling period
// INTERNAL CONSTANTS COMPUTATION:
const float a0 = -Kp; // IIR coefficient for old sample
const float a1 = Kp*(1+Ts/Ti); // IIR coefficient for new sample
// CONTROLLER STATIC VARIABLES
static float e0 = 0; // old error
static float e1 = 0; // new error
static float u = 0; // control action
src/machine.c
No arquivo machine.c é executada a maquina de estados
inline void machine_run(void)
{
if(print_adc){ print_infos(); print_adc = 0;}
if(machine_clk){
machine_clk = 0;
if(error_flags.all){
print_system_flags();
print_error_flags();
print_infos();
set_state_error();
}
switch(state_machine){
case STATE_INITIALIZING:
task_initializing();
break;
case STATE_IDLE:
task_idle();
break;
case STATE_RUNNING: Parts
137| Qty | Value | Footprint | References |
|---|---|---|---|
| 18 | 100nF | Capacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolder | C201, C202, C205, C302, C303, C401, C402, C406, C407, C408, C409, C502, C503, C601, C605, C611 +2 |
| 10 | 100n | Capacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolder | C615, C616, C619, C620, C622, C623, C624, C625, C626, C627 |
| 6 | 1uF | Capacitor_Tantalum_SMD:CP_EIA-6032-20_AVX-F_Pad2.25x2.35mm_HandSolder | C301, C304, C501, C504, C604, C628 |
| 6 | LL4148 | Diode_SMD:D_MiniMELF_Handsoldering | D301, D401, D501, D601, D602, D603 |
| 5 | 10k | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R203, R401, R410, R604, R605 |
| 4 | 12V | Diode_SMD:D_MiniMELF_Handsoldering | DZ601, DZ602, DZ603, DZ604 |
| 4 | 1k | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R201, R402, R403, R611 |
| 4 | 22pF | Capacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolder | C203, C204, C403, C404 |
| 4 | 330 | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R404, R406, R616, R618 |
| 4 | 4.7u | Capacitor_SMD:C_1206_3216Metric_Pad1.42x1.75mm_HandSolder | C613, C614, C617, C618 |
| 4 | 47uF | Capacitor_THT:CP_Radial_D12.5mm_P5.00mm | C603, C608, C609, C610 |
| 4 | LED_RED | LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder | D402, D403, D607, D608 |
| 3 | 680 | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R407, R408, R409 |
| 3 | ES2A | Diode_SMD:D_MiniMELF_Handsoldering | D604, D605, D606 |
| 2 | 10R | Resistor_SMD:R_2512_6332Metric | R607, R615 |
| 2 | 10R | Resistor_SMD:R_2512_6332Metric_Pad1.52x3.35mm_HandSolder | R608, R617 |
| 2 | 15k | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R609, R613 |
| 2 | 16MHz | Crystal:Crystal_HC49-U_Vertical | Y201, Y401 |
| 2 | 1k2 | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R610, R614 |
| 2 | 4700uF | Capacitor_THT:CP_Radial_D12.5mm_P5.00mm | C602, C621 |
| 2 | 47nF | Capacitor_SMD:C_1210_3225Metric_Pad1.42x2.65mm_HandSolder | C606, C607 |
| 2 | 4R7 | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R602, R603 |
| 2 | IRFP260N | Package_TO_SOT_THT:TO-247-3_Horizontal_TabUp | Q601, Q602 |
| 2 | RJ45 | KicadZeniteSolarLibrary18:RJ45_YH59_01 | J601, J602 |
| 1 | +BAT_IN | MountingHole:MountingHole_5.3mm_M5_Pad_Via | J611 |
| 1 | +BAT_OUT | MountingHole:MountingHole_5.3mm_M5_Pad_Via | J613 |
| 1 | -BAT_IN | MountingHole:MountingHole_5.3mm_M5_Pad_Via | J612 |
| 1 | -BAT_OUT | MountingHole:MountingHole_5.3mm_M5_Pad_Via | J614 |
| 1 | 1,5mR | KicadZeniteSolarLibrary18:R_2512_6432Metric_Reversed | R606 |
| 1 | 100 | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R411 |
| 1 | 10A | Fuse:Fuseholder_Cylinder-5x20mm_Stelvio-Kontek_PTF78_Horizontal_Open | F601 |
| 1 | 15A | Fuse:Fuseholder_Cylinder-5x20mm_Stelvio-Kontek_PTF78_Horizontal_Open | F602 |
| 1 | 300uH | KicadZeniteSolarLibrary18:Inductor_Nocoupled | L601 |
| 1 | 4k7 | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R202 |
| 1 | 500mA | Fuse:Fuse_1206_3216Metric_Pad1.42x1.75mm_HandSolder | F501 |
| 1 | 50k | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R601 |
| 1 | 90R | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R612 |
| 1 | ATMEGA328P-PU | Package_DIP:DIP-28_W7.62mm_Socket | U401 |
| 1 | BC847 | Package_TO_SOT_SMD:SOT-23 | Q604 |
| 1 | BC857 | Package_TO_SOT_SMD:SOT-23 | Q603 |
| 1 | CAN_H | TestPoint:TestPoint_Pad_2.0x2.0mm | TP207 |
| 1 | CAN_L | TestPoint:TestPoint_Pad_2.0x2.0mm | TP208 |
| 1 | DISABLE | Connector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_Vertical | J402 |
| 1 | ENABLE | TestPoint:TestPoint_Pad_2.0x2.0mm | TP402 |
| 1 | G5LE-1 | KicadZeniteSolarLibrary18:Relay_SPDT_SANYOU_SRD_Series_Form_C | K601 |
| 1 | INA240A4D | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U602 |
| 1 | INT | TestPoint:TestPoint_Pad_2.0x2.0mm | TP209 |
| 1 | LM324 | Package_SO:SOIC-14_3.9x8.7mm_P1.27mm | U603 |
| 1 | LM5104MNOPB | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U601 |
| 1 | LM7805 | KicadZeniteSolarLibrary18:TO-220-3_Horizontal_TabDown_SMD | U301 |
| 1 | LM7812 | KicadZeniteSolarLibrary18:TO-220-3_Horizontal_TabDown_SMD | U501 |
| 1 | MCP2515-xSO | Package_SO:SOIC-18W_7.5x11.6mm_P1.27mm | U202 |
| 1 | MCP2551-I/SN | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U201 |
| 1 | PWM | TestPoint:TestPoint_Pad_2.0x2.0mm | TP401 |
| 1 | RXCAN | TestPoint:TestPoint_Pad_2.0x2.0mm | TP204 |
| 1 | SC | TestPoint:TestPoint_Pad_2.0x2.0mm | TP205 |
| 1 | SCK | TestPoint:TestPoint_Pad_2.0x2.0mm | TP206 |
| 1 | SI | TestPoint:TestPoint_Pad_2.0x2.0mm | TP201 |
| 1 | SO | TestPoint:TestPoint_Pad_2.0x2.0mm | TP202 |
| 1 | TXCAN | TestPoint:TestPoint_Pad_2.0x2.0mm | TP203 |
| 1 | USART | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J401 |
| 1 | pesd1can | Package_TO_SOT_SMD:SOT-23_Handsoldering | D201 |
More from ZeniteSolar/MCB19
1- 2 layers256.5 × 172.9 mm

Similar boards
- 2 layers170.2 × 137.2 mm

MCS19
ZeniteSolar/MCS19
Módulo de Carregamento do Sistema da embarcação solar Guarapuvu II (Zênite Solar)
160 parts1GPL-3.0 - 2 layers232.1 × 131.2 mm

- 2 layers63 × 108 mm

MSC25
ZeniteSolar/MSC25
Este projeto consiste em uma placa de circuito impresso (PCB) com firmware embarcado, projetada para realizar a leitura de alta precisão de um sensor de corrente de efeito Hall e transmitir os dados através do…
61 parts - 2 layers239.3 × 121.3 mm

- 2 layers

- 2 layers122.6 × 52.7 mm

- 2 layers248 × 174.4 mm

- 2 layers228 × 149.8 mm

MIC19
ZeniteSolar/MIC19
Módulo de Interface do Controle da embarcação solar Guarapuvu II (Zênite Solar)
300 partsGPL-3.0
Questions
How big is the MCB19 PCB?
It measures 172.9 × 81.5 mm and has 2 copper layers, 1.6 mm thick.
What parts does the MCB19 use?
137 parts, built around the ATMEGA328P-PU, MCP2551-I/SN, INA240A4D and LM324. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the MCB19 KiCad files?
From the ZeniteSolar/MCB19 repository on GitHub, at the commit this page was made from: the board is hardware/MCB19.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Can I use the MCB19 design in my own project?
Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

