top of page

Flowchart

Flowchart: News
Programming Console

 Libraries

The code on the Arduino starts by initializing all the libraries required for the certain sensors used. For example, the LCD display uses an I2C module which allows the LCD to use a minimum of 4 wire connections instead of 14 wire connections so the library LiquidCrystal_I2C.h is used so the coder can easily manipulate the LCD with ease. The proximity sensor uses the library Adafruit_VCNL4010.h and the temperature sensors use the library DallasTemperature.h. The liquid level sensor does not require a library because it reads values as either HIGH or LOW which makes it easy for coding if water is in the Cooling Loop Reservoir or not. This sensor is extremely important because if there is not enough water in the Cooling Loop Reservoir, the water pump inside can burn out and become hazardous to the safety of the user.

GrovePi_Home_Weather_Station_display.jpg

Initializations

After all the libraries are defined, the LCD display I2C address and the temperature sensor address needed to be defined to the Arduino. The address can be found using example codes online to installed on the Arduino which then feedback the sensor’s address. These addresses allow for multiple sensors to be connected to the same bus, or same Arduino pin, for easier wiring. The last things to be initialized are the ports for the relays. There are a total of 9 relays used in the Peltice system. Each Peltier Module uses one relay since the relays are rated for up to 10 Amps max and a single Peltier Module can achieve up to 6 Amps max. Then there is a relay for the Water Pump for the Liquid Cooling and the Water Pump for the Cooling Loop Reservoir. Finally, there is a relay for the Dispensing Peristaltic Pump. These relays allow the Arduino to control high voltage devices with low voltage signals. All the equipment used within Peltice are 12 Volts and the Arduino uses 5 Volts. Lastly, the code initializes the Liquid Level sensor so it can be referenced later in the code.

Electronic Circuit

Setup

Once everything is initialized, the next part of the code setups the Arduino for the looping portion of the code. The setup can also be referenced as the boot-up. In this portion, the temperature sensor library is initialized, the proximity sensor is tested to make sure the dispenser will operate, and the LCD displays the boot-up message. This message features the team project’s name, team members, and lets the user know the readings are in Fahrenheit. Finally, the setup denotes which pins are going to be outputs and inputs for receiving data or giving out signals.

liquid level sensor.jpg

 Loop

The code for the loop begins with an if-else statement. This statement checks to see if there is enough water in the Cooling Loop Water Reservoir by using the Liquid Level Sensor. The operation of a Liquid Level Sensor is described in. If the sensor reads there is not enough water, the code will then go through a mini loop which only tells the Peltier Modules to turn off, the Cooling Loop Water Pump to turn off, and gives the user a warning message through the LCD display. If there is enough water in the reservoir, the code will operate as usual.
Once the water level needs for the Cooling Loop reservoir is met, the code then reads the temperature reading from the two sensors. The temperature sensors are placed within the cooler and inside of the Cooling Loop Water Reservoir. These two areas are important because ice is placed within the Cooling Loop Water Reservoir to “kick start” the Peltice system. This step is similar in the way electric scooters operate. The user must get the scooter to a certain speed before the electric motor takes over and controls the speed of the scooter. Peltier modules “efficiency” are pretty low so cooling the juice, or product, would take hours just to achieve a 3 degree Fahrenheit drop. Once the temperatures are read, it is displayed on the LCD so the user can read if the product is cooled enough or add more ice to the system if the Cooling Loop Reservoir temperature starts to rise. Finally, another if-else statement for the dispensing is added. If an object, preferably a cup, is within a 1-centimeter distance from the sensor, the sensor will then tell the Arduino to turn on the relay that connects the Dispensing Peristaltic pump to then dispense the product in the user’s cup. At then, there is a 1 second delay and the code starts from the beginning of the loop once again.

©2018 by PELTICE. Proudly created with Wix.com

bottom of page