Tyler Roman- Inflatables Lab 5 (Mikesell)

 For this lab, I partnered with Isabella Baranyk and Maya Williams to use Arduino to control and measure an air pressure sensor.

The materials used were an Arduino, Breadboard, wires, air pump, valve, power source, IP 120 transistor, diode, voltage regulator, pressure sensor, and an inflatable square of TPU coated fabric

In the lab using the materials, we created two circuits, the first being a circuit designed to cycle through various high and low states, inflating and deflating an inflatable as they change.


While I was soldering the wires to the air pump, Maya and Isabella used the digital multimeter to ensure that the voltage was correct before plugging the circuit into any power sources. Our circuit needed about volts of outside power from a secondary source which they measured pretty accurately as seen below.


When the circuit was finished we connected the air pump to the valve with some small plastic tubing and then attached the inflatable square made of TPU coated fabric to the valve and successfully inflated it, but not deflating. After a while, we realized we still needed the power from the secondary source. Once the power was connected the finished circuit could both inflate and deflate the square. In the video we recorded you can hear the clicking of the valve that shows that air pressure is being released from the system.

The second circuit we constructed involved us adding a pressure sensor to our previous circuit. Then, after inputting an Arduino code for pressure sensing provided to us by Professor Mikesell, we connected a syringe to the open end of the valve with plastic tubing. By using the syringe and a serial monitor we were able to look at and calculate the air pressure/the change in air pressure. The maximum pressure we reached was a little over 30 which is supposedly about the highest you can reach. You can see some video of this below.

Credits to Maya Williams for photos/video


// Code to Control Valve
void setup() {
 // initialize digital pin LED_BUILTIN as an output.
 pinMode(6, OUTPUT);

// the loop function runs over and over again forever
void loop() {
 digitalWrite(6, HIGH); // turn the LED on (HIGH is the voltage level)
 delay(10000); // wait for a second
 digitalWrite(6, LOW); // turn the LED off by making the voltage LOW
 delay(1000); // wait for a second

//Pressure sensor code

#include "Wire.h"
#include <Arduino.h>

#define sensor_I2C 0x28 // each I2C object has a unique bus address, the DS1307 is 0x68
#define OUTPUT_MIN 1638.4 // 1638 counts (10% of 2^14 counts or 0x0666)
#define OUTPUT_MAX 14745.6 // 14745 counts (90% of 2^14 counts or 0x3999)
#define PRESSURE_MIN 14.5 // min is 0 for sensors that give absolute values
#define PRESSURE_MAX 100 // 1.6bar (I want results in bar)
float psi = 0; // 14.5 psi is pressure at sea level

void setup()
 Wire.begin(); // wake up I2C bus
 delay (500);

void loop()
 float pressure, temperature;
 //send a request
 Wire.beginTransmission(sensor_I2C); // "Hey, CN75 @ 0x48! Message for you"
 Wire.write(1); // send a bit asking for register one, the data register (as specified by the pdf)
 Wire.endTransmission(); // "Thanks, goodbye..."
 // now get the data from the sensor
 delay (20);

Wire.requestFrom(sensor_I2C, 4);
 while (Wire.available() == 0);
 byte a = Wire.read(); // first received byte stored here ....Example bytes one: 00011001 10000000
 byte b = Wire.read(); // second received byte
 byte c = Wire.read(); // third received byte stored here
 byte d = Wire.read(); // fourth received byte stored here

byte status1 = (a & 0xc0) >> 6; // first 2 bits from first byte
 //Serial.println(status1, BIN);

int bridge_data = ((a & 0x3f) << 8) + b;
 int temperature_data = ((c << 8) + (d & 0xe0)) >> 5;

 temperature = (temperature_data * 0.0977) - 50;

 Serial.print("PSI ");

Serial.print("temperature (C) ");

delay (500);

Leave a Reply