Skip to content

8. Electronics design

This week I worked on defining my final project idea and started to getting used to the documentation process.

Assignments in this week

Group Assignment:
- [x]use the test equipment in your lab to observe the operation of a microcontroller circuit board
- [x]send a PCB out to a board house

Individual assignment:
- [x] use an EDA tool to design a development board to interact and communicate with an embedded microcontroller,produce it, and test it
- [x] extra credit: try another design workflow
- [x] extra credit: design a case for it
- [x] extra credit: simulate its operation

Group Assignment

Learn test equipments in my lab and test the boards

As a former embedded engineer, I can basically use test instruments. At present, I have found test tools such as regulated power supplies, voltmeters, and oscilloscopes in Chaihuo Makerspace. In addition, I have also used handheld oscilloscope products such as ADALM2000 to perform some basic circuit measurements.

Power Supply

A regulated power supply is a common device in electronic laboratories. In many cases, a regulated power supply is used to test whether some devices are working.
Generally, before measuring, we need to debug the voltage value first. In addition, in order to ensure that the circuit is not damaged, we also need to adjust the current value. After all adjustments and checks are completed, we also need to connect the circuit and press the button to start the output of the voltage-stabilized power supply while ensuring that the circuit will not break.

Multimeter

The multimeter is the most common experimental instrument, which can be used to measure whether the circuit is short-circuited, voltage value, current value, resistance value, etc. In my circuit design, whenever the design is completed and made, I first perform a short-circuit test on the circuit to ensure that the circuit will not be short-circuited before I can power on the circuit.

Singal Generator & Oscilloscope

Singal Genrator:Signal generator is a professional electronic circuit equipment. As an electronics major, I often use it in my previous work. The main working principle is to select a specific output waveform, adjust the output frequency and amplitude, and output the corresponding waveform signal. It is mainly used to measure the conversion output results of some corresponding devices. Especially when doing some differential circuits before, I need to use a signal generator/waveform generator to measure the effect of filter circuits and other circuits.
 Oscilloscope:An oscilloscope is a device that every electronic engineer will use. It usually has two measurement circuits. By introducing the measurement circuit, the fluctuation results of the circuit signal can be displayed. Of course, there are also some more advanced oscilloscopes. In my week 11 assignment, I used a more advanced oscilloscope to analyze the output digital signals of some sensors.
 In this experiment, we use a signal generator to emit a fixed-frequency sine wave, and then access it through a single channel of an oscilloscope and adjust the scanning frequency to print out the sine wave results.

Learn about KCad.

As a former embedded engineer, I have used Altium Designer 10 for circuit drawing and PCB drawing, but these experiences were at least 8 years ago. I still feel very excited when I start using drawing tools again. This time I chose KiCad as a learning tool and started this week’s assginment.
1. Download and install the KiCad

  1. Learn the tutorails of KiCad.
    After reading the basic guide, I found that getting started with KiCad is much easier than AD10, and the free software gives engineers more freedom of choice. There are some included device model functions that I find very useful. I just remember that when I used AD10 before, creating devices was a very troublesome thing.
    -KiCad offcial tutorail

  2. Create a new project by using the defalt setting.
    -Step 1: Create a project;
    This step is basically the same as that of all software. Only after creating a project file, all ancillary files will be associated and managed under this project file.
     -Step 2: Install the symbol library and footprint library.
    Since the default KiCad device library does not contain the device library files we need for the small series and CNC cutting machine manufacturing, I downloaded it directly from the fabacademy website and installed it.
     -Step 3: Modify PCB design rules to facilitate manufacturing.
    This step is very important because our circuit boards are processed on desktop CNC machines. Due to limitations in processing accuracy, there are corresponding requirements for PCB routing, character size, and via size. The design rules need to be modified before designing. In order to make it easier to manufacture, I make my circuit traces thicker. Because I discovered this problem during the previous circuit processing process, I paid special attention to it during my circuit board design process.

Schematic Design via Kicad.

In the schematic design part, I used a modular design and used some marks to connect the corresponding pins, which will be more convenient for later modification and inspection. Since this design drawing will be my final project, I will explain the specific schematic diagram in the final project part.

Download my Schematic Design

PCB Design via Kicad.

In the PCB design part, because I use the makerspace CNC machine for processing, all traces must be drawn on the same layer, which makes it very difficult for me to place components. At the same time, I have to take care of how to leave enough There is enough space to place XIAO and other components.

Download my PCB Design

Manufacutring the boards.

The final circuit board produced is as follows.

Simulate and testing the boards.

I did not conduct a virtual program simulation of the board’s functions. I just checked the design rules after drawing the drawings. Here is ERC running resulf with not faluts

But this also caused me a fatal design error. Since I did not simulate and check carefully, I only discovered when I actually made the circuit and downloaded the program for testing that I had connected the RX and TX interfaces of the main sensor with the RX of XIAO. , the TX interface was connected incorrectly, which resulted in me having to use flying wires to make modifications before finding the error, and then making modifications in subsequent secondary manufacturing. This process wasted a lot of time and energy on my part.
This is normal mistakes that I miss connected with the RX&TX ports with micro controller boards and sensors. The correct should be as follows.

Under my mentor Salmanā€˜s help, He helped me to sold to jumping cable to make it connect in a right way.

First, I used a multimeter to measure whether there was a short circuit in the circuit and whether the corresponding signal line was connected.


After measuring with a multimeter, I connected the circuit board to the computer and found that the power indicator light of the XIAO ESP32 and the power indicator light of the motor driver board were on, indicating that the circuit was normal.

Hero Shot and working demo

Download Oringinal Schematic & PCB Files

After uploading the sample program, I found that the Arduino IDE can connect to the circuit board and can successfully compile and download the program, which proves that my circuit board is completed and produced successfully.

Finally it comes with result when i conenct the boards with my laptop from Serial monitor. It proves my baord is working now

Here is the testing code for the mmWave Sensor and its finnaly working after I fixed my board problem.

#include "Arduino.h"
#include <60ghzfalldetection.h>

#include <SoftwareSerial.h>
// Choose any two pins that can be used with SoftwareSerial to RX & TX
#define RX_Pin A2
#define TX_Pin A3

SoftwareSerial mySerial(RX_Pin, TX_Pin);

// we'll be using software serial
FallDetection_60GHz radar = FallDetection_60GHz(&mySerial);

// can also try hardware serial with
// FallDetection_60GHz radar = FallDetection_60GHz(&Serial1);

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  // Serial1.begin(115200);

  mySerial.begin(115200);

  while(!Serial);   //When the serial port is opened, the program starts to execute.

  Serial.println("Readly");
}

void loop()
{
  // put your main code here, to run repeatedly:
  radar.recvRadarBytes();           //Receive radar data and start processing
  radar.showData();                 //Serial port prints a set of received data frames
  delay(200);                       //Add time delay to avoid program jam
}