Menu
Buoy B v1.0 PCB

Buoy B | Hackaday Dream Team 2020

Buoy B V1.0 is a 102.46 mm x 44.20 mm PCB that integrates 4 of the main components (ESP32, LoRa, GPS and Motor Driver).

A later V2.0 revision of the board (in the repository) swaps the TB6612FNG motor driver for an Adafruit Ethernet FeatherWing, for bench testing and wired deployments, and is migrated to KiCad 6.

Main Components

Main components of Buoy B v1.0

Main components of Buoy B v1.0.

Sources:

Schematic

Schematic of Buoy B v1.0

Schematic of Buoy B v1.0.

For more information about the design check the original post in the project's page.

Layout

PCB Layout of Buoy B v1.0

PCB Layout of Buoy B v1.0.

PCB

3D render of the EJA Buoy B v1.0 PCB with the ESP32, LoRa radio and GPS fitted

PCB: Front Layer with components

PCB: Front Layer with components.

PCB: Front Layer without components.

3D render of the Buoy B v1.0 PCB, angled view

PCB: Back Layer with components

PCB: Back Layer with components.

PCB: Back Layer without components.

3D render of the Buoy B v1.0 PCB showing the module headers and terminal block

PCB: GPS and LoRa Module

PCB: GPS and LoRa Module.

PCB: Motor Driver.

3D render of the Buoy B v1.0 PCB, reverse side

PCB Design: ESP32 and Connectors

PCB Design: ESP32 and Connectors.

Assembly

Components of Buoy B v1.0

Components of Buoy B v1.0.

Components List:

  1. ESP32-DEVKITC-32D
  2. TB6612FNG MOTOR DRIVER BOARD
  3. CONN HDR 19POS 0.1 TIN PCB
  4. CONN HDR 9POS 0.1 GOLD PCB
  5. CONN HDR 9POS 0.1 GOLD PCB
  6. CONN HDR 8POS 0.1 TIN PCB
  7. CONN HDR 8POS 0.1 TIN PCB
  8. PCB Buoy B V1.0
  9. CONN HDR 19POS 0.1 TIN PCB
  10. TERM BLK 2P SIDE ENT 5.08MM PCB
  11. TERM BLK 2P SIDE ENT 5.08MM PCB
  12. TERM BLK 3P SIDE ENT 5.08MM PCB
  13. CONN HDR 6POS 0.1 TIN PCB
  14. CONN HDR 5POS 0.1 GOLD PCB
  15. CONN HEADER VERT 3POS 2.54MM
  16. CONN HEADER VERT 3POS 2.54MM
  17. CONN HEADER R/A 3POS 2.5MM
  18. Coin cell holder (included in Adafruit Ultimate GPS)
  19. Adafruit Ultimate GPS
  20. CONN HDR 16POS 0.1 TIN PCB (included in Adafruit Ultimate GPS)
  21. RFM95W LoRa Radio
  22. CONN HEADER VERT 16POS 2.54MM (included in RFM95W LoRa Radio)

For a detailed Bill of Materials visit the following post.

For a detailed explanation about the soldering and assembly procedure visit the following post.

Wiring Diagrams

The original design of the board considered the following components:

Power Management

  • Battery (5V < Voltage < 15V)
  • PCB Board Buoy B V1.0
  • Buck Converter
  • Switch
  • Extra capacitor
Wiring diagram: Power Management with Buck Converter

Wiring diagram: Power Management with Buck Converter.

Also, there is an alternative for the battery management, is possible to provide the required voltages with a boost converter and a 3.7V Battery, like the following example:

  • 3.7V 1 Cell Battery
  • PCB Board Buoy B V1.0
  • Boost Converter
  • Micro USB Breakout Board
  • Switch
  • Extra capacitor
  • JST-XH 2 Pos female connector and a JST-XH 2 Pos male connector
  • 5V Charger (only used to charge the battery)
Wiring diagram: Power Management with Boost Converter

Wiring diagram: Power Management with Boost Converter.

This alternative is valid and possible, but is not ideal for longer working time (compared to the first one). It is important to consider the efficiency of the boost converter. The selected boost converter will have a voltage drop at a current higher than 500mA, that should be taken into consideration.

Motors

The board was designed to handle 3 different types of motors, those are:

  • Servo Motor
Wiring diagram: Buoy B v1.0 with Servo Motor

Wiring diagram: Buoy B v1.0 with Servo Motor.

  • Stepper Motor (using the driver TB6612FNG)
Wiring diagram: Buoy B v1.0 with Stepper Motor

Wiring diagram: Buoy B v1.0 with Stepper Motor.

  • DC Motor (using the driver TB6612FNG)
Wiring diagram: Buoy B v1.0 with DC Motor, first connector

Wiring diagram: Buoy B v1.0 with DC Motor, first connector.

Wiring diagram: Buoy B v1.0 with DC Motor, second connector

Wiring diagram: Buoy B v1.0 with DC Motor, second connector.

For more information about the wiring diagrams and the project visit the following post.

  Firmware

The Buoy B firmware (Arduino / ESP32) turns the board into a self‑contained field unit — the same design runs on Buoy A:

  • Captive Wi‑Fi UIWiFi.softAP() brings up the EJA_Buoy_B access point and a DNSServer on port 53 resolves www.buoy_b.eja (and any host) to the ESP32, so a phone just connects and opens the page.
  • Async web serverESPAsyncWebServer on port 80 serves the UI from SPIFFS flash and exposes small endpoints for the live GPS, timer and message buffers; AsyncElegantOTA adds over‑the‑air updates at /update.
  • GPSTinyGPSPlus parses the NMEA stream at 9600 baud.
  • LoRa link — an RFM95W at 915 MHz (CS GPIO2, RST GPIO15, IRQ GPIO13) trades tagged GPS and timer messages once a second with the topside Onboard Gateway; LED1 (GPIO5) and LED2 (GPIO0) blink on LoRa RX / TX.
  • Release timer — the UI posts an hours/min/sec form; the firmware stores an end timestamp and flags timer_reached_end when it elapses. The countdown, UI and LoRa reporting are complete; the block that finally drives the release actuator is still a stub.

Upload the data/ folder to SPIFFS (Arduino "ESP32 Sketch Data Upload") before flashing the sketch.

  User Interface

Requirements:

  1. ESP32 Add-on in Arduino IDE
  2. ESPAsyncWebServer
  3. AsyncTCP
  4. SPIFFS File System
  5. ESP32 Async Over The Air
  6. TinyGPSPlus
  7. LoRa

The ESP32 creates an Asynchronous Web Server, with the following credentials:


                  const char* ssid     = "EJA_Buoy_B";
                  const char* password = "123456789";
                

With those credentials it is possible to access the WiFi network.

Phone Wi-Fi network list showing the EJA_Buoy_B access point created by the ESP32

The ESP32 creates a Domain Name System (DNS) to assign a domain name to the web server. That means that it is not necessary to know the server IP, it is possible to access the web server using the defined domain name for the host, in this case, the name is:


                  const char* host = "www.buoy_b.eja";
                

Once the device (phone/computer) is connected to the server (EJA_Buoy_B), open a browser and visit the following url:


                  http://www.buoy_b.eja/
                

Home

The previous link displays the web page used for HOME:

Buoy B web interface: Home page

There is a header with the name "EJA Buoy B" that opens a sidebar with links to the different test functionalities. It is also possible to access those pages using the buttons in HOME.

Buoy B web interface: sidebar menu listing the test pages

GPS

The page http://www.buoy_b.eja/gps shows the data from the GPS module.

Buoy B web interface: GPS page showing data from the GPS module

Timer

The page http://www.buoy_b.eja/timer shows the interface to create a timer in the Buoy. The timer represents a countdown that activates the release mechanism when the time has reached zero. The initial page allows the user to set the timer.

Buoy B web interface: Timer page with a countdown duration entered

After selecting the amount of time the user has to click the Submit button. That will create the timer, the interface displays the countdown to the user.

Buoy B web interface: Timer page showing the running countdown

When the timer reaches zero, the Buoy activates the release mechanism.

Buoy B web interface: Timer page showing the countdown at zero

The user can delete the timer at any time clicking the button Delete Timer. When the user deletes the timer, it is possible to create a new one and restart the process.

Buoy B web interface: Timer page with the Delete Timer button

LoRa

The page http://www.buoy_b.eja/lora shows internal messages related to LoRa. In the ESP32 that information is stored in the variable:


                  String lora_all_msg = "";
                
Buoy B web interface: LoRa page showing internal LoRa messages

Terminal

The page "http://www.buoy_b.eja/terminal" shows internal messages. In the ESP32 that information is stored in the variable:


                  String terminal_messages = "";
                
Buoy B web interface: Terminal page showing internal messages

Future Improvements

For more information about the recommended future improvements for the electronic design visit the following post.

Posted In:
Embedded Hardware