4.1 Analog signal and Digital signal #
An Analog Signal is a continuous signal in both time and value. On the contrary, a Digital Signal or discrete time signal is a time series consisting of a sequence of quantities. Most signals in life are analog signals. A familiar example of an Analog Signal would be how the temperature throughout the day is continuously changing and could not suddenly change instantaneously from 0℃ to 10℃. However, Digital Signals can instantaneously change in value. This change is expressed in numbers as 1 and 0 (the basis of binary code). Their differences can more easily be seen when compared when graphed as below.

In practical applications, we often use binary as the digital signal, that is a series of 0’s and 1’s. Since a binary signal only has two values (0 or 1) it has great stability and reliability. Lastly, both analog and digital signals can be converted into the other.
Low level and high level
In a circuit, the form of binary (0 and 1) is presented as low level and high level. Low level is generally equal to ground voltage(0V), while high level is to the operating voltage of components. The low level of the control board is 0V and high level is 5V, as shown below. When the IO port on the control board outputs a high level, it can directly light small-power components like LEDs.

ADC
An ADC is an electronic integrated circuit that converts analog signals, such as voltages, into digital or binary form consisting of 1s and 0s. Our ADC module has a 10-bit range, meaning its resolution equals 2¹⁰ = 1024. It divides the 5V range equally into 1024 parts. You can map any analog value to a digital value using the converter’s resolution. So the more bits the ADC has, the denser the partition of analog will be and the greater the precision of the resulting conversion.

Subsection 1: the analog in rang of 0V-5/1024V corresponds to digital 0;
Subsection 2: The analog input range from 5/1024 V to 2×5/1024 V corresponds to digital 1; the system divides the following analog signals accordingly.
4.2 BREADBOARD #
A breadboard lets you build and test electrical circuits without soldering. It allows you to insert and remove components easily, making it ideal for prototyping and experimenting with circuit designs. The breadboard has rows and columns of holes where you can plug in components like resistors, capacitors, and wires. Underneath the holes are metal strips that connect the components electrically.



Figure: Breadboard examples
- Holes Identification on a Breadboard:

Figure: Power rails and terminal strip
Power Rails (Red and Blue Stripes):
- These run along the sides of the breadboard and are used to distribute power (+ and -) to different parts of the circuit.
- The red strip typically indicates the positive voltage (+), while the blue strip or sometimes black indicates the ground (–).
Terminal Strips (Main Work Area):
- The breadboard’s main part divides into vertical columns of holes (usually labeled A to J) and horizontal rows (usually numbered 1 to 30).
- Each column in a numbered row connects electrically, so all five holes in a row (A to E, or F to J) share the same electrical connection.
- A central divider runs through the middle of the breadboard, electrically isolating the two sides from each other.
- Proper Way to Test a Breadboard:
- Visual Inspection: Make sure you place all components correctly and avoid crossing wires or components unintentionally, as this could cause a short circuit.
- Check Connections: Use a multimeter set to continuity mode to test connections. Place the probes in different holes that should connect (e.g., two holes in the same row) and ensure the multimeter beeps or shows continuity.
- Power Supply Test: Connect your power supply (typically a 5V or 3.3V source) to the power rails. Use a multimeter to measure the voltage across the power rails and ensure the circuit distributes the correct voltage.
- Testing the Circuit: Once you connect everything, run the circuit and test the outputs with a multimeter or oscilloscope to ensure it works as expected. If you use components like LEDs or sensors, observe their behavior (e.g., the LED lights up when the circuit powers on) to confirm they function correctly.

Figure: A breadboard with components on it
Summary of Steps:
- Identify power rails (red = positive, blue/black = ground).
- Ensure proper connections within terminal strips (rows and columns).
- Use a multimeter for continuity and voltage testing.
- Verify the circuit by powering it and testing outputs.
Breadboards are an essential tool for electronic projects and provide flexibility for experimentation without permanent connections.
- JUMPER WIRES
Jumper wires are insulated wires with metal tips (often with connectors or bare ends) that connect different components on a breadboard, circuit board, or link a breadboard to external devices. They allow for flexible, temporary connections without the need for soldering.
- Uses of Jumper Wires:
- Connecting components: You use them to connect various electronic components such as resistors, capacitors, LEDs, microcontrollers, and more on a breadboard.
- Bridging connections: Jumper wires bridge gaps between different rows or columns on the breadboard that do not connect electrically.
- Linking power supplies: You use them to connect the power supply (voltage and ground) to the breadboard’s power rails..
- Types of Jumper Wires:
- Male-to-Male: These have pins (metal tips) on both ends, used to connect between breadboard holes or between breadboard and a module.
Example: Connecting a component on a breadboard to another pin on the same or different breadboard.

Figure: A male-to-male jumper wire
- Male-to-Female: One end has a pin (male), and the other has a socket (female), used to connect a component with a male pin (e.g., sensors, microcontrollers) to a breadboard or power source.
Example: Connecting a sensor module to a breadboard or microcontroller.

Figure: A male-to-female jumper wire
- Female-to-Female: Both ends have sockets (female), used to connect components or modules with male pins directly.
Example: Connecting two devices like Arduino pins to another module.

Figure: A female-to-female jumper wire
- Pin Identification for Jumper Wires:
- Male Pins: These straight metal rods (usually protruding from the wire) you can insert into breadboard holes or female connectors.
Use: Ideal for inserting into a breadboard’s rows or power rails.
- Female Sockets: These are small, open-ended connectors that can accept male pins from components like Arduino boards, sensors, or other jumper wires.
Use: Users often connect them to male headers on devices like microcontrollers or shields.
- Color Coding for jumper wires:
Manufacturers often color-code jumper wires for easy identification.
- Red: Typically used for positive voltage.
- Black or Blue: Typically used for ground connections.
- Other Colors (Yellow, Green, etc.): Used for signal lines or additional voltage levels.

Figure: Colored jumper wires for easy connection management
- Proper Way to Use Jumper Wires on a Breadboard:
Connect Power Rails: Use red jumper wires to connect the positive rail of the breadboard to the power source, and black/blue jumper wires to connect the ground rail.
Component Connections: Use jumper wires to connect components in different rows or on different sides of the breadboard. For instance, connect an LED to a resistor, then use another jumper wire to connect the resistor to the power rail.
Avoid Short Circuits: Ensure jumper wires don’t touch each other improperly, as this can cause short circuits. Use appropriate lengths to keep the layout tidy.
Check Pin Compatibility: Always match male pins to female sockets or breadboard holes for proper connections.
Example:
If you’re connecting an LED to an Arduino:
- Use a male-to-male jumper wire to connect the LED’s anode (positive side) to the Arduino’s digital pin.
- Use another male-to-male wire to connect the LED’s cathode (negative side) to ground on the breadboard.
Summary:
- Jumper wires are essential for creating temporary, flexible connections in electronic circuits.
- They come in different types (male-to-male, male-to-female, female-to-female).
- Pin identification involves recognizing male pins (for breadboard or female socket insertion) and female sockets (for receiving male pins).
- Color codes help manage connections easily and link components, modules, and power sources in a circuit.
- Resistor
A resistor is an electronic component that limits or controls the flow of electrical current in a circuit. It provides a specific amount of resistance, measured in ohms (Ω), which reduces the current or divides voltages within a circuit. Resistors are fundamental in controlling and protecting other components in electronic circuits.
Resistors use Ohms (Ω) as the unit of measurement of their resistance (R). 1MΩ=1000kΩ, 1kΩ=1000Ω.


Figure: a resistor
The color bands on a resistor use a shorthand code to indicate its resistance value. For more details of resistor color codes, please refer to the card in the kit package
With a fixed voltage, increasing the resistance in the circuit reduces the current output. The relationship between current, voltage, and resistance follows Ohm’s Law, expressed by the formula I = V / R, where I is current, V is voltage, and R is resistance. Knowing the values of any two of these allows you to solve the value of the third. In the following diagram, the current through R1 is: I=U/R=5V/10kΩ=0.0005A=0.5mA.
WARNING: Never connect the two poles of a power supply with anything of low resistance value (i.e. a metal object or bare wire) this creates a short circuit and results in high current that may damage the power supply and electronic components.
- Pin Identification of a Resistor:Resistors typically have no polarity, meaning the pins (leads) are identical. You can connect them in any orientation, and both pins function the same way.
- How to Test a Resistor: To test a resistor, you can use a multimeter in resistance (ohms) mode. Here’s the proper way to test it:
- Set the Multimeter: Turn the multimeter dial to the resistance (Ω) setting. Choose the correct range based on the expected resistance value (or use auto-ranging if your multimeter supports it).
- Prepare the Resistor: Disconnect the resistor from the circuit to avoid interference from other components. Testing while it’s still in the circuit may give inaccurate readings.
- Connect the Probes: Touch one multimeter probe to each lead (pin) of the resistor. Since resistors are non-polarized, you can place either probe on either pin.
- Read the Value: The multimeter will display the resistance value in ohms. Compare this value with the resistor’s color code or labeled resistance to see if the resistor is within its tolerance range.
- Check for faults: If the reading shows infinite resistance or zero ohms, the resistor is either open (broken) or shorted, respectively, and you should replace it.
What is a Variable Resistor or Potentiometer?
A variable resistor, also known as a potentiometer or pot, adjusts resistance in a circuit. Unlike a fixed resistor, which has a constant resistance value, a variable resistor allows you to change the resistance by rotating or sliding a control. This makes them useful in applications like volume controls, dimmer switches, and tuning circuits.


Figure: Potentiometer and pin identification
- Pin Identification of a Potentiometer
A potentiometer has three pins:
- Pin 1 (one outer pin): One end of the resistive track.
- Pin 2 (middle pin): The wiper, which moves across the resistive track to adjust the resistance.
- Pin 3 (the other outer pin): The other end of the resistive track.
When you adjust the knob or slider, the wiper moves along the resistive element, changing the resistance between the middle pin (wiper) and the outer pins. The resistance between the two outer pins remains constant, but the resistance between the middle pin and either of the outer pins changes.
- How to Test a Potentiometer (Variable Resistor)
To test a potentiometer, you can use a multimeter in resistance (ohms) mode. Here’s the step-by-step method:
- Set the Multimeter:
Turn the multimeter dial to the resistance (Ω) setting.
- Test Resistance Between the Two Outer Pins (Fixed Resistance):
Connect one probe to Pin 1 and the other probe to Pin 3 (the two outer pins). The multimeter should show the total resistance of the potentiometer (which is a fixed value). This value should match the potentiometer’s rated resistance (e.g., 10kΩ or 100kΩ, depending on the type). If you measure the resistance between these two pins and get infinite or zero, the potentiometer may be damaged.
- Test Resistance Between the Middle Pin (Wiper) and One Outer Pin:
Connect one probe to Pin 2 (middle pin/wiper) and the other to Pin 1 (one outer pin). As you turn the knob or move the slider, the resistance should vary smoothly from near 0Ω to the maximum value (the fixed resistance between the outer pins). Watch the multimeter reading change as you adjust the potentiometer.
- Repeat with the Other Outer Pin:
Now, connect one probe to Pin 2 (middle pin) and the other to Pin 3 (the other outer pin). The resistance should change in the opposite direction as you adjust the knob or slider. Again, it should smoothly range from near 0Ω to the maximum resistance.
By following these steps, you can easily test whether your potentiometer or variable resistor is functioning properly.