Showing posts with label Week 5. Show all posts
Showing posts with label Week 5. Show all posts

Wednesday, May 6, 2015

Week 5 (Outside Lab) - GUI and Application

This meeting yielded a lot of progress on the software side of things. For the blinking LED control application, the team was able to figure out how to create a termination button in the GUI, and also implemented an 'Apply' button to allow the input values to be freely adjusted before they're sent to the Arduino. The slider was also changed to a spin box, to make it easier for the user to set the desired value. Once this worked, the next step was to create the ability for the on-time and off-time of the LED separately, which more closely mirrors the function of the PlantParent controller. This was achieved by adding an extra loop in the Arduino code and another spin box to the Qt interface.

Figure 1. Blinking LED controller GUI (functional).

The final look of the blinking LED controller is seen in Figure 1. This program was fully functional, which was extremely encouraging and exciting for the team.

After this, Davina duplicated the Qt code and created the appearance of the PlantParent controller using Style Sheets (based on CSS) in Qt Designer. This is seen in Figure 2, and is still nonfunctional at this point.

Figure 2. PlantParent controller GUI (nonfunctional).
Not shown: 'Apply' and 'Cancel' buttons change appearance when hovered over or pressed. 

Friday, May 1, 2015

Week 5 (Outside Lab) - Wiring Relay, Pt. 2

Figure 1. Physical structure of the pump-related components of the relay system.
At this meeting, the pump-related parts of the relay structure were connected using the alligator cables and electrical tape, as shown in Figure 1. This is not the complete relay structure, which will involve the breadboard and Arduino in order to implement the control system.
Davina also experimented with creating a new GUI in Qt to integrate with the blinking LED Arduino serial sketch. She was able to make a GUI very similar to the last, in which a slider supposedly allowed the user to adjust the interval between blinks, but because of the loop structure of the code, only the first integer registered (being 1) went through, so the LED could only blink at intervals of one second. There are still complications on creating a termination button in the GUI, but they should be figured out pretty quickly. Figure 2 shows a snippet of code and some errors in building the application.

Figure 2. Application output issues with the custom Qt application.

Thursday, April 30, 2015

Week 5 (In Lab) - Wiring Relay

Today, we had another very insightful lab. The team first visited the electrical materials department for advice and supplies concerning the setup of the relay structure. After getting some information from the department on current, circuits, breadboards, and the relay itself, the team split up to focus on certain tasks, which are described below.
  • Davina continued to familiarize herself with the software to be used for the control application. She was able to create a sketch for the Arduino that would blink an LED endlessly at intervals defined by a serial command, and also allowed a termination command to come through the serial port.
  • Michelle altered the pump to secure any leakage by re-glueing and taping down the open area. The hot glue from last week's modification had begun to peel away because it doesn't bind well to plastic, so the addition of tape is a hopefully permanent solution. 
  • Le and Parmpuneet got started on the relay while consulting both Dr. Boettcher and the electrical materials department, understanding the importance of precision when working with AC power. After some time, the final relay was designed, as can be seen in Figure 1.
    • With the plug cut off the pump, the power cable's "hot" and "neutral" wires were separated and stripped. Using alligator cables, the hot of the power cable will be attached to the normally open pin on the relay - this will be wrapped in electrical tape to prevent shorts, as will all further steps. 
    • Meanwhile, the hot and neutral wires of the severed plug will also be split and stripped. The hot of this section will be attached to the "com" pin of the relay using alligator clips. 
    • The two neutrals will be twisted together. 
    • The +5V of the Arduino will attach to the coil opposite the normally open pin, an the ground will connect to the coil opposite the normally closed pin. 

Figure 1. A diagram of the entire relay structure, including the pump on the top right, part of the power cable on the bottom right, the relay in the center, and the power-supplying plug on the bottom left.