

MCB19 panel
Modulo de carregamento das baterias auxiliares
- Size
- 256.5 × 172.9 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 411
- Nets
- 68
- Pads
- 1,194
- Tracks, vias
- 3,924, 1,132
- Pours
- 21
- Routed
- Yes
- KiCad
- KiCad 5 (file 20171130)
- Created
- 2 Aug 2019
- Updated
- 16 May 2025
Overview
MCB19 panel 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 256.5 × 172.9 mm with 411 parts on 68 nets, routed with 3,924 tracks and 1,132 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 150 capacitors, 93 resistors, 42 diodes, 24 ICs and 24 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
411| Qty | Value | Footprint | References |
|---|---|---|---|
| 54 | 100nF | Capacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolder | C201, C201, C201, C202, C202, C202, C205, C205, C205, C302, C302, C302, C303, C303, C303, C401 +38 |
| 30 | 100n | Capacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolder | C615, C615, C615, C616, C616, C616, C619, C619, C619, C620, C620, C620, C622, C622, C622, C623 +14 |
| 18 | 1uF | Capacitor_Tantalum_SMD:CP_EIA-6032-20_AVX-F_Pad2.25x2.35mm_HandSolder | C301, C301, C301, C304, C304, C304, C501, C501, C501, C504, C504, C504, C604, C604, C604, C628 +2 |
| 18 | LL4148 | Diode_SMD:D_MiniMELF_Handsoldering | D301, D301, D301, D401, D401, D401, D501, D501, D501, D601, D601, D601, D602, D602, D602, D603 +2 |
| 15 | 10k | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R203, R203, R203, R401, R401, R401, R410, R410, R410, R604, R604, R604, R605, R605, R605 |
| 12 | 12V | Diode_SMD:D_MiniMELF_Handsoldering | DZ601, DZ601, DZ601, DZ602, DZ602, DZ602, DZ603, DZ603, DZ603, DZ604, DZ604, DZ604 |
| 12 | 1k | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R201, R201, R201, R402, R402, R402, R403, R403, R403, R611, R611, R611 |
| 12 | 22pF | Capacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolder | C203, C203, C203, C204, C204, C204, C403, C403, C403, C404, C404, C404 |
| 12 | 330 | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R404, R404, R404, R406, R406, R406, R616, R616, R616, R618, R618, R618 |
| 12 | 4.7u | Capacitor_SMD:C_1206_3216Metric_Pad1.42x1.75mm_HandSolder | C613, C613, C613, C614, C614, C614, C617, C617, C617, C618, C618, C618 |
| 12 | 47uF | Capacitor_THT:CP_Radial_D12.5mm_P5.00mm | C603, C603, C603, C608, C608, C608, C609, C609, C609, C610, C610, C610 |
| 12 | LED_RED | LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder | D402, D402, D402, D403, D403, D403, D607, D607, D607, D608, D608, D608 |
| 9 | 680 | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R407, R407, R407, R408, R408, R408, R409, R409, R409 |
| 9 | ES2A | Diode_SMD:D_MiniMELF_Handsoldering | D604, D604, D604, D605, D605, D605, D606, D606, D606 |
| 6 | 10R | Resistor_SMD:R_2512_6332Metric | R607, R607, R607, R615, R615, R615 |
| 6 | 10R | Resistor_SMD:R_2512_6332Metric_Pad1.52x3.35mm_HandSolder | R608, R608, R608, R617, R617, R617 |
| 6 | 15k | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R609, R609, R609, R613, R613, R613 |
| 6 | 16MHz | Crystal:Crystal_HC49-U_Vertical | Y201, Y201, Y201, Y401, Y401, Y401 |
| 6 | 1k2 | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R610, R610, R610, R614, R614, R614 |
| 6 | 4700uF | Capacitor_THT:CP_Radial_D12.5mm_P5.00mm | C602, C602, C602, C621, C621, C621 |
| 6 | 47nF | Capacitor_SMD:C_1210_3225Metric_Pad1.42x2.65mm_HandSolder | C606, C606, C606, C607, C607, C607 |
| 6 | 4R7 | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R602, R602, R602, R603, R603, R603 |
| 6 | IRFP260N | Package_TO_SOT_THT:TO-247-3_Horizontal_TabUp | Q601, Q601, Q601, Q602, Q602, Q602 |
| 6 | RJ45 | KicadZeniteSolarLibrary18:RJ45_YH59_01 | J601, J601, J601, J602, J602, J602 |
| 3 | +BAT_IN | MountingHole:MountingHole_5.3mm_M5_Pad_Via | J611, J611, J611 |
| 3 | +BAT_OUT | MountingHole:MountingHole_5.3mm_M5_Pad_Via | J613, J613, J613 |
| 3 | -BAT_IN | MountingHole:MountingHole_5.3mm_M5_Pad_Via | J612, J612, J612 |
| 3 | -BAT_OUT | MountingHole:MountingHole_5.3mm_M5_Pad_Via | J614, J614, J614 |
| 3 | 1,5mR | KicadZeniteSolarLibrary18:R_2512_6432Metric_Reversed | R606, R606, R606 |
| 3 | 100 | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R411, R411, R411 |
| 3 | 10A | Fuse:Fuseholder_Cylinder-5x20mm_Stelvio-Kontek_PTF78_Horizontal_Open | F601, F601, F601 |
| 3 | 15A | Fuse:Fuseholder_Cylinder-5x20mm_Stelvio-Kontek_PTF78_Horizontal_Open | F602, F602, F602 |
| 3 | 300uH | KicadZeniteSolarLibrary18:Inductor_Nocoupled | L601, L601, L601 |
| 3 | 4k7 | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R202, R202, R202 |
| 3 | 500mA | Fuse:Fuse_1206_3216Metric_Pad1.42x1.75mm_HandSolder | F501, F501, F501 |
| 3 | 50k | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R601, R601, R601 |
| 3 | 90R | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R612, R612, R612 |
| 3 | ATMEGA328P-PU | Package_DIP:DIP-28_W7.62mm_Socket | U401, U401, U401 |
| 3 | BC847 | Package_TO_SOT_SMD:SOT-23 | Q604, Q604, Q604 |
| 3 | BC857 | Package_TO_SOT_SMD:SOT-23 | Q603, Q603, Q603 |
| 3 | CAN_H | TestPoint:TestPoint_Pad_2.0x2.0mm | TP207, TP207, TP207 |
| 3 | CAN_L | TestPoint:TestPoint_Pad_2.0x2.0mm | TP208, TP208, TP208 |
| 3 | DISABLE | Connector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_Vertical | J402, J402, J402 |
| 3 | ENABLE | TestPoint:TestPoint_Pad_2.0x2.0mm | TP402, TP402, TP402 |
| 3 | G5LE-1 | KicadZeniteSolarLibrary18:Relay_SPDT_SANYOU_SRD_Series_Form_C | K601, K601, K601 |
| 3 | INA240A4D | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U602, U602, U602 |
| 3 | INT | TestPoint:TestPoint_Pad_2.0x2.0mm | TP209, TP209, TP209 |
| 3 | LM324 | Package_SO:SOIC-14_3.9x8.7mm_P1.27mm | U603, U603, U603 |
| 3 | LM5104MNOPB | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U601, U601, U601 |
| 3 | LM7805 | KicadZeniteSolarLibrary18:TO-220-3_Horizontal_TabDown_SMD | U301, U301, U301 |
| 3 | LM7812 | KicadZeniteSolarLibrary18:TO-220-3_Horizontal_TabDown_SMD | U501, U501, U501 |
| 3 | MCP2515-xSO | Package_SO:SOIC-18W_7.5x11.6mm_P1.27mm | U202, U202, U202 |
| 3 | MCP2551-I/SN | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U201, U201, U201 |
| 3 | PWM | TestPoint:TestPoint_Pad_2.0x2.0mm | TP401, TP401, TP401 |
| 3 | RXCAN | TestPoint:TestPoint_Pad_2.0x2.0mm | TP204, TP204, TP204 |
| 3 | SC | TestPoint:TestPoint_Pad_2.0x2.0mm | TP205, TP205, TP205 |
| 3 | SCK | TestPoint:TestPoint_Pad_2.0x2.0mm | TP206, TP206, TP206 |
| 3 | SI | TestPoint:TestPoint_Pad_2.0x2.0mm | TP201, TP201, TP201 |
| 3 | SO | TestPoint:TestPoint_Pad_2.0x2.0mm | TP202, TP202, TP202 |
| 3 | TXCAN | TestPoint:TestPoint_Pad_2.0x2.0mm | TP203, TP203, TP203 |
| 3 | USART | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J401, J401, J401 |
| 3 | pesd1can | Package_TO_SOT_SMD:SOT-23_Handsoldering | D201, D201, D201 |
More from ZeniteSolar/MCB19
1- 2 layers172.9 × 81.5 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 panel PCB?
It measures 256.5 × 172.9 mm and has 2 copper layers, 1.6 mm thick.
What parts does the MCB19 panel use?
411 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 panel KiCad files?
From the ZeniteSolar/MCB19 repository on GitHub, at the commit this page was made from: the board is hardware/MCB19_panel.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Can I use the MCB19 panel 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).

