0% found this document useful (0 votes)
16 views14 pages

Electrical Overview

The document provides an overview of the electrical distribution system for a robot, emphasizing the importance of isolating high and low voltage components to prevent interference. It discusses the selection of microcontrollers, highlighting the STM32F103C8T6 as the ideal choice due to its power efficiency and processing capabilities. Additionally, it evaluates various sensors for line tracking and weight sensing, ultimately recommending the IR sensor for line tracking and the YZC-133 load cell for weight measurement.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views14 pages

Electrical Overview

The document provides an overview of the electrical distribution system for a robot, emphasizing the importance of isolating high and low voltage components to prevent interference. It discusses the selection of microcontrollers, highlighting the STM32F103C8T6 as the ideal choice due to its power efficiency and processing capabilities. Additionally, it evaluates various sensors for line tracking and weight sensing, ultimately recommending the IR sensor for line tracking and the YZC-133 load cell for weight measurement.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

1.1.

Electrical Overview
1.1.1 System Electrical Distribution
A robot cannot operate without being properly powered. Therefore,
we have decided to distribute our power as in this diagram below:

Figure: Electrical power distribution of the system


From the main power supply, there are two main power sources that
are separated: High Voltage (HV) and Low Voltage (LV). The key is to
isolate the processing components which need little energy to work
(microcontroller, sensor…) from high-power loads such as motors, which
generates electricity during operation and can electrically interfere with the
data acquisition as well as the computation process. Another reason for the
forementioned power isolation is to make sure everything works within its
electrical requirements without using too much power conversion
circuitries.
This can be done by minimizing the straight connections between
these components. In cases where direct wiring is unavoidable, we may use
external isolation instruments such as an optocoupler or relay to achieve
such requirements.
1.1.2 The Microcontroller Unit (MCU)
A microcontroller is the brain of the robot, where it controls
various components such as motors and its shield, or take in inputs of
encoders and sensors, and outputs corresponding parameters. Choosing a
proper microcontroller goes under several requirements such as:
 Processing power: The selected microcontroller should be
able to handle tasks at an acceptable speed. When looking for a MCU, we
should pay attention to its Clock Speed to determine its processing power.
The higher, the better.
 Power consumption: The selected microcontroller should be
consuming as little power as possible, in order not to put stress on the
power supply. In addition, its pin I/O should match with its sensors’ logic
level electrically. For example, it is better to choose a microcontroller with
a 5 V I/O when the sensor it controls require 5 V logic levels.
 Price: The selected microcontroller’s price should be
minimized. It is recommended to check the price-to-performance ratio of
the device in order to qualify for this merit.
From those requirements, we have several options such as:
 Arduino Uno/Nano:

This is one of the most popular microcontroller boards


currently. It comes with an IDE that simplifies the programming
process, as well as providing ample amounts of ports and
peripherals. However, this board suffer from bad clock speed at
only 16 MHz , and a low flash storage of only 1 KB. The Arduino
Uno adapts a bit better to shields which benefits the motor
driving, but is at nearly double the Nano’s price while keeping
the same processing power.
 ESP8266/ESP32:

Also being one of the most widely-used microcontrollers, it


provides the same IDE as the Arduino, which makes
programming it easier, and for almost the same price, offers 5
times processing power (at 80 MHz ) as well as more flash
memory and Wi-fi capabilities. The problem with this board is
that it uses 3.3V logic level, which may require level shifters to
process signals and therefore increase the total price. Another
drawback is that it is more power hungry than the Arduino
Nano. The ESP32 provides an even higher clock speed
comparing to the ESP8266, at double the price.
 STM32:

A microcontroller board family that uses ARM architecture.


Comparing to the Arduinos and ESP8266, this board consumes a
lot less power, while having almost the same clock speed. The
STM32F103C8T6 is somewhat compatible to the Arduino IDE,
making its programming learning curve similar.
A rundown table for the aforementioned microcontroller is
presented as below:

Arduino
Microcontroller ESP8266 STM32
Uno/Nano
Flash 32KB 1MB-4MB 64KB
Clock 20MHz 80MHz 72MHz
GPIO 40 17 37
Analog 8 1 10
Timer 3 1 3
PWM 2 4 12

Conclusion:
It can be seen that there are multiple choices when it comes to
microcontroller. But as the aim of this project is mainly at the power
consumption, price and raw clock speed, where features like Wi-fi can be
omitted, the STM32F103C8T6 is the ideal candidate. It offers good clock
speed, uses an ARM chip which is very power-efficient while having
options to fine-tune the power consumption.
1.1.3 The Line Tracking Sensor
In order to be able to track lines, the robot has to use a sensor.
There are multiple approaches for this task. Our merits used to select these
sensors are similar to that of a microcontroller: Price, performance, and
power consumption.
 Camera Module
If accuracy is highly preferred, using the camera is one of the
most viable methods. The drawbacks lie in the implementations
of algorithm to process what the camera sees, and in the price of
the module. Its power consumption is also higher, as extra
components along with the camera needs to also be driven.
The advantage of the camera module compared to the IR and
LDR-based sensor is that it does not depend on contrast to work
accurately, which eliminates distortion factors coming from
environment. The main selecting criteria is in parameters such as
resolution, image processing speed, and difficulty of
implementation.
 Infrared (IR) Sensor

In terms of pricing, this is one of the more affordable ways to


track a line. The components are also less comparing to the
Camera module, which reduce power consumption. As some
sensors’ datasheets provide a way to fine tune the readings, this
approach proposes great potentials. But to make the most out of
these sensors, some parameters have to be taken into accounts
such as circuit design, or calibration.
The IR Sensor circuitry is in essence, an op-amp comparator.
As a robot tracks through a line, the sensor (PSR) transmits
infrared light, which reflects onto the phototransistor and will be
registered to the phototransistor in the form of a current. That is,
the current gets altered depending on how much light is
registered through the phototransistor. This signal is then passed
through the comparator, which outputs a voltage indicating
HIGH or LOW logic level.
Figure: Example of an IR sensor circuit.
In the market, most of the IR sensor modules are different
iterations of a TCRT5000 drivers like on the previous figure. Some similar
modules using different IR sensors like the RS-06WD which not only are
more expensive (For example the Groove 1.1 Module), but also are less
tolerant. Two next figures show the difference in the TCR5000 and RS-
06WD sensor.

Figure: TCRT5000 IR Sensor Specifications


Figure: RS-06WD IR Sensor Specifications

It can be seen that in the absolute maximum rating,


TCR5000 is more heat-tolerant (working at 85 degrees C
compared to 65 degrees C of the RS-06WD). The TCRT5000 can
withstand pulses of 3A compared to 1A of the RS-06WD. In
conclusion, it is advisable to go for the TCRT5000 sensor for its
endurance and affordability.

 Light-Dependent Resistors (LDRs)

This approach uses the same medium to track a line as the IR


sensor: Light. The difference is that for it tracks the line passively
and provide a current instead of a voltage. Comparing to the IR
sensor, using LDRs can be even cheaper. In exchange, because it’s
a passive component, fine-tuning it will be more challenging due
to not all LDRs being the same. Sensor placement also plays a
crucial role if this method is chosen.
A sample sensor circuit for LDR-based line tracker is
presented in the image below. It uses two transistors in a
Darlington configuration to produce two logic levels HIGH and
LOW, depending on the LDR’s value that is inputted by light. In
this particular case, whenever the sensor (LDR1) is on the line, its
resistance increase, causing a voltage drop at the base of T1, and
activates it. The signal from T1 is amplified through T2, making a
logic HIGH level. This logic level can then be feed to the
microcontroller for further processing.

The use of transistors makes this approach faster than using


IR sensors which is op-amp based, but instead of outputting a
voltage which can be fed directly to the microcontroller, it
produces current-based signal which needs an extra conversion
step to achieve the same result.
The following table illustrates a quick rundown of three main
method used to track line on a robot.

Line tracking
Camera IR Sensor LDR
method
Fast (Almost Fast (Almost
Low (up to dynamic, relies dynamic, relies
Speed
30FPS) on controller’s on controller’s
polling rate) polling rate)
Accuracy High Low Low
Affordability High price Low price Low price
Difficulty Hard Easy Easy
Conclusion:
For our application, the IR sensor is selected due to it being
somewhat in the middle in terms of design difficulty and price. It’s
affordable, while being not so tedious to tune comparing to using LDRs.
The type of map (white background with black path) also contributes to the
selection of this type of sensor, since it has a high contrast between the path
and the background.
1.1.4 The Weight Sensor
In addition to line-tracking, the robot must also be able to sense
whether it’s being given a 1 kg or 2 kg load. Research on the internet shows
that the most commonly used principle is to sense the weight through the
change of an electrical parameter, such as voltage or resistance. The Load
Cell module also uses the same principle. This module detects weight
through the change of voltage, which is caused from the change in
resistance in the Strain Gauge, which is a part of the Load Cell module. As
the loadcell is popular on the market with various price points, we chose it
as the approach for the weight-sensing problem in this project.

Figure: How a load cell work


On the market, the popular models of load cells are from YZC,
namely the YZC -133 for our task. It has specifications as follow:

Model YZC - 133

Weight 5 Kg
Rated Output (mV/V) 1.0 ± 0.15

Linear Offset (%) 0.05

Creep (5min) % 0.1

Temperature Sensitivity (%RO/Deg.C) 0.003

Zeroing Temperature Sensitivity (%RO/ Deg.C) 0.02

Zero-point Balance Offset %RO ± 0.1

Input Impedance (Ω ) 1066 ± 20

Output Impedance (Ω) 1000 ± 20

Isolation Impedance (MΩ) 50V 2000

Working Voltage 5V

Working Temperature −20 65 ° C

Safe Overload Limit %RO 120

Ultimate Overload Threshold %RO 150

Material of Sensor Aluminum

In order to use this sensor, an additional 24-bit precision ADC


module is required. Research on the internet shows there that the most
widely used module is the HX711 ADC which is frequently used for
weight-sensing application. It features an output data rate of up to 80SPS,
selectable between 10 and 80SPS, on-board filter circuitry, power supply
regulator and oscillator. However, the limitation of this ADC circuit is at its
maximum output rate there is ample of noise according to Olkal’s Github
page about the ADC’s library.
Figure: The HX711 ADC module

Figure: ADS1256 ADC Module


We can opt for another module which uses ADS1256. This
module has more input (4 compared to 2 of the HX711), output rate of up
top 30kSPS, and better documentation, while also having specific library
for ease of programming. The HX711 does not provide, for example, how
the mains hum is eliminated. The disadvantage of ADS1256 is the price,
which costs 10 times higher than the HX711.

You might also like