• Raspberry Pi I2C Connection to Arduino

    Thomas Logan08/28/2020 at 22:45 0 comments

    This week, I've been working on upgrading the system by adding a Raspberry pi 3. The goal is for the Rpi to tell the Arduino to maintain the chamber at a specific pressure based on the needs of the current mission, and by listening to data readouts from the Arduino, the Rpi can respond with more commands accordingly. I'm using an I2C connection between the Rpi and Arduino, as the USB port will not be easily accessible when the system is housed in the chassis and is not secure enough for flight.

    I've configured the Rpi to send data over the I2C connection, and tested this with a simple Python code to turn on and off the Arduino's onboard LED. 

    I'm now exploring another simple code in which both the Rpi and Arduino send information to each other (the Rpi sends a byte, and the Arduino sends a byte in return). For this, I'm following the example code on this web page: https://roboticsbackend.com/raspberry-pi-master-arduino-slave-i2c-communication-with-wiringpi/ However, Python tells me I have a syntax error in the first line {int main (int argc, char **argv)} even though I copied it verbatim from their example!

    Once I solve this syntax problem, the real challenge will be figuring out how to write both the Python and Arduino codes to perform the tasks of operating a vacuum pump, opening and closing a solenoid, and reading a pressure sensor in order to regulate the pressure in the vacuum chamber. I don't have much coding experience myself, so any suggestions for first steps would be extremely helpful!

    Also, I created this simple schematic (which I've added to the images for this project) which shows how the various boards and devices are connected. We will be creating a custom board which integrates all these boards into a single board.

  • Vacuum pump operable from arduino shield; pressure sensor attached

    Thomas Logan08/06/2020 at 19:11 0 comments

    We've figured out how to operate both the solenoid and vacuum pump brushless motor from different pins on the same Arduino shield! The motor can simply turned on or off by supplying 5V from a MOSFET on the Arduino shield. 

    As for the pressure sensor, we've connected the positive lead to Analog pin 0 and ground to ground. We're using a code which either opens or closes a solenoid depending on whether this voltage on pin A0 is greater or less than 5 volts. When running the system at atmospheric pressure, the solenoid began sputtering wildly. We're not sure what the voltage scale on the pressure sensor is, so we don't know whether we should expect the solenoid to be open or closed at this pressure. We're considering using the serial monitor in Arduino to see what voltage is being supplied from the pressure sensor to the pin at this pressure.

  • Solenoid responding to environment

    Thomas Logan08/01/2020 at 18:54 0 comments

    The 12V solenoids have arrived and are operable from my current setup! I've written an arduino code in which the solenoid opens only when a voltage input passes a certain threshold. This means that, when the pressure sensor arrives, the system can be set up such that the voltage output from the sensor can operate the solenoid.

    We are also trying to determine whether we can operate multiple arduino shields running different codes from the same arduino UNO board. Both shields use pins in common, so it may not be possible to run code to both at once. Does anyone know whether it might be possible to run two different codes to the shields, if it is done not simultaneously? For example, a code could be run to one shield to open the solenoid, then immediately after, another code could be run to the other shield (which operates a vacuum pump) to pump gas into the chamber? Any thoughts would be appreciated!

  • Progress Log 1: Working Arduino Code

    Thomas Logan07/03/2020 at 22:18 0 comments

    I've created an arduino code to switch on and off the solenoid (a modified blink.io code). Right now the board outputs a maximum of 12V, and my Solenoid is 24V so isn't operable by the board. I tested the board on a smaller solenoid, though, and it started opening and closing! I tried wiring two of the arduino shield's output ports in series, but the voltage remained at 12V.

    Next steps are to order a 12V solenoid and a pressure sensor, so that the solenoid can be autonomously opened or closed by the arduino depending on the pressure in the chamber. I plan to use a DigiVac Model 276 (BASE) vacuum gauge which includes  a thermocouple vacuum gauge combined with a piezo sensor. Any insights on creating an arduino code for operating this system would be appreciated!