A liquid recognition system based on conductive measurement is used to identify the different type of liquid substance. This device is useful for blind person. Its also used for robotics application (service robot for example).
Device DescriptionConnect the TDS meter with RedBoard Artemis and OLED display module.
TDS meter ReadBoard Artemis
VCC 3.3V
GND GND
Analog Pin A29
Connect the Qwiic Oled module to RedBoard Artemis via QWIIC port.
Data is essential for Machine Learning. Its not possible to develop a learning model with data. For developing the liquid classification model, we have collected the conductivity information of liquid substance by using TDS meter. In this project, we choose three different liquid material for classification such as, Water, Soft drinks and black coffee. For each class (water, coffee and soft drinks), we have collected around 1200 conductivity information. We stored them on a csv file. The data is next uploaded in a new google colaboratory file which runs TensorFlow.
We developed a tensor flow based model for liquid substance classification. The training procedure along with dataset description are available in the link bellow: www.roboticsbangladesh.com
After development, we need to convert the tensor flow model into byte code. The conversion procedure are available in, https://www.tensorflow.org/lite/microcontrollers/build_convert.
Device Testing VideoPrerequisite (Software Setup)This section details the steps required to setup Arduino for this project.
Install ArduinoThe Arduino application is available for a variety of platforms and is available online from Arduino. Download the application from the Arduino website using this link.
Install the TensorFlowLite LibraryThis project utilize the TensorFlowLite Arduino libary, which is installed using the Arduino Library Manager.
To install this library, use the following steps:
In Arduino, select the "Manage Libraries..." menu item. Tools > Manage Libraries...Select the non-precompiled version of the libary
- In the Library Manager interface, search for tensorflow
- Select the library Arduino_TensorFlowLite by TensorFlow Authors
- Select the Install button to install the library
Load the SparkFun Boards package into the Arduino Board Manger.
To install package, use the following steps:
- In Arduino, open the Preferences menu item. File > Preferences, (macOS) Arduino > Preferences
- Add the following path to the Additional Boards Manager URLs: path in preferences.
https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json
- Select the OK button to save the preferences.
Once the location of the SparkFun boards package is set in the preferences, the board definition package for the SparkFun Apollo3 boards must be installed.
To install package, use the following steps:
In Arduino, open the Preferences menu item. Tools > Board "..." > Manage Boards...Search for SparkFunSelect the SparkFun Edge Board. Tools > Boards "..." > SparkFun RedBoard Artemis ATPSet the Bootloader to the SparkFun Variable Loader. ***Tools > Bootloader "..." > SparkFun Variable Loader..."
- Select the **SparkFun Apollo3 Boards" package
- Close the dialog
- Plug USB cable into computer
- Plug in Artemis ATP board to adapter
Open the ___.ino
file form the repository
Select the SparkFun RedBoard Artemis ATP
board (Tools->Board under 'SparkFun Apollo3')Select the proper port to connect with the board (Tools->Port)
- Windows - COM Port
Change the Bootloader from Ambiq Secure Bootloader (Default) to SparkFun Variable Loader (Enable w/ Artemis Bootloader) (Tools->Bootloader)
- (Your boards have received the upgraded boot-loader already)
Change the SVL Baud Rate
from 921600 to 230400
Compile with the Verify
button (check mark symbol)
Upload with the Upload
button (arrow symbol)
- If uploading fails try lowering the bootloader baud rate
- Note: You will see some warnings from the compiler, these can be ignored.
- Note: The bootloader attempts to upload for 3 times. If all three attempts fail, try adjusting the baud rate.
- Open the Serial Monitor by clicking on the magnifying glass icon (top right) or (Tools->Serial Monitor)
**The Software setup section as well as other sections, related to software and hardware configuration, are taken from this repository.
https://github.com/sparkfun/Tensorflow_AIOT2019
Reference
Comments