Biomedical Electronics Lab

1: Experiment: Design a voltage divider circuit using Resistors and Signal Generator and observe the output using Oscilloscope.

In this experiment, we will focus on creating a voltage divider circuit using resistors and a signal generator. The goal is to observe the output of this circuit using an oscilloscope. A voltage divider is a simple yet crucial circuit used to generate a fraction of an input voltage. This concept is widely used in various electronic systems. By the end of this experiment, you will be well-versed in constructing this circuit and analyzing its behaviour.

Components/Equipments Used: Before we begin, let's familiarize ourselves with the components and equipment we'll be working with. These include- 

Understanding Voltage Divider Circuit:

A voltage divider circuit is a simple electronic circuit used to divide a voltage into smaller fractions. It typically consists of two resistors in series, with an input voltage applied across them. The output voltage is taken from the connection between the two resistors. The ratio of the two resistor values determines how the input voltage is divided to produce the output voltage.

Given that the two resistors have the same value, the voltage divider ratio is 1:1. This means that the output voltage will also be half of the input voltage.


Voltage divider circuit 

If the input voltage is 5 volts peak to peak, the output voltage across Resistor R2 will be: 

Vout = Vin * (R2 / (R1 + R2)) By putting the values in the above equation: 

Vout = 5 * (10k / (10k + 10k)) 

Vout = 5 * (10k / 20k) 

Vout = 5 * 0.5 

Vout = 2.5 volts peak to peak 

Breadboard Implementation of the circuit

Voltage divider circuit in the breadboard

Results:

According to our given parameters, we have implemented the curcuit in the breadboard.  We have obtained the output voltage across Resistor R2 as 2.5 volts peak to peak. This is because the voltage divider circuit evenly splits the input voltage between the two resistors, resulting in a 1:1 ratio between the input and output voltages. You can explore the output by taking different values of resistors.


Output of the voltage divider circuit

2: Experiment: Design a Clamper and Clipper circuit  & observe the output using Oscilloscope.

First, let's explore the concept of a clamper circuit. Imagine you have a signal that fluctuates above and below a certain reference level. The clamping circuit's task is to shift this entire signal upwards or downwards while preserving its shape. In other words, it adds or subtracts a constant voltage to the input waveform.  There are two main types of clamper circuits: 

Positive Clamper Circuit: In a positive clamper circuit, the input signal is shifted upwards by adding a positive DC voltage level to it. 

Negative Clamper Circuit: In a negative clamper circuit, the input signal is shifted downwards by adding a negative DC voltage level to it.

Components/Equipments Used: Before we begin, let's familiarize ourselves with the components and equipment we'll be working with. These include- 

Positive clamper circuit 

This is the circuit diagram of a Positive clamper circuit that uses a diode and a capacitor to shift the entire waveform of an input signal upward by adding a DC voltage. 

Results:

Output of the Clamper circuit

Moving on to the clipper circuit, a clipper circuit is an electronic circuit that clips or limits the amplitude of an input signal at a specified level. In other words, it removes or "clips" any parts of the signal that exceed a certain threshold, effectively constraining the signal within a certain range. There are two main types of clipper circuits: 

Positive Clipper: This type of clipper circuit clips the negative portion of the input signal while allowing the positive portion to pass through unchanged.

Negative Clipper: In contrast, a negative clipper circuit clips the positive portion of the input signal while letting the negative part pass through unaltered.

Components/Equipments Used: Before we begin, let's familiarize ourselves with the components and equipment we'll be working with. These include- 

Positive series clipper circuit

This is circuit diagram of  a positive series clipper circuit that allows the negative portion of an input signal to pass through unchanged while clipping or cutting off the positive portion. This circuit is achieved by using a diode in series with the input signal.

Results:

Output of the clipper circuit

3: Experiment: Design & simulation of full wave rectifier circuit using LTspice.

Alternating current (AC) source constantly changes its polarity over time. This AC source might be the electricity coming from a power outlet, which oscillates between positive and negative values. However, many electronic devices require direct current (DC) to function properly. DC flows in only one direction, providing a consistent and steady voltage. Here's where the Full Wave Bridge Rectifier Circuit comes into play. Its primary purpose is to convert the AC input into a pulsating DC output.

In this experiment, we will design the circuit and simulate the circuit using LTspice simulation software.  You can follow this youtube video to perform the experiment.

Equipment Used: 

Positive Half-Cycle of AC: The top terminal of the AC source is positive, and the bottom terminal is negative. Diodes D2 and D3 are forward-biased, while D1 and D4 are reverse-biased. Current flows from the AC source through D2, then through the load resistor (R), and finally through D3. This allows current to flow through the load resistor in one direction, creating a positive pulsating DC output. 

Negative Half-Cycle of AC: The top terminal of the AC source becomes negative, and the bottom terminal becomes positive. Now, diodes D1 and D4 become forward-biased, while D2 and D3 are reverse-biased. Current flows from the source through D4, then through the load resistor, and finally through D1. 

Full wave bridge rectifier circuit without smoothing capacitor

Results:

In the below screenshot, the green-coloured signal is the AC input and blue-coloured graph is the pulsating DC output.

Output of the full wave bridge rectifier circuit

Check the output after connecting a capacitor:

To smooth out this pulsating DC output, a capacitor is added in parallel with the load resistor. This capacitor is known as a smoothing or filter capacitor. Its primary function is to store charge when the voltage across it is high and release that charge when the voltage drops, effectively filling in the gaps between voltage peaks. 

You can see below blue-coloured graph is the smoothen version of pulsating dc output.

Full wave bridge rectifier circuit with smoothing capacitor

Output of the full wave bridge rectifier circuit after using smoothing capacitor

4: Experiment: Design of Inverting amplifier using op-amp.

In this experiment, we'll explore how to design and build an inverting amplifier using an op-amp on a breadboard. Op-amps are versatile integrated circuits commonly used in a variety of analog electronic circuits, and inverting amplifiers are one of the fundamental applications of op-amps.

Inverting opamp circuit

Let's consider,

Feedback Resistor (Rf): 20 kΩ

Input Resistance (R1): 10 kΩ

 Input Voltage (Vin): 5 V peak-to-peak 

Step 1: Calculate Gain (Av): The gain of an inverting amplifier is given by the formula: 

Av = -Rf / R1 

Av = -20 kΩ / 10 kΩ = -2 

The negative sign indicates that the output is inverted with respect to the input. 

Step 2: Calculate Output Voltage: The output voltage of the inverting amplifier is given by the formula: 

Vout = Av * Vin 

Vout = -2 * 5 V = -10 V peak to peak

Result:

The output will be inverted . The output will be phase-shifted by 180 degrees with respect to the input. The amplitude of the output waveform will be doubled compared to the input amplitude. These characteristics result from the inverting amplifier's inherent properties and the gain of -2 in this specific case.

Inverting amplifiers are essential building blocks in electronics, allowing us to modify signal amplitude and phase relationships. By understanding the basic concepts and design steps, you can create effective inverting amplifier circuits and expand your knowledge in analog electronics.

Output of the inverting opamp

5: Experiment: Reading analog value from FSR sensor using ESP32.

The objective of this lab experiment is to read analog values from a Force-Sensitive Resistor (FSR) sensor using an ESP32 microcontroller. By measuring the resistance changes in the FSR, we will be able to obtain analog readings and display them on the ESP32.

Components Needed: 

Circuit Diagram

Arduino IDE code: 

int fsrPin = 35; // Analog input pin for FSR sensor

 int fsrReading = 0;

void setup() {

  Serial.begin(9600);

}

void loop() {

  // Read the analog value from the FSR sensor

  fsrReading = analogRead(fsrPin);

 // Print the analog reading to the serial monitor

  Serial.println(fsrReading);

  delay(1000);

}

Results

In this lab experiment, we successfully interfaced a Force-Sensitive Resistor (FSR) sensor with an ESP32 microcontroller and read analog values from the sensor. By measuring the resistance changes in the FSR, we were able to obtain analog readings that can be used for various applications, such as detecting pressure or touch.  This experiment demonstrates the basic principles of analog sensing using the ESP32 microcontroller.

6: Experiment: Water level control using ESP32, Pump and Water level sensor.

The objective of this lab experiment is to design a water level control system using an ESP32 microcontroller, a water level depth sensor, and a buzzer. The system should be able to detect the water level in a glass and trigger a buzzer when the glass is full.

Components Needed: 

Circuit Diagram:

Arduino code:

#define MOTOR_PIN 25 // ESP32 pin GPIO25 connected to relay's IN pin

#define BUZZER_PIN 33 // ESP32 pin GPIO33 connected to buzzer

#define SIGNAL_PIN 27 // ESP32 pin GPIO27 connected to water sensor's signal pin

int watervalue = 0; // variable to store the sensor value

void setup() {

  Serial.begin(9600);

  pinMode(BUZZER_PIN, OUTPUT);   // configure pin as an OUTPUT

  pinMode(MOTOR_PIN, OUTPUT);   // configure pin as an OUTPUT

  digitalWrite(BUZZER_PIN, LOW); // turn the BUZZER OFF

}

void loop() 

{

  watervalue = analogRead(SIGNAL_PIN);           // read the analog value from  water level sensor

  if(watervalue>1000)

  {

   digitalWrite(BUZZER_PIN, HIGH);  // turn the buzzer ON

   digitalWrite(MOTOR_PIN, HIGH); // turn the MOTOR OFF- RELAY IS ACTIVE LOW

    }

  else

   {

  digitalWrite(BUZZER_PIN, LOW);   // turn the BUZZER OFF

  digitalWrite(MOTOR_PIN, LOW);   // turn the MOTOR ON- RELAY IS ACTIVE LOW

   }

  Serial.print("The water sensor value: ");

  Serial.println(watervalue);

  delay(1000);

}

Results:

Implentation of the circuit

7: Experiment: Design an opamp filter to measure blood volume pulse using LDR.

Designing an op-amp-based filter circuit for measuring a blood volume pulse using an LDR (Light Dependent Resistor) and a flashlight involves creating both a bandpass filter to extract the desired signal and a DC removal filter to eliminate the constant component. 

Components Needed: 

Circuit for opamp filter to measure blood volume pulse

Steps:

Pin Diagram  for LM324

Cut-off frequencies calculation for Band pass filter:

f1 =1/2πR1C1

Putting in the values as per the circuit, R1 = 15K, and C1 = 100μF;

f1 = 0.106Hz

Similarly, f2 = 1/2πR2C2

Putting in the values as per the circuit, R2 = 1.5K, and C2 = 1μF;

f2 = 106.1Hz

Observation of output in Lab

Observation of output in Lab

Observation: