Measuring bread dough volume with ultrasonic sensors

Hi, I am new to Arduino, but well versed in practical electronics, engineering and project construction.

I am also a keen breadmaker of long standing and enjoy projects related to this that can improve the quality of the bread I bake, or make life easier.

After mixing bread dough, it is put into a large container where it undergoes what is known as bulk fermentation. This is partly to develop the strength of the dough, but also to improve flavour as biochemical processes take place, CO2 is given off and the dough rises. Bulk fermentation of sourdough lasts anything from 2 hours up to 6 or more.

One measure of when bulk is complete is how much the dough has expanded in volume. For sourdough an increase of 40-50% is considered about right. Measuring the dough volume can be tricky. It's easy if the dough surface is flat, but as fermentaion progresses, the dough develops a domed top and also has individual rounded peaks and troughs - a bit like a mountain range. This makes it difficult to measure volume to determine % increase.

I have developed a manual measuring system to do it:

but I thought it would be great if I could do it with an Arduino and multiple ultrasonic sensors such as the HC-SR04. I have read that certain techniques need to be employed to improve the accuracy of this sensor.

Here are some design specifications:

  • ideally 20 sensors, but 10 may do, fixed in an array in a bowl lid, possibly made of acrylic
  • bowl diameter 280mm
  • accuracy +/- 1mm, but would accept 2mm
  • distance 60mm - 10mm (although these could be increased by 10mm by having a raised lid)
  • distance calculation (and hence volume) should weight results from outer sensors because outer annuli of the circular bowl surface will have more area associated with them

Please advise feasibility and how I might go about this.

Lance

Do look up the specifications of the HC-SR04. Your expectations are unrealistic.

The VL53L0X may work better for your application, though it's not easy to connect multiple to a single Arduino (you'd need an I2C mux).

In any case, moisture during the process and the cleaning afterwards are going to be major issues.

And the winner of this weeks "make-simple-tasks-as-complicated-as-possible"-competition is .... :slight_smile:

Of course there may be simpler solutions, but where's the fun in that? You have to have something to do while waiting for your dough to rise! After all it's about as interesting as watching paint dry.

Just shoot wvmarle's single sensor at the center of the dough. Given the curvature of the bowl an initial volume calculation would be straightforward, no? Basically an electronic version of your T-square technique.

Apply a formula which models the curvature of the top of the dough as the sensor distance changes. Ignore the little bumps and valleys. Add this to the initial volume calc.

Is 1mm accuracy on an amorphous blob of dough realistic?

Thank you for your replies.

wvmarle:
Do look up the specifications of the HC-SR04. Your expectations are unrealistic.

The VL53L0X may work better for your application, though it’s not easy to connect multiple to a single Arduino (you’d need an I2C mux).

That seems to be a better sensor for the job, or perhaps the shorter range version VL6180X? These sensors are more expensive than the ultrasonic one, so employing 10 or more sensors won’t be feasible. I wonder about 3 in centre middle and near edge positions.
I guess you could even have them on an arm which is manual rotated from the centre into 4 quadrant positions and the results averaged.

But how to do all this!

Lance

Just have a light beam from one side of the bowl to the other - when the dough rises it will break the beam , have more than one if you want it complicated .

Would it help to change the shape of the bowl?

What if t was a cylinder?

John.

albacore:
These sensors are more expensive than the ultrasonic one, so employing 10 or more sensors won't be feasible.

Of course... about 5 times the cost of the HC-SR04 I guess... they're still not expensive, I paid the equivalent of just over USD 2 for my VL53L0X sensors.

Put a lid on the dough that's pushed up as it rises, keeping the surface roughly level in the process. Then one sensor in the middle should be enough.

wvmarle:
Of course... about 5 times the cost of the HC-SR04 I guess... they're still not expensive, I paid the equivalent of just over USD 2 for my VL53L0X sensors.

Well, in that case, I can go back to 10 sensors ;), except those multiplexers seem to have 8 inputs, so do I go for 8 sensors?

And what sort of Arduino do I need (and code?!)

Lance

HillmanImp:
Would it help to change the shape of the bowl?

What if t was a cylinder?

John.

Good point John. I have manually calibrated the bowl by incrementally adding water and measuring the "dip" to produce a look-up dip table. I presumed this data could be inputted into the Arduino code "somewhere or other". There is also the issue I have already mentioned of the squared area function of the circular surface which will require weighting.

If necessary, I suppose I could eliminate these two issues by having a simple rectanguloid dough container.

Lance

For Arduino board I'd start off with a regular Uno or Nano board. There first is easiest for quickly hooking up some experiments, the second for soldering onto perfboard or plugging into a solder less breadboard.

Don't worry too much about the shape, the Arduino can calculate those things quite well, and of course you can easily add lookup tables as well.

wvmarle:
For Arduino board I'd start off with a regular Uno or Nano board. There first is easiest for quickly hooking up some experiments, the second for soldering onto perfboard or plugging into a solder less breadboard.

Thanks wvmarle; your replies have been very helpful - and positive!

Lance

What about using a camera to monitor the change in size? I would think the code could be written to measure its size. If the background was completely green, the code might be able to count the number of green pixels and the number of white pixels.

I wonder how the weight of the dough mass changes as it ferments.

John.

HillmanImp:
What about using a camera to monitor the change in size? I would think the code could be written to measure its size. If the background was completely green, the code might be able to count the number of green pixels and the number of white pixels.

I wonder how the weight of the dough mass changes as it ferments.

John.

Interesting ideas John. If the camera was sited to have a plan view, I don't know how it would measure surface height variations.
Re weight, yes there is a small weight loss as fermentation proceeds and co2 is given off, but there will also be moisture loss due to evaporation (temperature might be 28C) and I don't know how you would separate the losses.

I did find an interesting scientific article on a project with pretty much the same goal as mine, and interestingly enough they used a lidar sensor and an Arduino! With their setup they used a single travelling sensor on a motorised arm - more complex to implement.

Lance

A camera sounds inappropriate for this application.

One major problem is that a camera has a 2D image, and can not measure distance. You would have to add markings on the wall of the container and have the camera try and read that... the problem is that computer vision takes a lot more computing power than an Arduino can even dream of.

That's why my suggestion of putting a lid on the dough that rises with the dough, keeping it more or less level in the process, and read the position of the lid. That should be a good measure for the change in level of the dough.

Lance,

Fascinating industrial challenge, that paper makes out.

I take it you work with one dough at a time rather than many as in the branch bakeries.

John.

HillmanImp:
Lance,

Fascinating industrial challenge, that paper makes out.

I take it you work with one dough at a time rather than many as in the branch bakeries.

John.

Yes, mine is purely a hobbyist project. I think the one in the paper was more challenging because they were applying it to loaves in final proof, as bakers say, rather than in a bulk container, so much more 3-dimensional.
Also they were dealing with multiple loaves in compartments, so trickier.

Mine should be a walk in the park - once I learn how to write the code!

I guess I'll start with one sensor and get that working first.

Lance

Still think a beam break across the top would be the easiest ...

Yeah, see what you can achieve with a single ultrasonic sensor. That will be easy. You won't get mm accuracy, but perhaps cm accuracy.

The coding won't be hard -- until you introduce multiple sensors.

Looks like if anyone can crack the challenge at the commercial scale they'd make a million.

John.