Project

# Title Team Members TA Documents Sponsor
77 Portable Offline Translator
Josh Cudia
Lorenzo Bujalil Silva
Chi Zhang design_document1.pdf
final_paper1.pdf
photo1.JPG
photo2.JPG
presentation1.pdf
proposal1.pdf
# Portable Offline Translator

Team Members:
- lorenzo9
- cudia2

# Problem

Traveling is an exciting part of life that can bring joy and new experiences. Trips are the most memorable when everything goes according to plan. However, the language barrier can limit communication with others, causing unnecessary stress on an otherwise enjoyable trip. Although most modern phones provide translation applications, these require a reliable internet connection. In times when the connection is weak or there is no connection at all, translation apps may not be a solution.

# Solution

We want to solve this problem by building a portable translator that you can ideally use anywhere in the world without internet connection. The idea is to have a small device that can be programmed to make translations between two different languages, then is able to listen what the person says, converts the speech to text, translates the text to the target language, then converts the translated text back to speech, and drives a speaker with the target translated speech. We want to design our translator to encompass a few subsystems: Main Processing Subsystem (MCU), Secondary Processing Subsystem (Compute Module), Audio Subsystem, User Interface Subsystem, Communication Subsystem, and Power Management Subsystem. Through this design, someone should be able to turn on the device, set the languages up and start talking into the device, and after a few seconds the translated speech will be played. Then, the device can be programmed the other way to have the other party translate. Ideally, this will facilitate communication between people without a common language and make life easier while traveling.

# Solution Components

## Main Processing Subsystem

Components:
[STM32F407](https://www.st.com/en/microcontrollers-microprocessors/stm32f407-417.html)([STM32F407IGH7](https://www.st.com/resource/en/datasheet/stm32f405zg.pdf)) (MCU)

The main processing subsystem will manage the workflow for the system, control all I/O, and communicate commands/data to the secondary processing subsystem. When the system powers on a simple interface will be prompted to the user to allow them to select the source and target language to translate. The MCU will support the user inputs through a push button to select the language and will drive the display. Then when the user decides to start translation, through a particular push button, the MCU will change states to start listening on the port for audio data from the microphone. The INMP441 microphone will output a digital signal and communicate over I2S which can be interpreted through our MCU. The MCU will also need to buffer data and need to normalize it to be within the appropriate bit range to be interpreted by the STT model. After preprocessing the data, we will need to set up code to communicate packets of this data over a SPI or I2C protocol to the compute module. We also may need to set up some kind of custom protocol to set the compute module to start listening for a data sequence. Then the compute module will take over and do the translations and conversions to speech and output pulse code modulation data. This data is transmitted again over SPI or I2C to the MCU that is listening. Then the MCU will move to another state to start writing the data to the MAX98357A that will drive the speaker. Then the MCU will move back to a state of user input again to allow the user to translate again. Other than managing the entire workflow for the system, it needs to control the I/O which will include reading inputs from the user on the push buttons and will need to drive an LCD display to show what the user is currently selecting. With enough time, we may also add some status messages onto the LCD display to see what is happening in the system.

We decided to use the STM32F407 for this project because we required high levels of communication between various systems along with the numerous I/O. We also found that it has a LCD parallel interface and JTAG interface. We also have a long reach goal to do some audio manipulation (e.g. filtering, noise reduction) before sending it off to the compute module. We can also expect to support a real time control of the audio and peripheral management.

## Secondary Processing Subsystem

Components:
- [Raspberry Pi Compute Module 4](https://datasheets.raspberrypi.com/cm4/cm4-datasheet.pdf) (SC0680/4)

Models:
- Speech to Text: [Whisper](https://github.com/openai/whisper) (Tiny Model)
- Translation: [MarianMT](https://marian-nmt.github.io/)
- Text to Speech: [Piper](https://github.com/rhasspy/piper)

The main purpose of the compute module is to offload high compute tasks, including speech to text transcription, translation, and text to speech conversion. It would be too computationally complex to host all three models on the STM32 while processing I/O data. We specifically chose the RPI Compute Module because it has the computational power to run the AI models, it can interface over SPI or I2C to the MCU, it runs Linux, and it has eMMC Flash to store the models on board. For this subsystem, we are going to have to build an infrastructure around querying the models, reading and sending data to and from the MCU, and a data processing pipeline to move through different stages of translation. It will also need to have some level of state awareness to know what kind of translation is being requested. We hope to design the PCB so that we can simply plug in the compute module onto the PCB through pinouts.

## Audio Subsystem

Components:
- [INMP441](https://invensense.tdk.com/wp-content/uploads/2015/02/INMP441.pdf) (I2S Microphone)
- [MAX98357A](https://www.analog.com/media/en/technical-documentation/data-sheets/max98357a-max98357b.pdf) (Amplifier)
- [Dayton Audio CE32A-4](https://www.daytonaudio.com/images/resources/285-103-dayton-audio-ce32a-4-spec-sheet.pdf) (Speaker)

The audio subsystem encompasses all of the components managing analog signals. Essentially this will include listening to the user voice then delivering that to the MCU. It will also include the amplifier and speaker that are managing converting the digital signals to an analog signal and then speaking out the translated speech. Additionally, the microphone will do analog to digital conversions and some amplification to the signal. To avoid conflict with noise from the speaker with the microphone, we are going to build a very synchronous system where we can only use the microphone or the speaker at a time.

## User Interface Subsystem

Components:
- [ST7789](https://cdn-learn.adafruit.com/downloads/pdf/2-0-inch-320-x-240-color-ips-tft-display.pdf) (LCD Display)
- Mini Pushbutton Switch

We are going to have a LCD display that can let the user decide what languages to translate between and some push buttons to be able to decide. We are also going to have a push button that will start listening on the microphone, then stop listening so we can ensure that all of the data has been stored. In the case that the translation lasts too long, we may add some feature to automatically stop the input of speech so we make sure not to have too much data to translate. This UI subsystem will essentially make it so that this is a usable product.

## Communication Subsystem

Protocols:
- I2S (Audio I/O)
- SPI/I2C (MCU-CM Communication)

We are going to support communicating with I2S between the MCU and both of the audio devices, and we are going to have SPI/I2C communication to the compute module. This may also require some circuit level design to add to the I2C or I2S lines (pull-up resistors).


## Power Management Subsystem

Voltage Levels:
- Power Rails:
- 5V (CM)
- 3.3V (MCU, LCD, Audio)

- [LM317DCYR](https://www.digikey.com/en/products/detail/texas-instruments/LM317DCYR/443739?gclsrc=aw.ds&&utm_adgroup=Integrated%20Circuits&utm_source=google&utm_medium=cpc&utm_campaign=Dynamic%20Search_EN_Product&utm_term=&utm_content=Integrated%20Circuits&utm_id=go_cmp-120565755_adg-9159612915_ad-665604606680_dsa-171171979035_dev-c_ext-_prd-_sig-CjwKCAiAtYy9BhBcEiwANWQQL3rwnMSMyK-ZG3XMXp5nru6UD3FAfss_oPQyDGeG0f-Hh2RLp4BssBoCgKIQAvD_BwE&gad_source=1&gclid=CjwKCAiAtYy9BhBcEiwANWQQL3rwnMSMyK-ZG3XMXp5nru6UD3FAfss_oPQyDGeG0f-Hh2RLp4BssBoCgKIQAvD_BwE&gclsrc=aw.ds) (Adjustable LDO) X2
- [18650 Battery Holder](https://www.digikey.com/en/products/detail/keystone-electronics/1048P/4499389?gclsrc=aw.ds&&utm_adgroup=&utm_source=google&utm_medium=cpc&utm_campaign=PMax%20Shopping_Product_Low%20ROAS%20Categories&utm_term=&utm_content=&utm_id=go_cmp-20243063506_adg-_ad-__dev-c_ext-_prd-4499389_sig-CjwKCAiAtYy9BhBcEiwANWQQL67T2WMFu7kbd5dYcLA8KUBEH5cQLd09vsCRMQqPdleIVlpNC45jqhoCQ38QAvD_BwE&gad_source=1&gclid=CjwKCAiAtYy9BhBcEiwANWQQL67T2WMFu7kbd5dYcLA8KUBEH5cQLd09vsCRMQqPdleIVlpNC45jqhoCQ38QAvD_BwE&gclsrc=aw.ds)
- [Samsung 25R 18650 2500mAh 20A Battery](https://www.18650batterystore.com/products/samsung-25r-18650?utm_campaign=859501437&utm_source=g_c&utm_medium=cpc&utm_content=201043132925&utm_term=_&adgroupid=43081474946&gad_source=1&gclid=CjwKCAiAtYy9BhBcEiwANWQQL9KXMQZ0cgicw8SuV3VKk3KPHvVdYIrlZydGXjFnZ7StpWRljqYGjRoCGikQAvD_BwE)



This portable power management system will use a Samsung 25R 18650 2500mAh 20A rechargeable Li-Ion battery to supply stable voltage to two power rails. We will use the 5V power rail for the Raspberry Pi Compute Module (CM) and 3.3V power rail for the MCU, LCD, and audio subsystem. This system includes two LM317DCYR adjustable LDO regulators. One will be used to step down the battery voltage to 5V and the another to step down the voltage to 3.3V. Lastly, the 18650 battery holder securely holds the battery and enables easy replacement.

# Criterion For Success

The basic goals that we hope to achieve with this design is a system where we can press a button to listen to our voice then stop listening, process this data to the compute module, translate the speech, and drive a speaker to hear the translated speech and this speech needs to sound cohesive and be understood. At the simplest level, we hope to translate between English to another language. At the minimum, if this works we can expect to be able to add additional functionality to support more than two languages. We also believe that our system is going to be very synchronous, as if one thread is being used to move the data through all the pipeline. A more asynchronous system would be able to listen and start speaking right as we are talking, but there are more caveats to that system that may be too complicated to get done within one semester. We are able to test this at a high level as we are able to hear what the translated speech is, and we can dive deeper by having stages within our translation pipeline where we can dump the status of the translation to see what exactly we received as input and what we got as output. We also hope to be able to have this be a simple portable design with an encasing to make it very easy to use especially through the UI.

Multipurpose Temperature Controlled Chamber (for Consumer Applications)

Isaac Brorson, Stefan Sokolowski, Mitchell Stermer

Multipurpose Temperature Controlled Chamber (for Consumer Applications)

Featured Project

Multipurpose Temperature Controlled Chamber (for Consumer Applications)

#TEAM MEMBERS:

Stefan Sokolowski (stefans2)

Mitchell Stermer (stermer2)

Isaac Brorson (brorson2)

#PROBLEM:

Have you ever put a drink in the freezer to make it cool down faster, only to forget about it and later find it exploded and frozen?

Or have you wanted to cook a steak, but forgotten to move it from the freezer to the refrigerator the previous day?

Finally, has there ever been a time when you set food out overnight in order to prepare it for the next day but only to find that it didn’t thaw as expected?

We have done all of these things plus more and have always wished there were a smart device that could quickly cool or warm food without freezing or cooking it.

#SOLUTION:

Our project would be a programmable temperature controlled chamber which allows a user to set the temperature curve of a food item they are planning on consuming in the near future. This device would be able to quickly heat or cool food to a desired temperature, then hold it at that temperature until the user is ready to use the food. The way someone would use this device would start by placing their food item in the device's insulative chamber and closing the door. The user interface would present the user with a variety of options: standard heating or cooling presets for common food items, temperature set and hold, or the ability to set a detailed temperature curve.

If you want to cool a drink to just above freezing, you would select the corresponding menu option, and this device will lower the temperature of its chamber to well below freezing, then slowly raise its temperature to ensure the drink doesn't freeze.

If you select the menu option to thaw a steak, this device will raise the temperature of the chamber to just below the point at which meat begins to cook, (roughly 105 degrees F) then slowly lower the temperature towards room temperature.

This device could also be used for applications outside of cuisine. Say you’re running an experiment to test the capacity of a battery at different temperatures. You could set a temperature curve to visit several different temperatures and hold each one as your battery capacity tester runs its tests. This would allow you to automate an experiment that would otherwise require intermittent attention over the span of multiple hours.

There are temperature controlled chambers on the market, but they’re all exorbitantly expensive and large for a household kitchen. We want to make a device that could sit on a countertop and be affordable to anyone who has the budget for other standard kitchen appliances.

![pic](https://i.imgur.com/HJiCQsN.png)

#POWER

We plan to use a dual output DC power supply such as the RD-125B[1] to power both our digital electronics and the high power heating and cooling elements. This power supply would be plugged directly into an outlet using a 120V plug, and would create 5V and 24V DC outputs. According to its datasheet[1], the RD-125B’s 24V output is rated to supply 4.6A, which equates to just over 110W. Based on our research of thermoelectric coolers and heating elements, we think this should be plenty of power for our application.The RD-125B’s 5V output is rated to supply far more power than our 5V electronics could possibly draw.

#MECHANICAL DESIGN

In order to reach temperatures below freezing with thermoelectric coolers, we’ll need to thermally insulate the chamber very well. Since this insulation needs to be able to withstand the heat produced by the heating elements, we landed on Kaowool. This ceramic wool insulates very well while also being rated to over 1000℃[2].

Since our device is intended for food applications, it’s important for our temperature controlled chamber to be waterproof and food safe. For this reason, we plan to purchase an off-the-shelf cooking pot such as this one[3]. By fitting a smaller pot inside of a slightly larger pot, we can create an affordable and convenient way to insulate our chamber. We can fit the gap between the pots with Kaowool insulation, and use the larger pot’s lid with Kaowool in it to seal the top.

To heat the chamber, we plan to wrap a resistive heating element (such as nichrome wire) around the inner chamber. Since we plan to use an electrically conductive pot for our inner chamber, we’ll need to insulate the heating element from it to prevent shorting. This can be done with Kapton tape, which can withstand temperatures ranging from -269℃ to 400℃[4].

To cool the chamber, we plan to use thermoelectric cooling modules. These require a good thermal pathway to work well, so we’ll need to use a material with high thermal conductivity to mount them to the chamber wall. We plan to ask the machine shop to machine us aluminum mounts which match the curved outside surface of the pot composing the chamber to the flat faces of the thermoelectric cooling elements. Additionally, we’ll use thermal grease to reduce the thermal resistance of the junctions. The thermoelectric coolers will require rectangular holes cut through the wall of the outer pot so they can pump heat to outside of the device.

We plan to mount our circuit board and the user interface electronics in an E-box attached to the side of the outer pot. We can use standoff rods to ensure the electronics don’t get heated or cooled too much from being close to the chamber, though we expect that our thermal insulation will be good enough for that not to be a concern.

#HEATING SUBSYSTEM

As mentioned in mechanical design, we plan to use a resistive heating element to heat the chamber. This will be powered by the higher voltage DC power rail produced by the power supply, which is 24V for the RD-125B. We'll use a solid state switch to control the current through the heating element. This allows us to control its power using PWM, which is essential for ensuring the chamber temperature remains below a certain prescribed level.

The simplest and most cost effective switching device would be an N-channel power MOSFET such as the Taiwan Semiconductor TSM170N06CH[5].

#COOLING SUBSYSTEM

We plan to use thermoelectric (Peltier) coolers to provide the cooling. These work as heat pumps, so we’ll need heat sinks and cooling fans to dissipate the heat they produce. The thermoelectric coolers and fans will be run off of the same higher voltage DC that powers the heating element.

We want to have the option to run the thermoelectric coolers in reverse while the chamber is heating to prevent their heat sinks from cooling down the chamber. To do this we’ll need to power the thermoelectric coolers through an H-bridge so that we can reverse their polarities. The H-bridge can be composed of two N-channel MOSFETs such as the one mentioned above[5], and two P-channel MOSFETs such as the Rectron Semiconductor RM15P55LD[6]. The H bridge can be controlled by the STM32 microcontroller, allowing us to use PWM to vary the power supplied to the thermoelectric coolers. We may or may not need gate drivers for the H-bridge. Gate drivers are necessary for a fast switching rate, but our application doesn’t require high frequency PWM.

#TEMPERATURE MEASUREMENT SUBSYSTEMS

To be as precise as possible, we want distinct temperature sensors for measuring the temperature of the air in the chamber and the temperature of the item being warmed or cooled. Measuring the temperature of the food is made difficult due to many food items having insulative packaging. (Glass bottles, styrofoam containers, etc...) Since we want our device to work for as wide of a range of food items as possible, we plan to give the user the option to select from multiple different interchangeable food temperature probes. Temperature sensing probes could include a meat thermometer, a flat metallic probe that could be placed on frozen meat, or a ring shaped thermometer that could go around a bottle or can.

Temperature sensing (thermocouple / thermopile) may require some basic analog electronics, such as an op amp to amplify the small voltage produced by a thermocouple.

#USER INTERFACE SUBSYSTEM

We plan to use an STM32 microcontroller, for our use a STM32F103C8T6 would probably suffice with IO and processing power, but more capable F4’s might be considered if we add more sensors. The microcontroller and user interface will require logic level voltage DC.

We would most likely use an I2C enabled LCD display as well as a bright, external RGB LED in order to show the user what state the machine is in from a distance. We plan to use a push button rotary encoder to allow the user to interact with the device, in addition to an ON/OFF switch and a "cancel" button. User feedback should be fairly simple and if time allows, we might consider connecting the device to an external service to send users notification as to the status of their heating/cooling cycle.

The user interface screen will have multiple interactive menus: one to select the behavior mode of the device, one to set temperature and time values, one to show a temperature curve, and one to be displayed while the device is operating.

#CHALLENGES & CONSIDERATIONS:

- Everything inside the chamber will need to be able to withstand the full range of temperature.

- Electronics will need to be very well thermally insulated from the chamber if we want to use it as an oven.

- Since thermopiles operate off of a temperature gradient, they require a stable case temperature. This means we'll need to keep the thermocouple in a temperature controlled environment.

- The chamber should ideally be made watertight for the case of a spill or leak.

- When making the mechanical design, we'll need to keep in mind how different materials expand / contract at different rates when they're heated / cooled.

#CRITERION FOR SUCCESS:

- Inside of the chamber should be able to reach at a low end 0 degrees Celsius and at a high end 40 degrees Celsius.

- Be able to hold temperature to within +-5 degrees Celsius of target temperature.

- User has the ability to set target temperature, heating/cooling curve and max/min temperature allowances through GUI on an LCD display.

- Display of current temperature, and possibly a plot of the temperature vs. time graph.

- Ability to select the behavior of the device from a provided menu of presets for different foods.

- (Stretch Goal) We could possibly include multiple different methods to measure food temperature in addition to the ambient temperature. (Stainless steel probe to measure the internal temperature of meats, thermocouple for bottles and containers)

[1] Power Supply:

https://www.mouser.com/datasheet/2/260/RD_125_SPEC-1511572.pdf

[2] Kaowool:

https://www.morganthermalceramics.com/media/llhhadih/5-14-205_kaowoolblankets_072018.pdf

[3] Aluminum pot: https://www.amazon.com/Winco-Winware-Aluminum-Stockpot-12-Quart/dp/B001CHMIQ4/ref=sr_1_10?crid=1VECOQHCN2UC2&keywords=aluminum%2Bpot&qid=1706684643&sprefix=aluminum%2Bpot%2Caps%2C93&sr=8-10&th=1

[4] Kapton tape:

https://www.dupont.com/electronics-industrial/kapton-hn.html#:~:text=Kapton%C2%AE%20HN%20has%20been,C%20(752%C2%B0F).

[5] N channel MOSFET:

https://services.ts.com.tw/storage/resources/datasheet/TSM170N06CH_A2211.pdf

[6] P channel MOSFET:

https://www.mouser.com/datasheet/2/345/rm15p55ld-1396325.pdf

Project Videos