Sous-Chef: the Recipe Assistant

by almale20 in Circuits > Arduino

238 Views, 0 Favorites, 0 Comments

Sous-Chef: the Recipe Assistant

IMG_1725.JPG

Sous-Chef is a robot designed to be a companion in the kitchen that helps you pick out a recipe when you are looking for something to cook. It also comes with a small herb planter that is useful for keeping fresh herbs that can be used for cooking. Sous-Chef will prompt you with a series of questions about what kind of meal you would like to have, and you can respond to them via hand gestures. The system contains a pair of motion sensors that, when triggered, can register a hand gesture as a swipe or a selection. For example, you can swipe your hand left-to-right or right-to-left to select the different options available, and then hover you hand over one of the motion sensors to confirm the currently selected option. Navigating the menus in this way helps you to avoid getting the robot dirty when things start getting messy!

Supplies

List of Materials:

Software Requirements:

  • Arduino 1.8.5
  • C++ node.js
  • Ngrok
  • Download CC3000 Arduino library 1.0.4
  • Arduino -> Sketch -> Include Library -> Manage Libraries… -> Search ‘CC3000’ -> Download v 1.0.4

Code:

The following is all of the code (including test code) you will need to run the system.

Circuit Design

circuit diag.jpeg
Screen Shot 2021-04-11 at 10.25.56 AM.png
Screen Shot 2021-04-11 at 10.26.06 AM.png
Screen Shot 2021-04-11 at 10.26.13 AM.png
Screen Shot 2021-04-11 at 10.27.48 AM.png
Screen Shot 2021-04-11 at 10.28.37 AM.png
Screen Shot 2021-04-11 at 10.29.10 AM.png

The following are step by step instructions for how to build the circuit for the project using a breadboard. Later on, the circuit will be soldered to a prototype board, but this part of the project is important to make sure all of your hardware components are working properly.

Step 1: Plug the wifi shield into metro microcontroller. Run macarl21_buildtest to confirm that the wifi shield is working.

Step 2: Connect ground to blue rail and 5V power to red rail on a breadboard. Use two additional wires to connect the left and right side red rails and left and right side blue rails to one another.

Step 3: Plug in a potentiometer. Connect leftmost pin to ground and rightmost pin to power. Attach wire to middle pin (will be used in the next step).

Step 4: Plug in the LCD screen to the breadboard. Then wire the LCD screen according to the pinmap in the following table.

Step 5: Run macarl21_HelloWorld and confirm that the lcd screen displays “hello, world!”.

Step 6: Wire the first proximity sensor according to these pin assignments (the first pin is the motion sensor and the second pin is the wifi-shield pin/board):

  • GND - GND
  • ECHO - 4
  • TRIG - 2
  • PWR - 5V

Step 7: Wire the second proximity sensor according to these pin assignments (the first pin is the motion sensor and the second pin is the wifi-shield pin/board):

  • GND - GND
  • ECHO - 8
  • TRIG - 9
  • PWR - 5V

Step 8: Run macarl21_motionTest and confirm that the proximity sensors output changes logically as the distance from the sensor to an object changes.

3D Modeling the Case

Screen Shot 2021-04-11 at 10.59.44 AM.png
Screen Shot 2021-04-11 at 10.59.49 AM.png
Screen Shot 2021-04-11 at 10.59.58 AM.png
Screen Shot 2021-04-11 at 11.00.06 AM.png
Screen Shot 2021-04-11 at 11.00.15 AM.png
Screen Shot 2021-04-11 at 11.00.21 AM.png
Screen Shot 2021-04-11 at 11.00.31 AM.png
Screen Shot 2021-04-11 at 11.00.38 AM.png

The project will need a case to house all of the hardware components. This will require you to make a 3D model that can then be printed using a 3D printer.

The images above show the 3D model for the hardware casing. The model has been turned upside down and it is broken up into different pieces, each with their own file, so that it is easier to print.

Case Part 1 and 2 (the first four images shown above) are the two halves of the main housing for the hardware components. When the two halves are brought together, its dimensions are 250 x 93.4 x 140 millimeters. The main case has holes in it that each serve a different purpose depending on the hardware component it is associated with. The large rectangular hole on the front is for the user to have access to the LCD screen. The two pairs of holes right next to the screen hole are for the motion sensors. They will allow the signal emitted by the sensors to exit the case, and detect if an object is in front of it. In Case Part 2, there is a slightly larger hole on the side of the case that will allow the power cable to connect to the microcontroller.

The Completed Case (the 5th and 6th images shown above) shows the main case when the two halves are brought together and turned right side up. Here, you can better understand what the final product will look like. The space on the top of the case is meant to accommodate the planter tray and the planter itself. The dimensions of the planter tray are 6.9 x 3.3 x 2.5 inches, so the space must be at least that large to fit the tray. Turning to the bottom of the main case, this space is one large hole that is meant to give access to the interior.

The Smaller Pieces file (second to last images shown above) are different pieces that each serve a different purpose. The two small panels on the left hand side of the image will be used to secure the hardware components once they are inside the main case. A small velcro patch will be stuck to the panel and its corresponding hardware component, and then a hot glue gun will be used to secure the panel, along with the component, to the inside of the case. Care must be taken to make sure that the components are in the correct positions for the system to work properly. The larger block piece on the right hand side of the image will be used to close off the area on the top of the case, where the planter tray will go. This piece will be secured in place by sticking a velcro patch to the bottom of it, and sticking another velcro patch to the top of the case, in the proper position. This will allow people to easily secure and remove the block and the planter tray as needed.

The Bottom Panel file (last image shown above) is a large panel that will be attached to the bottom of the main case using velcro patches. This is meant to close off the case once all of the hardware components have been secured inside. Using velcro patches to secure the large panel to the bottom of the case means it can be removed easily if needed. It is important to note that this file only contains one half of the panel so that it is easier to print. Its dimensions are 125 x 5 x 140 millimeters. It will need to be printed twice to get the complete panel.

3D Printing the Case

IMG_1713.JPG
IMG_1714.JPG

Once you have all of the 3D models ready, export them as an STL file. Having the files in this format will allow you to upload them to Cura, which is a 3D printing software. You can find the completed STL and corresponding Cura files below. All of the files are at the correct scale for printing. In terms of the printer settings in Cura, make sure that the infill is lowered to 10%, the base layer is raised to 0.4 inches, and the print resolution is lowered so that the print goes faster and is less likely to fail.

STL Files:

Cura Files:

Here are the corresponding Cura files for each STL file above.

Soldering the Prototype Board

Screen Shot 2021-04-11 at 12.26.47 PM.png
Screen Shot 2021-04-11 at 12.27.30 PM.png
Screen Shot 2021-04-11 at 12.27.35 PM.png
Screen Shot 2021-04-11 at 12.27.42 PM.png
Screen Shot 2021-04-11 at 12.27.47 PM.png

Materials for Soldering:

  • Solder metal
  • Solder tool
  • Prototyping board
  • Board pins

Step 1: Solder the pins of the black piece (shown in the 1st and 2nd image above) to the prototype board. This will be used later to connect the LCD screen to the board.

Step 2: Connect jumper cables to the ground and power bus of the board, and also to the ground and power pins on the microcontroller.

Step 3: Solder the potentiometer to the prototype board, and connect it to the ground and power bus of the board with jumper cables.

Step 4: Solder connections to the pins for the LCD screen.

Step 5: Run macarl21_HelloWorld and confirm that the lcd screen displays “hello, world!”.

Step 6: Solder ground and power wires for each of the proximity sensors.

Step 7: Run macarl21_motionTest and confirm that the proximity sensors output changes logically as the distance from the sensor to an object changes.

Assembly

IMG_1728.JPG
IMG_1727.JPG
IMG_1717.JPG
IMG_1726.JPG
IMG_1730.JPG
IMG_1729.JPG
IMG_1731.JPG

You will need the stick-on velcro, scissors, and a hot glue gun for the following steps to construct the case and secure the hardware components. The circuit should already be constructed and and soldered to the prototype board.

Step 1: Glue together each half of the main case, making sure that the edges are aligned with each other.

Step 2: Cut off a piece of velcro with scissors and stick it onto the small block-shaped piece. Put another piece of velcro onto the space on top of the case where the section of the barrier is missing. Next, put the block-shaped piece on top of it so the patches of velcro stick to each other.

Step 3: Stick velcro patches on each of the hardware components (LCD screen, microcontroller, and both motion sensors). Then, stick a velcro patch onto four of the small panels (one for each component). You may want to use the panels that have an large notch in them depending on how the wires are sticking out of the hardware.

Step 4: Place each hardware component onto their corresponding panels so that the velcro patches stick to each other. Then, glue each panel in their appropriate positions depending on the component. It is imperative that you make sure that each component is in the right position so the system works properly. The LCD screen and motion sensors each have corresponding holes in the case so that their signals can exit it.

Step 5: Run the USB power cord through the side hole and connect it to the microcontroller.

Step 6: Once all of the hardware is secure, glue together each half of the large bottom panel. Then, stick a velcro patch to each edge of the panel, and also to the bottom of the case so that both items can stick together.

Step 7: Finally, place the planter on top of the case, inside the rectangular indentation formed by the barriers on the edges. Fill the planter with soil, and plant your choice of herbs.

Operating Instructions

Step by step explanation of how the system works and how it would be used:

  1. Open Terminal

  2. Navigate to node_app

  3. Run node server.js

  4. Open separate terminal

  5. Run ngrok http 8000

  6. Copy link

  7. Paste link in macarl21_WebClient.ino into the line that looks like: #define WEBSITE "af2ede793afb.ngrok.io"

  8. Turn on hotspot on phone

  9. Make sure your phone’s hotspot name is < 32 characters

  10. Fill in hotspot name and password in macarl21_WebClient.ino ( #define WLAN_SSID "John's iPhone (2)" #define WLAN_PASS "bluebird" )

  11. Plug in usb

  12. Open macarl21_WebClient.ino

  13. Upload code to board

  14. Run code

Potential Improvements

Code Improvements:

  • Use a mounted file for user’s to fill in the website, hot spot name, and password. We think this would be a much more simple interface rather than directly opening and modifying the source code.
  • Better memory management: look for opportunities to reuse variables, reduce unnecessary lines, etc. The memory is too low for certain recipes.

Hardware Case Improvements:

  • Specialized compartments can be made to better fit and secure the hardware components
  • The overall size can be reduced for a more compact design