Iteration 3: Explore Phase

In Iteration 3: Explore Phase, I worked on finalizing my prototype to create a presentable and working piece of hardware. Below is a list of my work planned for this phase of the project.

  • Mount all hardware into final housing prototype (4 hours to account for the possibility of messing up and doing this twice) -5
  • Laser Cut and edit final housing design to account for second aroma release component, better LCD screen fit, battery access for the LEDs and access to aroma capsules (6 hours to measure new pieces, buying hardware, setting appointments, and driving around) – 5
  • Develop more housing design ideas through sketches and possible 3D modeling ( 2-4 hours depending on time) – 5
  • LCD countdown component for the time the parent has to place food on the scale (4 hours to code and test) – 5
  • Development of one more aroma release component for testing scents (3-4 hours to drive around, soldering, code and incorporation into my prototype) – 5
  • Laser Cut and install acrylic stars for LED component (3 hours to set up appts, laser cut, and install (includes transportation time) – 5

Now, I will go into detail the work I did for each of these steps and how I prioritized my work.

Editing and Laser Cutting Final Housing Design: On my first housing prototype, the LCD screen area on the side of the plate was a little too wide and would not allow for the interior mounting of the LCD screen. This was because I accounted too much for a component behind the screen when measuring the LCD screen’s dimensions. I then went back, and used calipers to create product drawings of the LCD screen and Arduino so that I could have accurate cut outs for the two pieces in my housing prototype.

I then used MakerCase to create the box for my main base plate, and my LED star tracker. I had the main plate dimensions from Explore Phase 2, and I just had to make the LED star tracker box. I made the box the same width as my plate, and only made the depth much shorter.

I then used Adobe Illustrator to add all other cut outs to my plate design and star tracker in Adobe Illustrator, using the dimensions I measured in the sketches above.

I then laser cut these pieces, and constructed them which is seen in the Mount Hardware section below.

Laser Cut, Paint, and Install Acrylic Stars: Based on my star tracker board from above, I used Adobe Illustrator to add stars to my design which I then laser cut out of acrylic. After the stars were laser cut, I painted them with a frosted glass paint, so that they would not be as see through and diffuse the light from the interior of the box a little better. Below are my laser cut stars being painted, the installation of the stars, and what they looked like at the end.

Development of One More Aroma Release Component: Since the aroma release component is releasing scented air into a room, the sponsor requested that I add one more component so that more air can be released into large spaces. For this element of this phase, I had to order one more mini air compressor and solder the components together. I then had to add the code to my Arduino sketch to control the air release component. One thing that I changed during this phase was that instead of the aroma release looping and occurring frequently, I moved the code to the Setup function of the sketch. This way, when all of the components are initializing, the compressors will pump air while food is being served. This will be better for creating and setting an eating environment, compared to pumping air while the plate is in use.

LCD Countdown Feature for Meal Serving: Initially, I wanted to add a countdown timer to the LCD screen that lets parents know how much time they have to serve food once the scales are tared and before the plate assumes the food has been served (because continuous weight readings are being grabbed). I told my sister this (target user as she has a kid that’s 5), and she said that the timer would stress her out while using the plate. Instead, I changed the LCD to display that the plate is on and for food to be served. This occurs after the scales are zeroed, and before the weight readings continuously begin. Then, once the time to serve the meal is over, the LCD screen displays “Enjoy your meal!”. The actually time to serve the food has been 20 seconds during testing, but can easily be changed. Once I know the ideal time from parents for the serving food time, I can enter it in a user manual to let them know the exact time.

Mount All Hardware into Final Housing Prototype: What took the most time for this project was the final construction of the plate. I first had to construct the plate from my laser cut pieces. Before I did that, I painted all of the pieces their final color. After constructing the plate, I embedded the Arduino, and my LCD screen on the side of the plate. Next, I had to mount my load cells, and I used pieces of wood for this. I mounted my load cell to the wood, utilizing nuts to create space between the load cell and base. I then attached the force plate to the load cell, and again used nuts to create space between the plate and the load cell. This was the hardest part of this phase due to testing and the various trips to home depot for the right nuts and screws. At first, without the nuts as spacers, I was not getting very sensitive weight readings. Also, the force plate was not very secure to the load cell. After various sets of troubleshooting, I found that adding the spacers, using wood screws to secure the load cell to the base, and using machine screws to secure the force plate to the load cell worked best. After this, I added mounting brackets to the back of the plate to hold up the star board tracker on the back end of the plate. I also added an opening and closing door to allow for access to the aroma capsules. Lastly, I constructed the star tracker. For this, I had to do it a little differently than for the plate because it is a closed box. Initially, I constructed 3/4 of the box without the front piece on. I then inserted the LED strip, added the acrylic stars to the front piece, then finished constructing the box. Also, since I was also only using 20 LEDs now, not an entire strip, I did not have to continue using an external power source for the LED strip. Now all components of my project are powered by the power source controlling the Arduino.

Demo Video:

Troubleshooting Based on Video: As you can see at the end of the video, most of the stars are lit up with still the car on the back scale. This is because after some testing, I realized that the scales were each providing slightly different weights for the same item (I weighed my iphone on each scale as a test by looking up its weight online). To then calibrate each scale correctly, I retested calibration factors for each scale until the weight was displaying correctly. Now, the project works a little more accurately.

The image on the left shows the scales providing accurate readings for the same object and the image on the right shows the changed calibration factors for each scale. Initially I only had one calibration factor but then I went back and created three, one for each scale.

Code: Below is the code powering my project.

#include <SoftwareSerial.h>
#include <FastLED.h>
#include <HX711.h>
SoftwareSerial OpenLCD(6,4);
byte counter = 0;
byte contrast = 2;

#define LED_PIN  9
#define NUM_LEDS  20
CRGB leds[NUM_LEDS];

float initsum, currsum, iw1, iw2, iw3, cw1, cw2, cw3;
#define calibration_factor1 850000//This value is obtained using the SparkFun_HX711_Calibration sketch
#define calibration_factor2 900000//This value is obtained using the SparkFun_HX711_Calibration sketch
#define calibration_factor3 850000//This value is obtained using the SparkFun_HX711_Calibration sketch





#define DOUT1  3
#define CLK1  2

#define DOUT2 11
#define CLK2 12

#define DOUT3 6
#define CLK3 7

HX711 scale1;
HX711 scale2;
HX711 scale3;

int pumpPin = 8;
int pumpPin2 = 13;

void setup() {

  Serial.begin(9600);
  
  iw1 = 0.0000;
  iw2 = 0.0000;
  iw3 = 0.0000;
  initsum = 0.0000;

  

  pinMode(pumpPin, OUTPUT);
  pinMode(pumpPin2, OUTPUT);

  
  digitalWrite(pumpPin, HIGH);
  digitalWrite(pumpPin2, HIGH);
  delay(1000);
  digitalWrite(pumpPin, LOW);
  digitalWrite(pumpPin2, LOW);
  delay(5000);

  digitalWrite(pumpPin, HIGH);
  digitalWrite(pumpPin2, HIGH);
  delay(1000);
  digitalWrite(pumpPin, LOW);
  digitalWrite(pumpPin2, LOW);
  delay(5000);

  digitalWrite(pumpPin, HIGH);
  digitalWrite(pumpPin2, HIGH);
  delay(1000);
  digitalWrite(pumpPin, LOW);
  digitalWrite(pumpPin2, LOW);
  delay(5000);

  digitalWrite(pumpPin, HIGH);
  digitalWrite(pumpPin2, HIGH);
  delay(1000);
  digitalWrite(pumpPin, LOW);
  digitalWrite(pumpPin2, LOW);
  delay(5000);


  digitalWrite(pumpPin, HIGH);
  digitalWrite(pumpPin2, HIGH);
  delay(1000);
  digitalWrite(pumpPin, LOW);
  digitalWrite(pumpPin2, LOW);
  delay(5000);
  /*
   * 
   */
  Serial.begin(9600);
  while (!Serial);
  Serial.println("Start");
  
  FastLED.addLeds<WS2812, LED_PIN, GRB>(leds, NUM_LEDS);
  
  Serial.println("HX711 scale demo");

  scale1.begin(DOUT1, CLK1);
  scale1.set_scale(calibration_factor1); //This value is obtained by using the SparkFun_HX711_Calibration sketch
  scale1.tare(); //Assuming there is no weight on the scale at start up, reset the scale to 0

  scale2.begin(DOUT2, CLK2);
  scale2.set_scale(calibration_factor2);
  scale2.tare();

  scale3.begin(DOUT3, CLK3);
  scale3.set_scale(calibration_factor3);
  scale3.tare();
  Serial.println("Place Weight");

  OpenLCD.begin(9600);


  OpenLCD.write('|');
  OpenLCD.write(24);
  OpenLCD.write(contrast); 

  OpenLCD.print("Plate on, Serve Food");
  delay(20000);

  iw1 = (scale1.get_units());
  iw2 = (scale2.get_units());
  iw3 = (scale3.get_units());

  
  initsum = iw1 + iw2 + iw3; // wait 30 seconds to grab an initial value to used as initial food weight value
  Serial.println(initsum);
  


  

  Serial.println("Readings:");

  OpenLCD.begin(9600);
  

  OpenLCD.write('|');
  OpenLCD.write(24);
  OpenLCD.write(contrast);
 
    
}

void loop() {

  OpenLCD.write('|');
  OpenLCD.write('-'); //set contrast and clear LCD
 

  OpenLCD.print("Enjoy Your Meal!");

  cw1 = 0.0000;
  cw2 = 0.0000;
  cw3= 0.0000;
  currsum = 0.0000;

  cw1 = (scale1.get_units());
  cw2 = (scale2.get_units());
  cw3 = (scale3.get_units());


  currsum = cw1 + cw2 + cw3;
  

  Serial.print("Initial Weight:  ");
  Serial.print(initsum);
  Serial.print(" lbs");
  Serial.print("/t  ");
  
  Serial.print("Current Weight:  ");
  Serial.print(currsum);
  Serial.print(" lbs");
  Serial.print("/t  ");
  

 
  Serial.print("Scale 1 Reading: ");
  Serial.print(scale1.get_units(), 3); //scale.get_units() returns a float
  Serial.print(" lbs"); 
  Serial.print("/t  "); //tab so that the readings are evenly spaced across on serial monitor

  Serial.print("Scale 2 Reading: ");
  Serial.print(scale2.get_units(), 3); //scale.get_units() returns a float
  Serial.print(" lbs"); 
  Serial.print("/t  ");

  Serial.print("Scale 3 Reading: ");
  Serial.print(scale3.get_units(), 3); //scale.get_units() returns a float
  Serial.print(" lbs"); 
  Serial.print("/t  ");
  Serial.println();

  if(currsum > initsum*0.9){
  // if(currsum > initsum*0.9) {
  
  leds[0] = CRGB(255, 70, 0);
  leds[1] = CRGB(255, 70, 0);
  FastLED.show();
  delay(500);
  }
  else if(currsum > initsum*0.8) {
  // if(currsum > initsum*0.8) {
  leds[0] = CRGB(255, 70, 0);
  leds[1] = CRGB(255, 70, 0);
  leds[2] = CRGB(255, 70, 0);
  leds[3] = CRGB(255, 70, 0);
  FastLED.show();
  delay(500);
  }
  else if(currsum > initsum*0.7) {
  // if(currsum > initsum*0.7) {
  leds[0] = CRGB(255, 70, 0);
  leds[1] = CRGB(255, 70, 0);
  leds[2] = CRGB(255, 70, 0);
  leds[3] = CRGB(255, 70, 0);
  leds[4] = CRGB(255, 70, 0);
  leds[5] = CRGB(255, 70, 0);
  FastLED.show();
  delay(500);
  }
  else if(currsum > initsum*0.6) {
  // if(currsum > initsum*0.6) {
  leds[0] = CRGB(255, 70, 0);
  leds[1] = CRGB(255, 70, 0);
  leds[2] = CRGB(255, 70, 0);
  leds[3] = CRGB(255, 70, 0);
  leds[4] = CRGB(255, 70, 0);
  leds[5] = CRGB(255, 70, 0);
  leds[6] = CRGB(255, 70, 0);
  leds[7] = CRGB(255, 70, 0);
  FastLED.show();
  delay(500);
  }
  else if(currsum > initsum*0.5) {
  // if(currsum > initsum*0.5) {
  leds[0] = CRGB(255, 70, 0);
  leds[1] = CRGB(255, 70, 0);
  leds[2] = CRGB(255, 70, 0);
  leds[3] = CRGB(255, 70, 0);
  leds[4] = CRGB(255, 70, 0);
  leds[5] = CRGB(255, 70, 0);
  leds[6] = CRGB(255, 70, 0);
  leds[7] = CRGB(255, 70, 0);
  leds[8] = CRGB(255, 70, 0);
  leds[9] = CRGB(255, 70, 0);
  FastLED.show();
  delay(500);
  }
  else if(currsum > initsum*0.4) {
  // if(currsum > initsum*0.4) {
  leds[0] = CRGB(255, 70, 0);
  leds[1] = CRGB(255, 70, 0);
  leds[2] = CRGB(255, 70, 0);
  leds[3] = CRGB(255, 70, 0);
  leds[4] = CRGB(255, 70, 0);
  leds[5] = CRGB(255, 70, 0);
  leds[6] = CRGB(255, 70, 0);
  leds[7] = CRGB(255, 70, 0);
  leds[8] = CRGB(255, 70, 0);
  leds[9] = CRGB(255, 70, 0);
  leds[10] = CRGB(255, 70, 0);
  leds[11] = CRGB(255, 70, 0);
  FastLED.show();
  delay(500);
  }
  else if(currsum > initsum*0.3) {
  // if(currsum > initsum*0.3) {
  leds[0] = CRGB(255, 70, 0);
  leds[1] = CRGB(255, 70, 0);
  leds[2] = CRGB(255, 70, 0);
  leds[3] = CRGB(255, 70, 0);
  leds[4] = CRGB(255, 70, 0);
  leds[5] = CRGB(255, 70, 0);
  leds[6] = CRGB(255, 70, 0);
  leds[7] = CRGB(255, 70, 0);
  leds[8] = CRGB(255, 70, 0);
  leds[9] = CRGB(255, 70, 0);
  leds[10] = CRGB(255, 70, 0);
  leds[11] = CRGB(255, 70, 0);
  leds[12] = CRGB(255, 70, 0);
  leds[13] = CRGB(255, 70, 0);
  FastLED.show();
  delay(500);
  }
  else if(currsum > initsum*0.2) {
  // if(currsum > initsum*0.2) {
  leds[0] = CRGB(255, 70, 0);
  leds[1] = CRGB(255, 70, 0);
  leds[2] = CRGB(255, 70, 0);
  leds[3] = CRGB(255, 70, 0);
  leds[4] = CRGB(255, 70, 0);
  leds[5] = CRGB(255, 70, 0);
  leds[6] = CRGB(255, 70, 0);
  leds[7] = CRGB(255, 70, 0);
  leds[8] = CRGB(255, 70, 0);
  leds[9] = CRGB(255, 70, 0);
  leds[10] = CRGB(255, 70, 0);
  leds[11] = CRGB(255, 70, 0);
  leds[12] = CRGB(255, 70, 0);
  leds[13] = CRGB(255, 70, 0);
  leds[14] = CRGB(255, 70, 0);
  leds[15] = CRGB(255, 70, 0);
  FastLED.show();
  delay(500);
  }
  else if(currsum > initsum*0.1) {
  // if(currsum > initsum*0.1) {
  leds[0] = CRGB(255, 70, 0);
  leds[1] = CRGB(255, 70, 0);
  leds[2] = CRGB(255, 70, 0);
  leds[3] = CRGB(255, 70, 0);
  leds[4] = CRGB(255, 70, 0);
  leds[5] = CRGB(255, 70, 0);
  leds[6] = CRGB(255, 70, 0);
  leds[7] = CRGB(255, 70, 0);
  leds[8] = CRGB(255, 70, 0);
  leds[9] = CRGB(255, 70, 0);
  leds[10] = CRGB(255, 70, 0);
  leds[11] = CRGB(255, 70, 0);
  leds[12] = CRGB(255, 70, 0);
  leds[13] = CRGB(255, 70, 0);
  leds[14] = CRGB(255, 70, 0);
  leds[15] = CRGB(255, 70, 0);
  leds[16] = CRGB(255, 70, 0);
  leds[17] = CRGB(255, 70, 0);
  FastLED.show();
  delay(500);
  }
  else if(currsum > initsum*0.05) {
    // if(currsum > initsum*0.05) {
  
  leds[0] = CRGB(255, 70, 0);
  leds[1] = CRGB(255, 70, 0);
  leds[2] = CRGB(255, 70, 0);
  leds[3] = CRGB(255, 70, 0);
  leds[4] = CRGB(255, 70, 0);
  leds[5] = CRGB(255, 70, 0);
  leds[6] = CRGB(255, 70, 0);
  leds[7] = CRGB(255, 70, 0);
  leds[8] = CRGB(255, 70, 0);
  leds[9] = CRGB(255, 70, 0);
  leds[10] = CRGB(255, 70, 0);
  leds[11] = CRGB(255, 70, 0);
  leds[12] = CRGB(255, 70, 0);
  leds[13] = CRGB(255, 70, 0);
  leds[14] = CRGB(255, 70, 0);
  leds[15] = CRGB(255, 70, 0);
  leds[16] = CRGB(255, 70, 0);
  leds[17] = CRGB(255, 70, 0);
  leds[18] = CRGB(255, 70, 0);
  leds[19] = CRGB(255, 70, 0);
  FastLED.show();
  delay(500);}


}

Summary: Overall, I accomplished all of my goals for the iteration. The only place I didn’t was regarding future plate designs. I set aside time to come up with some more plate designs, but ended up spending more time troubleshooting mounting the load cells and getting uniform weight readings from the load cells. To me, it was more important to come up with a complete and more accurate prototype, than to ideate on things I will not create this semester. The two hours I had set aside for this ideation easily went into the hours bucket for mounting the hardware. I am set up well to get sponsor feedback, user feedback, and present this project. All I have left is some small cosmetic touch ups around painting, my demo video, presentation, and final documentation to complete.

Hours Worked:

  • 24 Total Hours
  • Mount all hardware into final housing prototype (8 hours to account for the possibility of messing up and doing this twice)
  • Laser Cut and edit final housing design to account for second aroma release component, better LCD screen fit, battery access for the LEDs and access to aroma capsules (5 hours to measure new pieces, buying hardware, setting appointments, and driving around)
  • LCD countdown component for the time the parent has to place food on the scale (4 hours to code and test)
  • Development of one more aroma release component for testing scents (3-4 hours to drive around, soldering, code and incorporation into my prototype)
  • Laser Cut and install acrylic stars for LED component (3 hours to set up appts, laser cut, and install (includes transportation time)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website with WordPress.com
Get started
%d bloggers like this: