Day 13 – A long day and night

Today we worked on moving all the code to only one NodeMCU. Last night we realize that if we use the TX and RX pins and use the same tricker pin for all the ultrasonic sensor, we could fit everything on one NodeMCU. This meant changing the code all over again, but it solved a lot of the problems we where in encounter, with the two NodeMCU. This took a good chunk of the day to finish off.

When we wanted to test with NodeRed, we found at few mistakes, ui-controller not changing dashboard as they should, we found the mistake in the coding, change it, and everything was working again.

We startede filming the video, the clips whit out the machine were very easy to shoot, and the edit of the first clips went super fast, but we had a bit of trouble with the machine, and just when we were about to be done, we fried the NodeMCU that we were using. So we change over to another NodeMCU, but starting having trouble with the OLED, to the prototype apart again and then we found out that it was a broken cable. Now the everything was running, and we check the math from the code, and made a few adjustments to make it work better.

The rest of the group who was not working on the coding, worked on the report, the PRD, and the BOM. We also spent this reading though the prototyping planers. Around midtnight all this was done, we started filming clips og the NodeRed dashboard.

This is how the final prototype turned out, a last we got every thing to work, but I took a long time, and we finished of in the morning, and tired, but happy that know we are done with the prototype and now we only need to present it.

We made a rendering of how we wanted the finish product to look. The frame should out of white plastic, and the cambers should be transparent.

Day 12: Manaic-Monday

Today was primarily spent writing the assignment, coding, debugging and testing the mixing mechanism with the motor. The construction was pretty much done. The water container, however, did not seal properly, so this needed to be redone.

It turned out, that the mixing blade we thought was the best version yet, shoved the flour up on the sides of the mixing container. The best mixer turned out to be one of the 3D-printed ones with a big spacing between the bars.

This one scoops and blends the dough very well and minimises trails up the walls and unnecessary resistance in areas with dough-lumps. We also learned that the rounded wall inside of the flour container was working just fine after our other revisions. Therefore we did not need to make the wall square anyway.

With more testing on dose amounts and water-flour ratio we gained more experience on the abilities of our mechanisms. This teaches us how to operate the actuators in order to gain the best results.

Coding and rearranging components has given us loads of insight and with this, also possibilities. Firstly we learned, that one NodeMCU could control both actuators and sensors by connecting input pins from all ultrasound emitters. This reduced the necessary input amount with 2 pins. The serial pins TX and RX can be reprogrammed and this way we were able to incorporate the OLED display to the one NodeMCU thus getting rid of the second nodeMCU entirely.

With coding we worked a lot to gain control, apply functions for calculating sensory inputs and rearranging overall code for the new circumstances.

We’ve achieved a lot but encountered some technical issues once again. Overall construction has been completely finished for assembly over the weekend but now we need to work to gain completely control over the electronics.

Sourdough: Making a starter and maintaining it

Day 1

Combine the following:

  • 80 grams of FLOUR 
  • 80 grams of WATER 

Flour and water is stirred together until there are no clumps. Set in a cool, shaded spot for 24 hours.

Day 2

On Day 2 you may or may not see bubbles on top of the starter.

The starter shouldn’t be fed today, but should be stirred to incorporate air into the mixture. Set in a cool, shaded spot for 24 hours.

Day 3

Check the starter for signs of activity – it should be bubbly! The starter has risen some overnight.

From day 3 you should start discarding some dough and give it a feeding twice a day. Leave about 3 tablespoons of the starter in the container and discard the rest.

In the morning (AM)

1. You will need the following:

  • 40 grams of STARTER 
  • 40 grams of FLOUR 
  • 40 grams of WATER 

2. Stir until well combined.

3. Let sit for 12 hours.

In the evening (PM)

1. Add the following to your starter:

  • 25 grams of FLOUR
  • 20 grams of WATER

2. Stir until well combined.

3. Let sit for 12 hours.

Day 4

On the morning of Day 4 the starter is very active. This is evident by all the bubbles on top and on the sides of the jar. It has almost doubled in size which is a very good sign!

Use the same schedule from Day 3, until you have a strong starter!

In the morning (AM)

1. You will need the following:

  • 40 grams of STARTER 
  • 40 grams of FLOUR 
  • 40 grams of WATER 

2. Stir until well combined.

3. Let sit for 12 hours.

In the evening (PM)

1. Add the following to your starter:

  • 25 grams of FLOUR
  • 20 grams of WATER

2. Stir until well combined.

3. Let sit for 12 hours.

Day 5 

You can see that the starter is nice a bubbly which means it’s active. The yeast still need to multiply in order to give the starter the boost it needs to rise bread.

In the morning (AM)

1. You will need the following:

  • 40 grams of STARTER 
  • 40 grams of FLOUR 
  • 40 grams of WATER 

2. Stir until well combined.

3. Let sit for 12 hours.

In the evening (PM)

1. Add the following to your starter:

  • 25 grams of FLOUR
  • 20 grams of WATER

2. Stir until well combined.

3. Let sit for 12 hours.

Day 6

The starter rose overnight and fell back down but it is still not strong enough. Keep going!

In the morning (AM)

1. You will need the following:

  • 40 grams of STARTER 
  • 40 grams of FLOUR 
  • 40 grams of WATER 

2. Stir until well combined.

3. Let sit for 12 hours.

In the evening (PM)

1. Add the following to the starter:

  • 25 grams of FLOUR
  • 20 grams of WATER

2. Stir until well combined

3. Let sit for 12 hours.

Day 7

In the morning (AM)

1. You need the following:

  • 40 grams of STARTER 
  • 40 grams of FLOUR 
  • 40 grams of WATER 

2. Stir until well combined.

3. Let sit for 4-5 hours, until doubled in size.

About 4 hours after the feeding you can do what is called a “Float Test” to see if the starter is ready for bread baking. You perform a “float test” by dropping a tablespoon of the starter into a jar of room temperature water. The starter floats on the top of the water which indicates that it is ready to bake!

If the starter does not float don’t worry – keep up the daily schedule until it passes the test. It might need an extra day or two depending on the temperature of your house!

Day 11: Friday – Panic at the disco

Today we faced many challenges with finishing the sourdough machine. We spend a lot of time trying to get the 3D-printer to work in the library, laser cutting the construction pieces (which we need to redo), and had coding difficulties. These obstacles have set us back a lot time wise, so we will work further on the project throughout the weekend.

We needed to 3D-print the frame for the OLED, a new mixing blade with a new shape and a clutch.

Again today we worked on our connectivity issues.

In order to make an improved mixing blade, we needed to test some different shapes out with flour and water with the motor connected. According to our tests, the vertical bars should be rounded, have more space between them, and there should be a rod at the bottom to make sure the dough at the bottom will be mixed properly. The curvy design of the bars also aided in the mixing of the dough. The bigger spaces between the bars made sure more dough passed through, cutting the motor some slack.

The prototype setup with the motor connected

We are now printing a new kind of blade, which has bars with a bigger diameter, has a rod at the bottom and bigger space between its bars.

We also did a lot of research on making the perfect sourdough starter and maintain it, so we knew how the machine should run. Check the saturday post out to see the procedure.

Day 10: Thursday – The sprit to finish the product

At the beginning of the 3 week period, we made our own deadline to finish the product today. The thought behind this was, that if we finished the product by day 10, we would have 4 days to make the video, the report, finish the BOM and the PRD. Today we got at big step closer to finishing the product, but it is not build yet.

Connectivty

One of the reasons, we did not finish the product today, was that we wanted to run all of components from an Arduino Mega and store the code on this. To get the Arduino Mega connected to MQTT, we wanted to establish serial communication between the Arduino and the NodeMCU, we spend a lot of time on this, but we could not get it to work. Then we tried using the NodeMCU as a WIFI-Shield, for the Arduino, but this would not work either. Our back-up solution was to have multiple NodeMCUs and run all the code from here, but this added a few new problems, like the fact that one motor has to run, then the pump and then the other motor, because of our power supply.

The Frame

The process of building the frame

We had already made a drawing of the frame, but today we realised that the frame we made, is not strong enough to carry the load of everything, so we needed to find a new design to be sure that it would not break. The GIF above shows the process of designing the new frame. The end result is where we are today. Tomorrow we need to make a few different changes to make the frame stronger and more balanced.

The frame now

Kickstarter movie

To get inspiration for the movie, we looked at different movies on kickstarter, and movies made in this course previous year. To show off our product we decided to start out the video with a clip of a sourdough user coming home from vacation to a moldy sourdough, after these the “CEO” will start talking, the shot will change between the “CEO” and shots of the product. After this the “developer” vil start talking about the product, and shots of the assembling process and coding will be shown.

The “CEO” is going to be played by Ruben, the user is played by Emilie and the developer is going to be played by Aksel. Daniel knows most about filming, therefore he will be in charge of the filming.

Day 9: Wednesday – Connecting dots…

It’s time to wrap things up and get the subfeatures working together. This has proven to require a lot of thinking, coding and designing. The goal since day 1 has been to have a functioning prototype by tomorrow leaving the report, nice to haves and exam preparation for the remaining days.

The initial test of the day was to get stepper and waterpump working to dose flour and water into the mixing container. With a few adjustments we found a stepper speed optimized for dosing flour. In this test we ran into a new problem of preventing uncontrolled spill of flour when demounting the flour container. This was solved in plenum as we went through this test.

Todays jobs were distributed among the members of the group:

  • Coding screen text and pictures
  • Connecting motors and sensors (to a functioning circuit and main code)
  • Mechanical features … (TB explained)
  • Fine tuning Node Red interface with ‘nice to haves’ and nodeMCU/Arduino connectivity.

OLED display (Overly Lousy and Evil Display

Coding text to OLED has proven to be harder than anticipated. Some faulty code keeps disrupting the screen display when printing messages in several lines to the screen. So only 1/3 of the screen could show text, which was highly frustrating. We had no problems printing an image as an xbm file, so we planned on uploading an image with text when we needed multiple lines and then we made a drawing for every mode.

Later in the day we finally had a break through and found the error in the code, so now it works as it should. Then we tried connecting a SR-HC 4 ultrasonic sensor to the circuit and made a code which displays on the OLED when a refill of flour or water is needed.

Node RED

Today we changed some details in NodeRED. The link to the dashboard will now take you to a page with a button, and clicking this button will either take you to the sign up page or the main dashboard if you already have signed up. We also managed to clear the different inputs on the dashboard after you save the information as a flow or global variable. We also added a count down function which counts down the amount of days left on travel or baking mode. To make sure that the user will not stop the mode by mistake, we added a pop up window, which asks if you are sure you want to stop the current mode. If you try to overwrite the travel mode with baking mode or vice versa, you will get a pop up window telling you that this is not possible, because of the current mode. To change mode you would have to stop the current mode and then activate the new mode. 

The lids

We laser cut the different part of the lid for the containers today. The lid is made from 5 acrylic parts. The first two parts are made to fit the ultrasonic sensor, and the tube. One of the these part have a space to mount a hinge. There also are two plates to lay around the tube and the wires, with at hole to get the wires out. At last we have the top part of the lid. 

Day 8: Tuesday – A long way to go

Today we took a few more steeps in the right direction, but everything is taking a longer time than we anticipated, and we still have a lot to do. Our goals was to finish the sourdough machine by day 10, but it is starting to feel a bit unrealistic. Currently it looks like we will have the product ready by day 11, and perhaps we can use the weekend to film, and write the report, so that we will finish everything on time.

One of the goals for today was to collect the Arduino code to one file which is functional with all the components. Another goals was to test the motor set-up and start measuring the amount that get dispensed, for this we needed to build a prototype chassis.

The arduino, nodeMCU and all the components, WIP

Today Aksel has focused on wiring all components and code together, except for NodeRED just currently; that will probably be tomorrow.

The first challenge has been getting it organized in a way that allows us to easily spread it out again on the test bench. Therefore I chose to link up 4 breadboards and keep the arduino on the side. We can then just split the breadboard up if that is needed.

Thereafter I looked at every arduino code file and made each task into a function so it is all callable. Currently are we going to have the following code functions:

  • Amount(“containerName”), returns and float with the distance from the container lid.
  • Flour(degrees, speed), to be changed to accept mL, but might vary from flour to flour. The speed is to change the intensity of the movement.
  • Water(mL), to be changed to reflect a measured flowrate.
  • Mixing(degrees, speed), to be further incorporated into a mixing function taking into account the amount of sourdough.
The current breadboard setup with: arduino uno, nodeMCU, 2 stepper motors, 2 easy drivers, peristaltic pump, 3 ultrasound sensors, 12-5v voltage regulater, N-channel MOSFET, , barrelplug and a lot of wires.

The next steps are writing the functions controlling the various modes. So that includes baking mode travel mode and keep it kicking. Also the display code needs to be finished and incorporated in the main code.
Sebastian is currently writing the display code which will make it possible to display any string easily.
The biggest challenge however is going to be establishing a logical way of establishing serial communication between the nodeMCU and the arduino as the nodeMCU acts as the wifi hookup.

OLED

Sebastian and Emilie worked on the OLED-screen, which is a quite unreliable little thing. Even though we bought a new OLED with high resolution and color, it caused us trouble, as it turns out that the display Adafruit sells has one extra pin broken out. A pin that our cheap Chinese knock-off seemed to miss: the CS pin (Chip Select pin). We will ask if instrument group can help us to solder it so it works, but at the moment we plan on just using the OLED we used with the locker.

We figured out how to load images to it, flip between displays and change the font and position. It is important that the display provides easy interaction with the user and is in line with our vision.

Testing the old OLED with a HappyDough™ logo

Day 7: Monday – Important progress

Today we tested the flour dispense mechanism. Since the gears were already mounted on the motor, and we had the code for the motor, we just needed to mount the screw on the shaft. As seen below the motor started, and everything was moving as intended.

Then we tested the setup with with the auger screw inside the flour container to see how the flour would behave. As seen below this went very well, and the flour was successfully dispensed. Next step is weighing the amount of flour dispensed at each turn.

This was also our first test of the wall we put inside the flour container on friday. We learned that the flour is dispensed better with the wall, than with no wall, but it did not move the last bit of flour inside the flour container properly. We want to try and optimise the shape of it, by making a square or a trapez shape instead of a rounded shape.

The red lines illustrate how the shape of the new wall in the flour container should be

Node Red progress

Today, we change to layout of Node Red, we keep what we already made and reconfigured some of the elements. The first link you will get to is the page where the user need to input their email. The go back button will take the user back if they came from another dashboard, otherwise the button will not do any thing.

After inputting the email, the use will get to a page where they can name the sourdough and the button will start a new sourdough, and send the user to the main dashboard. The cancel button will send the user back to the dashboard they came from.

In the main dashboard we remove the start a new sourdough, we did this because, the user, will have a smaller chance to start up a new sourdough by mistake. We also add the funktion to create a new user. This will take the user back to the sign up page, it the user regrets the user can use the Go back button to get back to main dashboard.

In the informationen part, we add the name of the sourdough, the baking mode and the travel is not change. The emails for the empty contianers and for the overfilled sour dough contianers is also set up. The Node Red layout is getting finish next thing is to test it together with the Arduino.

The electronics

Aksel has worked on putting all the various electronic together on a few breadboards as this will make prototyping and testing easier when the first chassis/test bench, is done. Besides that is important to test it all set together to verify that there are no conflicts.

The power supply has been ordered, it’s a 12V power supply, therefore we use a voltage regulator to power the Arduino and other 5V components.

The NodeMCU, stepper motors (and their drivers) and the peristaltic pump all run on 12 volts. There is even the option of dosing the flour with a 12v DC motor if the stepper motor isn’t powerful enough. This could also be explored as a mixing option.

Day 6: Friday – Sourdough container and flour dispenser

Friday we worked on the overall shape and dimensions of the sourdough machine. We made calculations on the volume of both the flour and water containers, based on travel mode, as this mode sets the highest demands on the flour and water amount. Both of them can be shortened quite a bit which makes the machine much more fitting on the kitchen counter.

From our prototyping of the flour container and dispensing mechanism, we figured out, that the container needed a wall, to make sure the flour doesn’t turn around with the auger screw when the amount of flour is low.

The wall inside the flour container

The sour dough container was initially prototyped from a tube and a cut acrylic plate material. This proved to be waterproof and the material could therefore be used for the final prototype.

The final prototype came in production in the work shop on thursday the 13th and was finished today. Finalising the prototype showed, that I (Sebastian) had made a mistake in designing the handle. It quickly showed that the shape and dimension would conflict the overall structure. Apart from this, the design also has an unpractical feature on the bottom piece on which the container stands. It has been fabricated too large. This feature cannot be changed due to risk of breakage. The mixing chamber has a snap fit at the top which holds the shaft.

At the end of the day it was decided to remove the handle, which we will do on monday. We decided that the container would work just fine without an actual handle, so instead it will be removed and carried with both hands on the curved bottom. This way it is easily handled, lifted and taking in and out of the machine. Carrying the container is now analogous to carrying a child / a pet, which we see fit as the sour dough also is a living organism which you take care of.

We also decided on the overall shape of the mixing blade. We need to make a new version which is a mix between the two prototypes we have at the moment. It should have both the vertical bars and a scraper at the bottom to make sure stirring is optimal.

We also worked on NodeRED, making the dashboard more user friendly and enabling e-mail notifications when the user starts a new sourdough or changes the setting.

An other part that started today was the connection between the mixer and the motor. The connection should be able to take the the input shaft in any angle configuration and output the angular. It was a lot of CAD work. Next step is to 3D print it and see if it works.

Day 5: Thursday – Stepper motor and NodeRED

Aksel, my focus has been upon: creating an Arduino function for the mixers’ stepper motor, designing another dough mixing hook, helping with NodeRED and other miscellaneous things.

The function accepts 2 values, a mixing degree (how much to turn away from neutral) and a speed between 0-100%
E.g the stepper motor turns 45 degrees forward, then -90 degrees and then 45 degrees again. This returns it to the initial steps and it’s now ready for the next mixing cycle.
Our stepper motor is a 17hs4401 bi-channel which is rated for 1.7A and we drive it with an easydriver which can deliver 0.75A per channel. This results in a 1.5A current.
We had to turn the Easydriver up to its max to reduce the risk of it ‘stepping wrong’ in high viscosity doughs. This is however a problem that can be mitigated with the proper gearing and potentialy a more powerfull motor in the final product.

Node Red

We also worked further on the Node Red coding. We choose that we wanted the node to communicate the mode/setting, and a few other thing needed to control the modes, but other than this most of the coding and the functions will be done in Arduino.

The dashboard has 4 main functions. The first one is to display information from the sourdough machine, this will show information that the user needs. The next one is to start up a new sourdough. This will send a message to the NodeMCU via the MQTT to start the mode called Start-up. This mode will check if the sourdough contianer is empty, check if the flour and water container is filled, and then mix the water and flour to start up a sourdough from scratch. The Start-up mode will end after 3 days, where NodeRED will send the message to set the mode to Keep it kicking (standart mode). In Baking mode the user types in the amount of dough needed in their recipe and which day they want to bake. Baking mode will feed the dough the appropriate amount, to make sure that the amount of dough needed is ready on the right day, and that there is also some sourdough left, to keep it going. After baking NodeRED will set the mode to Keep it Kicking again. The last function is travel mode. Here the user will type in how many days they will be gone for and press OK. NodeRED, will send the message to NodeMCU to start up the travel mode. When travel mode is started the user will be asked to remove some of the sourdough, and the machine will check if the flour and water containers are completely filled. Then the machine will keep feeding the dough a smaller amount of flour and water everyday, increasing the amount as the weeks go by, and after the set amount of travel days, the mode will be changed back to Keep it Kicking.