Inspiration
Qingwei is crazy about fitness and what he eats is very important for building a charming body. Thus recording the food calories becomes crucial to him. However, we cannot find a scale that can calculate and record the calories automatically and Qingwei needs to spend a lot of time manually doing these jobs, including searching calorie table, doing the calculation and typing the data to computer.
Under this circumstance, we come up with the idea of this Flex Scale, which can do all the things in a more efficient way.
What it does
1. It could weight food and remove the weight of a plate or bottle.
2. User can get food weight o Node-Red.
3. Calories will be calculated automatically according to the food type chosen by user on the Node.
4. If the food is out of the range of the table, user can enter the calories manually on the Node-Red.
5. User can update the firmware, which is benefited by a logical bootloader.
How we built it
1. Come up with all the functions of Flex Scale
2. Get familiar with SAMW25 and choose pins for our sensors
3. Start Atmel Studio with adding command line into the project
4. Design our PCB, including accomplishing BOM, tracing, etc.
5. Draw the flow chart of bootloader and finish the code which takes a lot of time
6. Enable our sensor(HX711) and make a mechanical design using laser cut
7. Connect the device to Node-Red and design the interface on the Node-Red
Challenges we ran into
Software Part
There are too many issues when we write codes and most of time we would spend hours with no improvement. Here are some small functions which all are challenges for us:
·How to setDeviceName and realize Backspace function in CLI
·How to select suitable components for our board
·How to arrange all the components on a small board
·Understand the structure of SAMW25's NVM
·How to do the CRC32
·How to read from SD card
·How to jump to the App code and jump back with everything working well
·How to disable the download function in App code
·Design OTAFU that works well independently
·Enable our sensor by reading the datasheet , understanding the working flow and learning the boardinit function in Atmel Studio
·Put everything together
·Build a nice structure for our device
Hardware Part
·Arrange components and wires on a small PCB board
·Test our PCB and try to burn codes into it
·Design a hard structure to fit the board and sensor in it and have room for USB wire coming out
Accomplishments that we're proud of
In fact, we are proud of every step we made. However, here are some highlight milestones for this project:
Software Part
·We finish a workable bootoader, which will download the version.txt, CRC32.txt to SD card and decide to jump or not according to the info those file provides and info in the NVM.
·We enable the sensor all by ourselves because the data transmission is unique for HX711.
·The device can receive calorie data from Node_Red, do the calculation and send the result back to the interface.
·We design a cool and explicit interface.
Hardware Part
·We design a functional circuit and a nice PCB layout
·We design a impressive structure.
What we learned
The best thing is that we learned how to learn and putting knowledge into practice is really exciting.
·How to use ASF in Atmel Studio
·How to start with example code and make improvements step by step
·How to read datasheet effectively
·There are a lot of trivial coding techniques and rules we learned in this project
·How to draw PCB layout and finish a BOM sheet
What's next for Flex Scale
a. Make a more robust shell for the sensor
b. Save the data from Node-Red to a database
c. Add a LCD to our device


Log in or sign up for Devpost to join the conversation.