element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Rube Goldberg Device
  • Challenges & Projects
  • Project14
  • Rube Goldberg Device
  • More
  • Cancel
Rube Goldberg Device
Blog AI-powered Fully Automated Voice-Controlled Coffee maker
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Rube Goldberg Device to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: rahulkhanna
  • Date Created: 28 Jun 2022 1:08 PM Date Created
  • Views 111686 views
  • Likes 8 likes
  • Comments 2 comments
  • tinyml
  • rubegoldbergch
  • automationl
  • machine learning
  • voice control
  • food and drinks
Related
Recommended

AI-powered Fully Automated Voice-Controlled Coffee maker

rahulkhanna
rahulkhanna
28 Jun 2022

Making a cup of coffee/tea on a Sunday morning is really hard. I would like to present my Rube Goldberg Device, a fully automated coffee/tea maker. 

Things used in this project

Hardware components

  1. Infineon PSoCTm 62S2 Wi-Fi BT Pioneer Kit × 1
  2. Infineon IoT Sense Expansion Kit × 1
  3. Seeed Studio Grove - Relay × 1
  4. Digilent IR Proximity Sensor × 1
  5. Digilent 60W PCIe 12V 5A Power Supply × 1
  6. Cup heater × 1
  7. Water pump × 2
  8. SG90 Micro-servo motor × 1
  9. Buzzer × 1

Software apps and online services

  1. Infineon ModusToolboxTm Software
  2. Picovoice AI Picovoice Porcupine Wake Word Engine
  3. Picovoice AI Picovoice Rhino Speech-to-Intent Engine


Hand tools and fabrication machines

  1. Hot glue gun (generic)
  2. Breadboard, 170 Pin
  3. 10 Pc. Jumper Wire Kit, 5 cm Long

Why did I build this?

Making a cup of coffee/tea on a Sunday morning is really hard. I would like to make a fully automated coffee/tea maker which can be turned on and controlled using voice commands.

image

Idea and Working PrototypeBulb

I would like to make a fully automated coffee/tea maker which can be turned on and controlled using voice commands. This can highly reduce the physical contact with the machine and can be implemented in public places, and in the office cafeteria.

The System is designed to process the voice data using the XENSIVTm MEMS Microphone in real-time. The trained model is fed with the voice data and inference is used to process certain actions. When the correct wake is called, the system is initialized and the successive words are used to identify the drink. Using a PSoC 62S2 & the AIROC Wi-Fi/Bluetooth Pioneer Kit + IoT Sense will make this system more robust and easy to implement in real-time. The audio data is processed using Picovoice.

I know this can't be a perfect coffee maker but I'm satisfied with the coffee made by this project.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Hardware Build

We are supplied with the PSoC 62S2 Wi-Fi/Bluetooth Pioneer Kit + IoT Sense Expansion kit. Thanks to Infineon for sponsoring this powerful kit for this project. Innovative projects using IoT entangle unlocking the possibility of AI on edge devices, where you can run complex AI algorithms right on the edge.

image

image

PSoC 62S2 Wi-Fi/Bluetooth Pioneer Kit

The PSoC 62S2 Wi-Fi BT Pioneer Board has the PSoC 6 MCU (CY8C624ABZI-S2D44) & Murata 1LV ultra-small 2.4/5.0-GHz WLAN and Bluetooth functionality module, a 512-Mbit external Quad SPI NOR Flash, 4-Mbit Quad SPI F-RAM. It also has KitProg3 onboard SWD programmer/debugger, CapSense touch-sensing slider, onboard user LEDs, and buttons.

image

IoT sense expansion kit (CY8CKIT-028-SENSE)

The IoT sense expansion kit is a low-cost ArduinoTm UNO compatible shield board that can be used to easily interface a variety of sensors with the PSoCTm 6 MCU platform, specifically targeted for audio and machine learning applications.

  • Digital XENSIVTm MEMS Microphone(s)
  • Digital XENSIV Barometric Air Pressure Sensor
  • Bosch 9-axis Absolute Orientation Sensor
  • Piezo MEMS Analog Microphone
  • Audio Codec and headset jack
  • OLED Display Module
image
IoT sense expansion kit (CY8CKIT-028-SENSE)

Relay Board is used to switch the warmer.

image

Motor pumps are used for filling the milk and water into the cup.

image

Servo Motors are attached to the sprinkler setup which is used to dispense the coffee and sugar.

image

Proximity Sensor is used to detect the cup. If the cup is not present in the holder, it alerts the user.

image

The total components used are shown below.

image

Setting up PSoC 6 & IoT Sense expansion kit

  • Firstly, install the Modus Toolbox IDE from the official website.
image
Modus Toolbox
  • Before starting, ensure you have the following. PC with USB port & UART terminal software such as Tera Term. Open the UART terminal software and connect to the kit's USB-UART COM port with the settings: Baud rate: 115200, Data: 8 bit, Parity: None, Stop bit: 1 bit, Flow control: None
  • Ensure the jumper J14 is at position 2-3 to select 3.3V • Connect the KitProg3 USB connector (J6) to your PC
  • Wait for the driver installation to complete and Press the XRES switch (SW1) to reset the device.
  • Now the PSoC 6 example is active. Press Enter to turn on/off the blinking of LED8 on the Pioneer kit.
image
LED OFF
image
Terminal

You can find the serial reply from the pioneer kit on the tera term. I had also tried the CAPSense Button and Slider example and it was quite fun.

image
Now the hardware is ready to be programmed.

Workflow

Now, let's see how the AI-powered Fully Automated Voice-Controlled Coffee/Tea maker can be implemented. The Workflow diagram is given below:

image
Hardware Architecture
  • We use Microphone to detect the audio signal.
  • Use a proximity sensor to detect the cup
  • Based on the voice command, we select the type of drink. We can customize coffee by changing the proportion of the milk, water, coffee, and sugar.

Here's the recipe for the coffee.

image

Americano, Cappuccino, Espresso, and latte are some of the classifications that we will be testing out.

  • The milk and water pumps are turned on for 'x' sec or microseconds based on the chosen drink.
  • Servo motors are used to sprinkle Coffee and Sugar.

Overall Architecture

  • Use PSoC & picovoice to detect the audio command.
  • Understand the type of coffee using picovoice
  • Control the pumps and motors to make the desired coffee.
image

Implementation - Running a Voice ML model on PSoC

First, Let's create a new project. Select PSoC6 BSP & IoT sense and select Picovoice E2E Voice Recognition Demo as shown below.

image

Create an account on the Picovoice console to generate a free trial access key.

image
Now paste the access key on the main.c file as shown and build the project. You can see the state on the Serial monitor.
image
We will be creating a speech to intent using the Create new Rhino Speech-to-Intent context. On the picovoice console, we name the context as "coffee maker" with the Coffeemaker template and then Click on the CreateContext button.
image

We name the Intents as "orderBeverage" which has the Intent: orderBeverage as shown below.

image
orderBeverage

We have Slots: beverage, numberOfShots, and size. These are the slots that are extracted from the audio data. The Elements under the Slots - beverage, numberOfShots, and size are listed below.

image
1 / 3 • Elements

And finally, the Macros for the following are set.

image

Click on the Train Button, Select the ARM Cortex-M in the Model Platform, PSoC as Board Type, and the UID.

image
Once the training is done, the model is generated on the Models tab. Click on the Download button and unzip the file.
image

Paste the CONTEXT_ARRAY from the coffee-maker_en_cortexm_v2_1_0.h file to the CONTEXT_ARRAY in the /include/pv_params.h on the project directory.

image

To use the OLED on the IoT Sense, the following configurations are made.

  • Add this library to the application
  • Add emWin library to the application
  • Enable EMWIN_NOSNTS emWin library option by adding it to the Makefile COMPONENTS list:
COMPONENTS+=EMWIN_NOSNTS

Since the OLED example had already initialized the BSP, we remove the following line from pv_psoc6.c file

image
cy_rslt_t result;
cyhal_i2c_t i2c_obj;

/* Initialize the device and board peripherals */
result = cybsp_init();

CY_ASSERT(result == CY_RSLT_SUCCESS);

/*Initialize the I2C to use with the OLED display */
result = cyhal_i2c_init(&i2c_obj, CYBSP_I2C_SDA, CYBSP_I2C_SCL, NULL);

CY_ASSERT(result == CY_RSLT_SUCCESS);

/* Initialize the OLED display */
result = mtb_ssd1306_init_i2c(&i2c_obj);

CY_ASSERT(result == CY_RSLT_SUCCESS);

GUI_Init();
GUI_DispString("COFFEE MAKER AI");
image
Now the picovoice has been implemented successfully. The Machine can now understand the following commands once we initiate the wake-up word PICOVOICE.

Brew me a {size} {numberOfShots} {beverage}

Make me a {size} {numberOfShots} {beverage}

Can I have a {size} {numberOfShots} {beverage}

Can I GET a {size} {numberOfShots} {beverage}

Hardware connection - Pump control, Proximity Sensor, Servo

Now, let's see the hardware connections. From block diagram 2, the IOs for each hardware is connected.

The Relay is connected to P0.2. The warmer is connected to relay output as shown here.

The cup is placed on an inductive heater to warm the coffee. This is controlled by a relay as shown below.

image
IR sensor is connected to P0.3 which is used to detect the presence of a cup.
image

Servo Motors is connected to P. The Servo motor is used to sprinkle Sugar & Coffee into the cup.

The water pump is connected to P13.6 & milk pump is connected to P1.3. These are used to dispense milk using the tubes. One end of the pump is connected to the bottle containing milk and water while the other is placed above the cup as shown below.

image
image

Deploying on PSoC

Make sure that you have completed the above steps properly.

  • Clone the repository

git clone https://github.com/Rahul24-06/psoc-Coffee-Maker

  • Add the project to the Modus Toolbox and click on the Launch button to upload the program.
  • Once the upload is complete, click the XRES button to reset the controller.

Working Telescope

The Final Setup is shown here.

image

On following the above steps, we made a voice-controlled automatic coffee maker that recognizes the words on the device using Picovoice ML. Finally, we are in the last step of this project. It's showtime!

image
----------------------------------------------------------------------------------------------------------------

If you faced any issues in building this project, feel free to ask me. Please do suggest new projects that you want me to do next.

Give a thumbs up if it really helped you and do follow my channel for interesting projects. :)

Share this video if you like.

Github - https://github.com/Rahul24-06

Happy to have you subscribed: https://www.youtube.com/c/rahulkhanna24june?sub_confirmation=1

Thanks for reading

  • Sign in to reply
Parents
  • dougw
    dougw over 3 years ago

    Very nice project. I'll have to try PicoVoice/Rhino.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • dougw
    dougw over 3 years ago

    Very nice project. I'll have to try PicoVoice/Rhino.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
  • rahulkhanna
    rahulkhanna over 3 years ago in reply to dougw

    Thank you :)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube