Menu

EJA M | 2021 Hackaday Dream Team Challenge

The new EJA M v1.0 is an upgrade/replacement of my older PCB designs: Buoy A v1.0, Buoy B v1.0, and Onboard Gateway v1.0. The design includes the following features:

  • USB C Port with Electromagnetic Compatibility (EMC)
  • FTDI (FT260S-U) with an Auto Reset Circuit for the ESP32
  • ESP32
  • GPS Module
  • LoRa Transceiver
  • Real-time Clock (RTC)
  • Connector for a Servo Motor
  • 5V 2A Stepup (for the Servo Motor)
  • 3.3V Battery Charging Circuit
  • 3.3V Battery Charging Circuit
  • Connector for a 3 axis accelerometer
  • Circuit to measure the battery level
  • 3.3V 3A SEPIC Converter
  • On-OFF circuit for a Button
  • Access to unused pins in the ESP32

This repository contains the Kicad project (including Gerber files).

Planning

Main Objective: EJA M is designed to create a Minimum Viable Product for the EJA Project, it will replace the PCB designs Buoy A, Buoy B and Onboard Gateway. The goal is to maintain the features of the previous designs (some of them are redundant) while achieving the following secondary objectives:

  • Reduce the cost. The Bill of Materials of previous designs will be the reference.
  • Include battery charging. A feature only present in the previous design Onboard Gateway.
  • Reduce the size.
  • Measure the battery level.

To achieve these goals, the new design EJA M will replace the development boards that were used in the previous designs with a circuit that contains the main components (ESP32, LoRa, GPS, RTC and power Supply).

The following images present the hardware diagrams for the previous PCB designs Buoy A, Buoy B and Onboard Gateway.

Hardware Block Diagram of the PCB designs Buoy A and Buoy B.

Hardware Block Diagram of the PCB design Onboard Gateway.

Based on the previous images, the hardware diagram of the new design EJA M is proposed. The DC Motor driver (TB6612FNG) and the 4G(LTE) Module, were not included in this design because they are not being used anymore in the project. In the following diagram, the term "Module" refers to a circuit designed by me to adapt the sensor or transceiver to the PCB.

Hardware Block Diagram of the PCB design EJA M.

Hardware Design

USB C Port with Electromagnetic Compatibility EMC

Everything starts with the USB C port, we have chosen this type of USB because it's size and because of the growing trend of using this port to charge and communicate with portable devices.

The design includes Transient Voltage Suppression (TVS) diodes and Ferrite Beads to reduce the Electromagnetic Interference (EMI). These protections for the USB port will add compliance with the EMC regulations and standards from the Federal Communications Commission (FCC) and the European Union.

Schematic of EJA M: USB C and EMC protections.

FTDI FT260S

The design includes the FT260S-U, a USB TO UART/I2C FTDI that will be used to program the ESP32.

Schematic of EJA M: FTDI circuit using an FT260S-U.

Auto Reset Circuit for the ESP32

The design includes an auto reset circuit that uses RTS and DTR to reset and put in bootloader mode the ESP32. For more information about this circuit, these blogs [1] [2] can be useful.

Schematic of EJA M: Auto reset circuit for the ESP32.

ESP32

The main microcontroller in the PCB is the ESP32, the following image shows the signals dedicated to the different pins. The ESP32 is connected to the FTDI, a GPS, a LoRa transceiver, a connector for a servo motor, a real-time clock, a circuit to measure the battery level, a connector for an accelerometer, and a few headers to provide access for the unused peripherals.

Schematic of EJA M: ESP32.

GPS

The selected GPS is the ATGM332D-5N31, one the modules tested previously in our Development Board for GPS Modules. The schematic is very simple, it has a decoupling capacitors (C2), a U.FL connector for an external antenna (J4) and a Coin Cell Battery Holder (J2).

Schematic of EJA M: Circuit for the GPS ATGM332D-5N31.

LoRa

The selected LoRa transceiver is the RFM95W-915S2, the same module tested in our Development Board for LoRa. The schematic contains a U.FL connector for an external antenna (J9).

Schematic of EJA M: Circuit for the LoRa transceiver RFM95W-915S2.

Real time Clock RTC

The design includes a dedicated RTC, the DS3231M.

Schematic of EJA M: Circuit for the RTC DS3231M.

Servo Motor Connector

There is a 1x3 header connector for a Servo Motor, the 5V for the servo is provided by a 5V 2A Stepup.

Schematic of EJA M: Connector for the Servo Motor.

5V 2A Stepup

The design includes the TPS61030PWR, a boost converter with a 4A switch current, to provide the 5V for the Servo motor. The schematic contains the components for a 5V 2A output, following the design procedure that starts on the page 13 in the datasheet.

Schematic of EJA M: Circuit for a 5V 2A Stepup using the TPS61030PWR.

Accelerometer Connector

There is a connector for the ADXL343 3 axis accelerometer, a 1x9 header was used even though it only manages the signals VDD, GND, SCL and SDA, in case we want to use more connections for the accelerometer in future versions.

Schematic of EJA M: Connector for the Accelerometer ADXL343.

Battery Charging Circuit

To charge the 3.3V battery the design includes the TP4056, a 1A Standalone Linear Li-lon Battery Charger. The schematic includes a green led to show the user that the battery is charged and a red led to show the user that the battery is charging. There is a Battery Holder for a 18650 battery (J5) and an additional 1x2 header (J7) in case we want to use a different 3.3V battery. There is also a 1x2 header (J3) to use a different type of connection for the charger (instead of the USB C), for example we can connect and test a QI Wireless Charger.

Schematic of EJA M: Battery charging circuit using the TP4056.

Battery Level

The design contains a circuit to measure a battery level, it is a simple resistor divider calculated for a range of 2.7V to 4.2V, the normal range for the 18650 Li-Ion Battery that will be used in the design.

Schematic of EJA M: Circuit designed to measure the battery level.

Those values for the resistor divider give the following range for the ADC:

  • Maximum voltage: 4.2V * (2M / (0.806M + 2M)) = 2.99V
  • Minimum voltage: 2.7V * (2M / (0.806M + 2M)) = 1.92V

That means that the ADC from the ESP32 will be reading analog values from 1.92V to 2.99V from the battery measurement circuit.

For more information about measuring lithium battery voltage visit the following link.

3V3 3A SEPIC Converter

Since the voltage of the battery can change from 2.7V (discharged) to 4.2V (charged), a SEPIC converter is included to provide a constant 3.3V to the digital circuits regardless of the changes in the input voltage from the battery. The selected SEPIC converter is the LTC3113EFE#TRPBF.

Schematic of EJA M: Design of a 3V3 3A Sepic converter using the LTC3113EFE#TRPBF.

Note: The resistor R32 is a jumper that connects VDD to 3V3. R33 is a jumper that connects VDD to the battery. Do not solder both at the same time, it will create a short circuit between 3.3V from the SEPIC and the voltage from the battery. R32 and R33 are included just in case the SEPIC converter doesn't work and we have to connect the circuit directly to the battery.

Summary: Do not solder R33.

ON-OFF Led

There is Green Led that turns on with the 3.3V from the SEPIC converter, it will notify the user/developer that the device is ON or OFF.

Schematic of EJA M: ON/OFF Indicator.

ON-OFF Button Circuit

The design contains a LTC2954ITS8-1#TRPBF, a pushbutton ON/OFF controller that manages the power supply (enables the 3.3V SEPIC) via a pushbutton interface.

Schematic of EJA M: ON/OFF Circuit using the LTC2954ITS8-1#TRPBF.

Extra Header

The design includes an 1x06 header to provide access for some of the unused pins in the ESP32.

Schematic of EJA M: Header connected to unused I/O ports of the ESP32.

PCB Dimensions and Boundaries

The dimensions of the PCB are dictated by the maximum available space inside the buoy, from the enclosure design we where able to define the size of the PCB: 97.5 mm x 51.2 mm.

In the back layer there is a restricted region, that can't contain any components because the PCB is directly in contact with the enclosure in that region, those are the boundaries of the back layer. Through hole footprints where not be placed in that section, even if the footprint is placed in the front layer.

Diagram with the maximum space available for the PCB.

Bill of Materials

PCB Components

Reference Quantity
PCB 1
47 µF ±20% 6.3V Ceramic Capacitor 0805 1
10 µF ±10% 6.3V Ceramic Capacitor 0805 4
12 pF ±5% 50V Ceramic Capacitor 0805 1
680 pF ±10% 25V Ceramic Capacitor 0805 1
47 pF ±5% 16V Ceramic Capacitor 0805 3
100 µF ±20% 6.3V Ceramic Capacitor 1210 1
0.1 µF ±10% 50V Ceramic Capacitor 0805 3
4.7 µF ±10% 6.3V Ceramic Capacitor 0805 1
1 µF ±10% 16V Ceramic Capacitor 0805 4
2.2 µF ±10% 10V Ceramic Capacitor 0805 1
220 µF Tantalum Capacitors 10V 2917 1
0.033 µF ±10% 50V Ceramic Capacitor 0805 1
Orange 601nm LED - Discrete 2.1V 0805 1
Green 520nm LED - Discrete 3.2V 0805 2
TVS Diode 15V Clamp 5A (8/20µs) SOT-23-6 1
Red 630nm LED - Discrete 1.9V 0805 1
Yellow 590nm LED - Discrete 2V 0805 1
1 Signal Line Ferrite Bead 0805 300mA 350mOhm 2
USB-C USB 3.2 Gen 2 Receptacle Connector 1
Battery Retainer Coin, 20.0mm 1 Cell PC Pin 1
U.FL (UMCC) Connector Receptacle 2
Battery Holder (Open) 18650 1 Cell PC Pin 1
2 Position Terminal Block Horizontal 1
2.2 µH Inductor 15 A 7mOhm Max 1
5.5 µH Inductor 10 A 10.3mOhm 1
Bipolar (BJT) Transistor NPN 30V 600mA SOT-23-3 3
1 MOhms ±1% 0.125W Chip Resistor 0805 2
90.9 kOhms ±1% 0.125W Chip Resistor 0805 1
620 Ohms ±5% 0.125W Chip Resistor 0805 5
5.1 KOhms ±1% 0.125W Chip Resistor 0805 3
49.9 KOhms ±1% 0.125W Chip Resistor 0805 1
825 kOhms ±0.5% 0.125W Chip Resistor 0805 1
182 kOhms ±1% 0.25W Chip Resistor 0805 1
1.2 kOhms ±5% 0.125W Chip Resistor 0805 1
6.49 kOhms ±1% 0.125W Chip Resistor 0805 1
27 Ohms ±1% 0.125W Chip Resistor 0805 2
10 kOhms ±1% 0.125W Chip Resistor 0805 10
1 kOhms ±1% 0.125W Chip Resistor 0805 1
1.8 MOhms ±1% 0.125W Chip Resistor 0805 1
390 kOhms ±1% 0.125W Chip Resistor 0805 1
806 kOhms ±1% 0.125W Chip Resistor 0805 1
2 MOhms ±1% 0.125W Chip Resistor 0805 1
180 kOhms ±0.5% 0.1W Chip Resistor 0805 1
0 Ohms Jumper 0.125W Chip Resistor 0805 2
ATGM332D-5N31 GNSS Series GPS+BDS 12.2x16x2.4mm 1
Buck-Boost Switching Regulator 1.8V 1 Output 3A 1
TP4056 ESOP-8 Battery Management 1
ESP32-WROOM-32D (4MB) 1
FTDI USB Bridge, USB to I²C/UART USB 2.0 I²C, UART Interface 28-TSSOP 1
TPS61030PWPR Boost Switching Regulator IC Positive Adjustable 1.8V 1 Output 3.6A (Switch) 1
RFM95W-915S2-ND LoRa Transceiver Module 915MHz 1
DS3231M+TRL Real Time Clock I²C, 2-Wire Serial 1
Power Supply On/Off Controller Push Button 1
Connector Header Through Hole 40 position (2.54mm) 1

Externals Components

For more information about the BOM including prices and different comparisons with my previous designs visit the following link.

PCB

The following images show the front and back layers of the PCB.

3D Model of the PCB Design.

3D Model of the PCB Design.

Posted In:
Embedded Hardware