CHAPTER3
CHAPTER3
CHAPTER-3
HARDWARE COMPONENTS
Despite its diminutive size, the Raspberry Pi Zero 2 W features a powerful quad-core ARM
Cortex-A53 processor running at 1 GHz, coupled with 512 MB of RAM, providing ample
computing power for a wide range of projects. It also includes a microSD card slot for
storage, micro-USB ports for power and data, a mini HDMI port for video output, and GPIO
(General Purpose Input/Output) pins for interfacing with external devices and sensors.
With its low cost, small footprint, and robust features, the Raspberry Pi Zero 2 W has become
a popular choice for hobbyists, educators, and developers looking to create innovative
projects in areas such as home automation, robotics, digital signage, and more. Its versatility
and community support make it an excellent platform for exploring and learning about
computing and electronics.
The Raspberry Pi Zero 2 W features a total of 40 GPIO (General Purpose Input/Output) pins,
which are arranged in two rows of 20 pins each along the edge of the board. These pins
provide the Raspberry Pi Zero 2 W with the ability to interact with external electronic
components and peripherals. Among these 40 pins:
• 26 pins are standard GPIO pins, capable of both digital input and output.
• 8 pins are dedicated ground (GND) pins, which serve as reference points for electrical
circuits.
• 2 pins provide 5-volt (5V) power output for connecting higher-power devices.
• 3 pins provide 3.3-volt (3V3) power output for connecting lower-power devices.
• 1 pin is the system clock pin (GPIO 0), and another is the system ground pin (GPIO1).
Voltages :
Two 5V pins and two 3.3V pins are present on the board, as well as a number of
ground pins (GND), which can not be reconfigured. The remaining pins are all
general-purpose 3.3V pins, meaning outputs are set to 3.3V and inputs are 3.3V-
tolerant.
Outputs:
A GPIO pin designated as an output pin can be set to high (3.3V) or low (0V).
Inputs:
A GPIO pin designated as an input pin can be read as high (3.3V) or low (0V). This is
made easier with the use of internal pull-up or pull-down resistors. Pins GPIO2 and
GPIO3 have fixed pull-up resistors, but for other pins this can be configured in
software.
Other functions:
As well as simple input and output devices, the GPIO pins can be used with a variety
of alternative functions, some are available on all pins, others on specific pins.
• PWM (pulse-width modulation)
o Software PWM available on all pins
o Hardware PWM available on GPIO12, GPIO13, GPIO18, GPIO19
• SPI
o SPI0: MOSI (GPIO10); MISO (GPIO9); SCLK (GPIO11); CE0
(GPIO8), CE1 (GPIO7)
o SPI1: MOSI (GPIO20); MISO (GPIO19); SCLK (GPIO21); CE0
(GPIO18); (GPIO17); CE2 (GPIO16)
• I2C
o Data: (GPIO2); Clock (GPIO3)
• EEPROM
o Data: (GPIO0); EEPROM Clock (GPIO1)
• Serial
o TX (GPIO14); RX (GPIO15)
• Built-in Wireless Connectivity: Integrated Wi-Fi and Bluetooth eliminate the need
for additional modules, simplifying setup and reducing costs.
• Powerful Performance: Despite its size, the Raspberry Pi Zero 2 W features a
quadcore processor and 512 MB of RAM, providing ample computing power for
various applications.
• GPIO Pins: The 40-pin GPIO header allows for easy interfacing with external
sensors and devices, enhancing versatility and project capabilities.
• Affordability: Competitive pricing makes the Raspberry Pi Zero 2 W accessible to
hobbyists, educators, and professionals on a tight budget.
• Extensive Software Support: The vibrant Raspberry Pi community offers a wealth
of resources, tutorials, and software libraries, facilitating project development and
troubleshooting.
The SparkFun Load Sensor Combinator is a bare PCB that combines four load sensors
into a standard four-wire Wheatstone bridge configuration. If you open up an electronic
bathroom scale, you’ll find a large rat's nest of wires. The Load Sensor Combinator was
created to combine the 12 wires found in a bathroom scale into the standard four-wire
Wheatstone bridge configuration.
This board works great with our Load Cell Amplifier breakout board; the five pins on
the edge of the combinator line up directly to the five pins on the amplifier.
Fig.3.5.Load Combinator
Specifications:
• The possibility to connect 4 strain-gauge beams in 4-pin Wheatstone's bridge.
• The possibility of mounting a temperature sensor DS18B20.
• The possibility of mounting RJ45 connector.
• Pins: holes forgoldpin connectors - 2.54 mm(strap can be purchased separately)
• Module dimensions: 30 x 22 mm.
3.4. INTRODUCTION TO HX711 DUAL-CHANNEL A/D
WEIGHT PRESSURE SENSOR:
The HX711 Dual-Channel 24 Bit Precision A/D weight Pressure Sensor is a Load
Cell Amplifier breakout board; for the HX711 IC that allows you to easily read load
cells to measure weight. By connecting the module to your micro controller you will
be able to read changes in the resistance of the load cell; some calibration. You’ll
be able to get very accurate weight measurements.
This can be handy for creating your own industrial scale, process control, or simple
presence detection. The HX711 Weighing Sensor uses a two-wire interface (Clock
and Data) for communication. Any microcontroller’s GPIO pins should work and
numerous libraries have been written making it easy to read data from the HX711.
Features:
• Output Sensitivity: 1.0 ± 0.1 mV / V.
• Two selectable differential input channels.
• On-chip active low noise PGA with the selectable gain of 32, 64 and 128.
• On-chip oscillator requiring no external component with optional external crystal.
• On-chip power-on-reset.
• Measurement Resolution: 24 bit.
MQ2 gas sensor is an electronic sensor used for sensing the concentration of gases in
the air such as LPG, propane, methane, hydrogen, alcohol, smoke and carbon monoxide.
MQ2 gas sensor is also known as chemiresistor. It contains a sensing material whose
resistance changes when it comes in contact with the gas. This change in the value of
resistance is used for the detection of gas.
Working Principle:
This sensor contains a sensing element, mainly aluminium-oxide based ceramic, coated
with Tin dioxide, enclosed in a stainless steel mesh. Sensing element has six connecting
legs attached to it. Two leads are responsible for heating the sensing element, the other
four are used for output signals.
Oxygen gets adsorbed on the surface of sensing material when it is heated in air at high
temperature. Then donor electrons present in tin oxide are attracted towards this oxygen,
thus preventing the current flow.
3.6.INTRODUCTION TO PCF8591 A/D AND D/A CONVERTER:
Stepper motors convert electricity into rotation. Not only does a stepper motor convert
electrical power into rotation, but it can be very accurately controlled in terms of how
far it will rotate and how fast.
Stepper motors are so named because each pulse of electricity turns the motor one step.
Stepper motors are controlled by a driver, which sends the pulses into the motor causing
it to turn. The number of pulses the motor turns is equal to the number of pulses fed into
the driver. The motor will spin at a rate that is equal to the frequency of those same
pulses.
Stepper motors are very easy to control. Most drivers are looking for 5 volt pulses
which just so happen to be the voltage level of most integrated circuits.
Stepper Motor System:
The diagram below shows a typical stepper motor based system. All of these parts must
be present in one form or another. Each component's performance will have an effect on
the others.
A servomotor (or servo motor or simply servo) is a rotary or linear actuator that allows
for precise control of angular or linear position, velocity, and acceleration in a
mechanical system.It constitutes part of a servomechanism, and consists of a suitable
motor coupled to a sensor for position feedback. It also requires a relatively
sophisticated controller, often a dedicated module designed specifically for use with
servomotors.
Servomotors are not a specific class of motor, although the term servomotor is often
used to refer to a motor suitable for use in a closed-loop control system. Servomotors
are used in applications such as robotics, CNC machinery, and automated
manufacturing.
Fig.3.11.Servo Motor
Mechanism:
A servomotor is a closed-loop servomechanism that uses position feedback to control its
motion and final position. The input to its control is a signal (either analog or digital)
representing the position commanded for the output shaft.
The motor is paired with some type of position encoder to provide position and speed
feedback. In the simplest case, only the position is measured. The measured position of
the output is compared to the command position (which is an input externally fed to the
controller). If the output position differs from that required, an error signal is generated
which then causes the motor to rotate in either direction, as needed to bring the output
shaft to the appropriate position. As the positions approach, the error signal reduces to
zero, and the motor stops.
The very simplest servomotors use position-only sensing via a potentiometer and bang-
bang control of their motor; the motor always rotates at full speed (or is stopped). This
type of servomotor is not widely used in industrial motion control, but it forms the basis
of the simple and cheap servos used for radio-controlled models.
More sophisticated servomotors make use of an Absolute encoder (a type of rotary
encoder) to calculate the shafts position and infer the speed of the output shaft.[3] A
variable-speed drive is used to control the motor speed.[4] Both of these enhancements,
usually in combination with a PID control algorithm, allow the servomotor to be
brought to its commanded position more quickly and more precisely, with less
overshooting.