Code Monkey home page Code Monkey logo

sra-board-hardware-design's Introduction

Stargazers Forks Issues License


Logo

SRA Development Board

ESP32-based Development Board
KiCAD · Gerber · Images · 3D Model

SRA Board 2023

The SRA board is a development board based on ESP32 with on-board peripherals like programmable LEDs, switches, sensor ports for Line Sensor Array and MPU-6050, protection circuit for over-current and reverse voltage and motor drivers.

Table of Contents

Board Images

  • Frontside

  • Backside

  • Pinout

About the Project

  • This development board is used for the Wall-E and MARIO workshops conducted by SRA.
  • Designed using KiCAD. The schematic and board files are here.
  • Resources for previous work. For more details of the SRA board 2020, checkout this link.
  • The SRA board 2020 images can be found here.
  • Older versions of the board and miscellaneous designs can be found here.

Getting Started with a Development Board

In general, every development board has the following basic features:

  • Power Supply Unit

    • Microcontrollers (MCUs) usually run on 3.3V or 5V logic supply voltage while input to a development board is normally 12V for motor and driving/controlling peripheral devices.
    • So, in order to have a single input source, a power section which inter converts this 12V to standard levels like 5V & 3.3V for MCU and sensors is present.This is achieved using a step-down buck regulator.
    • Buck Regulator IC LM2576-S-5 is used for stepping down the voltage from 12V to 5V DC. This 5V is further regulated to 3.3V using LDO IC AMS1117-3.3.
    • The previous edition of the SRA board (2020) used a similar buck regulator setup.
    • The older editions of the SRA board used the LM7805 linear voltage regulator, for stepping down from 12V to 5V; this powered the ESP32. Further, this 5V was converted to 3.3V using the LD33 linear voltage regulator, used by the sensor port.
  • Motor Driver

    • Motors usually run on 12V and MCU output is generally 5V/3.3V. So, an external motor driver circuitry is required to control motors according to the MCU input.
    • The current and previous editions of SRA board use the TB6612FNG Motor Driver, which is a MOS-based H-Bridge motor driver.
    • The older editions of SRA Board used the L298N IC for motor-control, which is a BJT-based H-Bridge motor driver.
  • Sensor Port

  • Protection against Reverse Voltage

    • The SRA Boards use diodes for reverse voltage protection in the power-line.
    • 12V Motor line and power regulated line have been separated with SS34 and SS24 schottky diodes respectively.
  • Protection against Over Current

    • Earlier, for the overcurrent protection of MCU and motor driver circuit, bulky glass fuses of 300mA and 3A were used respectively. After breakdown, they used to be replaced.
    • In the recent versions of the board, these were replaced with compact, PTC Resettable Fuses.
    • On 12V line - RXEF160 : 1.6A hold current; 3.2A trip current Fuse was used.
    • On 5V line - RXEF160 : 0.5A hold current; 1A trip current Fuse was used.
  • Programmable Switches and LEDs

    • Every development board should have some programmable switches and LEDs for testing, control and debugging purposes.
    • The current editions has an array of 8 programmable LEDs and switches.
    • The previous edition had a pair of programmable switches and programmable LEDs each.
  • Power Switch

    • All versions have a power switch for the motor driver, using which power supply to the motor driver can be toggled. Similarly, there was a switch for the ESP32 MCU.

Now that we covered basics of development boards, let us talk about the changes made in the new design.

Major Changes for 2023

Feature SRA Board 2019 SRA Board 2020 SRA Board 2022 SRA Board 2023
12V to 5V LM7805 Linear Regulator LM2596 Buck Converter LM2576-S Buck Converter LM2576-S Buck Converter
5V to 3.3V LD33 AMS1117-3.3 AMS1117-3.3 AMS1117-3.3
Reverse Voltage Protection Diodes P-MOSFET Diodes Diodes
Line Sensing Arrays (LSA) Photodiodes Photodiodes Photodiodes IR Sensors
Number of LSA Sensors 4 4 4 5
Motor Driver L298N TB6612FNG TB6612FNG TB6612FNG
Stepper Motor Driver - - - A4988
No. of DC Motor Channels 2 4 4 2
No. of Stepper Motor Channels 0 0 0 1
No. of Switches 2 4 4 4
No. of LEDs 2 8 8 8
Over Current Protection Bulky Glass Fuses Bulky Glass Fuses PTC Resettable Fuses PTC Resettable Fuses
Sensor Port Connectors FRC (Fused Ribbon Cable) Connectors JST (Japan Solderless Terminal) Connectors JST Connectors JST Connectors
Component Type and Board Size THT (Through Hole), Big THT (Through Hole), Big SMD(Surface Mount Device), Smaller SMD(Surface Mount Device), Smaller
  • 7805 (5V linear regulator) to LM2576/96 Buck Convertor

    • The greater efficiency, output current and reliability of LM2576/96 were the reasons for this change.
    • The efficiency of LM2576 is up to 92% which is significantly better than 7805. The LM2576 can provide current up to 3A, so the MARIO workshop manipulator can now be run using onboard regulator.
  • LD33 (3.3V) to AMS1117:

    • The older editions used the LD33 IC to step down from 5V to 3.3V; several discussions resulted in the shift to more compact, reliable AMS1117-3.3(SOT-23) linear voltage regulator. (AMS1117 is also used on-board on the ESP32-DevKitC V4 module)
  • Reverse voltage protection: Diodes to P-MOSFET

    • Diodes in series to the power line are inefficient as compare to a P-MOSFET. Dut to the usage of high-rated motors, it was difficult to manage the diode size and the current rating. (As the current rating of diode increases, its size also increases.)So, the previous version uses the P-MOSFET instead of a diode, which is more efficient and can handle more current.
    • In the current edition, SMD diodes are used, hence rating and size is no longer an issue.
  • Component Type and Board Size:

    • In the previous and older editions, THT or PTH(Plated through hole) components were used, which take up a lot of space and their size increases with increasing rating.
    • In the current edition, all the components were replaced by SMD components. This reduced cost, size of PCB and helped assembling complex circuitry in a small space and form factor.
    • Previous edition PCB dimension - 81 x 112 mm
    • Current edition PCB dimension - 81 x 92.68 mm (Nearly 81 x 20 mm area was shaved off)
  • L298N to TB6612FNG

    • L298N is a BJT-based H-bridge motor driver but it is less efficient as compared to the new MOS-based TB6612FNG.
    • The detailed comparison is shown below. As you can see the efficiency of TB6612FNG can reach up to 91-95% which is significantly higher than the 40-70% efficiency of L298N.
    • The only drawback of TB6612FNG is the less continuous current which is equal to 1.2A. So, for higher current capacity motors, two TB6612FNG are given on the board, which can be used in parallel mode to double the current capacity to 2.4A.

  • Stepper Motor Driver Port (A4988)

    • In the Previous and older editions, there were two ports for TB6612FNG Motor Drivers but it has been updated to one TB6612FNG and one A4988 Stepper Motor Driver in the current SRA Board (2023).
    • A4988 Stepper Motor Driver a microstepping driver for controlling bipolar stepper motors which has built-in translator for easy operation. This means that we can control the stepper motor with just 2 pins from our controller, or one for controlling the rotation direction and the other for controlling the steps.
    • The Driver provides five different step resolutions: full-step, haft-step, quarter-step, eight-step and sixteenth-step. Also, it has a potentiometer for adjusting the current output, over-temperature thermal shutdown and crossover-current protection.

  • Motor Driver Modes

    • The new edition has 1x TB6612FNG motor drivers which allow a maximum of 2 motors to be controlled. This motor driver is characterized by its operation in two modes - Normal mode and Parallel mode:

      1. Normal Mode

      • As discussed earlier, the new design has two motor drivers. 1x TB6612FNG and 1x A4988 Stepper motor driver. Therefore, using 1x TB6612FNG motor driver one can control 2 motors using 4 GPIO's of ESP32.
      • E.g.: If pin 32 is HIGH(IN1 = HIHG) and pin 33 is low(IN2 = LOW) then motor 1 moves in the forward direction.
      • So in normal mode, 2 motors can be connected to the board, with a per channel/motor current capacity of 1.2A.

      1. Parallel Mode

      • The parallel mode is a special feature, used for high-rated motors, requiring more than the 1.2A current limit.
      • In this mode, the channel's directional pins and output pins are shorted; only one motor is connected to a motor driver i.e. two channels, giving a current capacity of 2.4A. Thus, one high rated motors can be controlled using ESP32.
      • Note: The directional pin shorting is done by a manual DPDT switch. If the user turns on TB_A switch then the first motor driver goes into the parallel mode and its directional pins are shorted, where GPIO connections are IN1 = IN3 = 25 and IN2 = IN4 = 26. This is all done automatically. Also for parallel mode, the J1 and J2 junctions need to be shorted.

  • Moving back from the vintage Bar-graph LEDs to LED array and more switches

    • The older edition used a pair of programmable switches and LEDs each.
    • Since the previous edition, the number of debuggable switches has been increased to 4.
    • The previous edition used an LED voltage bar-graph array of 10 LEDs which was very bulky.
    • In the current edition, 10 SMD LEDs arranged in an array out of which two are reserved for 5V and 3.3V voltage indication have been used.
    • So there are 8 programmable LEDs on the board. These LEDs multiplexed with directional pins of the two motor drivers to save pins.
    • Directional pins? >> Every motor driver channel has two directional pins IN1, IN2. If IN1 is high and IN2 is low then motors move in a clockwise direction and there are 4 channels on the board, so 4 * 2 = 8 directional pins are multiplexed with 8 programmable LEDs.
    • With 8 LEDs in hand, debugging get easier. Some examples -
      1. According to the line sensor array (LSA) data, one can program 4 LEDs to turn on when the line sensor detects white and turn off for black- line following debugging.
      2. If a motor is moving in a forward direction, the dedicated LEDs will be indicating IN1 is high and IN2 is low - motor control debugging.

Notable problems in the previous SRA Boards (2019)

  • The Simultaneous Power Supply Issue

    • ESP32 can be power using two ways - one via the USB port given on the ESP32 and two via providing a voltage on VIN pin.
    • In the SRA Board 2019, if simultaneous power (on both the above sources) was provided to the ESP32 then it won't work as there was no circuitry for handling such a condition.
    • The following disclaimer from the official ESP32 documentation made it essential to design some external circuit to handle this condition and accordingly pass only one signal to the ESP32 board.

    The power supply must be provided using one and only one of the above options.Otherwise, the board and/or the power supply source can be damaged.

    • Solution

      • There is an inbuilt BAT760 diode on the USB line on ESP32. If different voltages are applied at Vusb and Vin, then the voltage with bigger magnitude will be given to LD1117 (LDO on ESP32); often the voltage will be the same on Vin and Vusb i.e 5V.
      • But, the usage of the SS14 (currently, 1N5417 in previous edition) diode on the Vin path, which has more Vf (forward voltage) than the BAT760, will create a voltage indifference and in a simultaneous power supply condition, USB will be selected as its voltage will be more than Vin.

Notable problems in the current SRA Board 2022

  • The High Frequency RF noise Issue

    • Currently 300rpm rated BO motors were ultilised for application. These are brushed DC motors functioning currently on 12v working on PWM concept.

    • These BO motors drain a lot of current during operation. 90 - 100 mA - during normal operation. But they drain about 600 - 700 mA current - during momentary or forced stalling. Momentary stalling happens by itself.

    • For self balancing operation - the MCU communicates with MPU6050 for the current orientational readings and accordingly gives commands to the motor driver and thus the motors.

    • When this PWM goes over 50% duty cycle, the error in MPU readings become large and the motor rotate with full speed, thus not self-balancing the setup.

    • The following inspections were carried out os far so solve this issue.

    • Inspections

      • The static noise or low-frequecy noise generated by BO Motors was eliminated by soldering a 0.1uF ceramic capacitor across its terminals.
      • Initially, the longer length of the I2C line route + cable from the MPU6050 to the ESP32 was suspected to be the main culprt. However, the MPU was checked for I2C packet drop, which when observed under the a DSO, seemed pretty fine. While reading the Motion data, both the SDA and SCLK lines go high.
      • The dynamic high-frequency noise wasnt getting eliminated which is produced to the brush action of brushed DC motors. Finally adding ferrite beads across the motor terminals and using twisted cable pairs to connect it to the board lessened the RF noise to an extent.
      • Although, the above solution only facililated in lessening the frequency of system going into error. Also, the duty cycle was forced to be under 50% for opltimal application.
    • Possible Solutions

      • View this issue #14 for more details and advancements on the suggested solutions.
      • The above error didnot occur when L298 motor driver was used with the same setup.
      • Using N20 geared motors which draw relatively less current did not throw an error.
      • Task is to figure out an economical alternative considering it to be a hardware issue.

3D Models

  1. The complete 3D model (.step) file of SRA Board 2023
  2. The 3D models of motor driver, LEDs, ESP32 etc.: 3d models of other components

Milestones

  • Designing of the prototype board
  • Modular testing of the circuit
  • Testing of prototype board
  • Final version
  • Resolving high frequency noise by BO Motors ( TB6612FNG )

Contributors

Acknowledgements and Resources

License

sra-board-hardware-design's People

Contributors

aniruddha1261 avatar chinmaylonkar avatar dhairyashah1 avatar lakshayasinghal avatar laukik-hase avatar ombhilare999 avatar omsheladia avatar sagarchotalia avatar superchamp234 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sra-board-hardware-design's Issues

Design fixes in SRA_Dev_Board_2023

The following issues in design need to be corrected and updated to avoid inconsistencies:=

  • Correct the silkscreen for LED Array Port with the proper GPIO naming convention
  • Search for a software side solution to handle/disable the MPU6050 interrupt and use that pin as a GPIO when disabled without breaking the INT line connectivity
  • Any other required changes
  • Update gerbers, renders, assets, documentation accordingly

CC - @ChinmayLonkar

Schematics in PDF format

Suggestion to add the schematics in PDF format so that it can be viewed without any CAD software.

Update README.md for SRA_Board_2023, LSA and MPU as per current changes

  1. The images and references should be complete and within the systematic folders of this repository. eg assets.
  2. Information should be updated, written properly in points with links to relevant work and in comparison to previous design highlighting improvements, what and why incorporated in this year's design.
  3. Images, videos, or gifs should be scaled to uniformity.
  4. Fixes and improvements with respect to the previous documentation are desired.
  5. Links to relevant issues encountered and their solutions can be mentioned as well. I suggest linking this to blog posts later as mentioned in #18

@ChinmayLonkar @Jamm02 @Premraj02 assign this task to some SY

Replace LEDs and phototransistor on LSA with IR sensors.

The current design of LSA is very prone to ambient light and often cause inconvenience in line following.
Possible solution is to test TCRT-5000 for ambience interference.

If it proves to be better than current design, we can easily modify our LSA design to include it.

[ PCB Design ] Add Pin header in front of current MPU Port for direct MPU6050 plugin

  • The noise observed on the SDA and SCL lines of MPU6050 leads to an I2C Packet drop while self-balancing (motors running).
  • This is related to interference between the BO Motor wires and the long MPU JST Cable.
  • Shortening the length of I2C lines prevents this issue. Ref #14
  • This issue aims to add a direct pin header port for direct plug-play and operation of the MPU6050 on the SRA Board

Todo -

  • Update test results for direct plugin MPU near the current port
  • Test the above thoroughly with self-balancing
  • Make changes in the PCB Design
  • Updated PCB Fabrication, Assembly
  • Rigorous testing for self-balancing and making suitable changes ( like using MPU Offset) in the firmware for 3_MPU and 8_self_balancing

CC - @ChinmayLonkar @Premraj02

Add stl, stp (STEP) files for SRA Board, LSA and MPU

Uses-

  1. Essential and easy to export in other CAD software (Solidworks, Coppelia, FreeCAD, etc)
  2. Useful for use in simulation

Kindly add these files and update them here.

  • Replace the old files.
  • This should be done for sra_board, LSA, and MPU in respective directories
  • @Aniruddha1261 kindly make the required changes and update your PR

Create and Add web page for Board Hardware Documentation, posting test Blogs

This issue aims to create a separate dynamic webpage that hosts the documentation and README.mds along with some other features viz. Adding board information, 3D layout + Images, testing blogs. Site hosted on GitHub Pages

Suggestion -
Use jekyll - a simple site generator using gh-pages. Tutorials can be found here.
Ref - https://sravjti.in/sra-board-component/

Todo -

  • Fix any bugs in the current README.md description files
  • Add/Optimise any technical content
  • Create a different branch called gh-pages and then start contributing
  • Host a site including the above information for Board and Sensors - LSA and MPU
  • Another page or subsection to display blogs on debugging/ technical matter observed during the journey of Board development
  • Another page or subsection to display renders, 3d models, images and renders. Something like - https://yellow.home-assistant.io/yellow-v1.2-standard/

CC - @Dhruv454000 @ChinmayLonkar @Sidshx assign this issue to some SY

Solve the noise issue in PCB due to motors

In Wall-E 2022, we faced the issue of noise in I2C line , which was caused by static noise in motors. This forced us to add capacitors and ferrite bead on the motors. Since we have never faced this issue before with BO motors, we can assume that motor driver might not be working well in filtering the noise.

We can test it by using different motor drivers like DRV8833 to see if the problem persists.

Replacing extra Motor driver with Stepper Driver

  • To replace 2nd TB6612FNG Motor Driver and add functionality to drive a stepper motor on SRA Board - PCB design
  • Mention specifications of the driver used & models of stepper tested across
  • Add Terminal blocks to connect the servo motor
  • Pin headers/Pads/terminals for external supply (if desired to operate on higher rating (not from SRA board 5V/3V3))

Suggestion -
Include a Switch to toggle between power supply from SRA Board <-> External supply connected to port/pin header/pad

CC: @ChinmayLonkar @Asc91
Share the Updates with Images of PCB and changes made so far here

add more information

A suggestion not an issue:

Front silk

  1. Add year of manufacture
  2. version of board
  3. name of main contributor (architect of the board)..

Rear silk

  1. add logo
  2. add some more pin labels (even if they exist on upper silk mask).

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.