The hardware required is also very simple
If we get rid of the flow sensor, how shall we measure the output?
It the valve allows a given volume to flow per second, then it can be timed. So lets say opening the valve for eight seconds = 500 ml.
The 7" screen is great. But i guess ill start with the 7 segment display first. For affordable prototyping
Im trying to get started with the microcontroller, and im having trouble programming atmega 328p. (im trying to avoid arduino.
I suppose going with 7 segment display for now is good. I second you.
Concerning measuring the volume of milk using time of valve opening - it is a nice idea, i’ll however add another variable - height of milk in the tank (we’ll get from the level meter)
HERE IS THE EQUATION OF RATE OF FLOW OF A LIQUID FROM A TANK UNDER INFLUENCE OF GRAVITY
ALL OTHER FACTORS ARE CONSTANT EXCEPT HEIGHT OF FLUID & TIME.
FLUID VOLUME = RATE * TIME TAKEN
This computation can be done by the micro-controller, to accurately measure the output by varying time of opening valve.
I’ll help you with the programming of atmega328 standalone. it is quite simple.
Very good. The more the variables, or point of reference, the more accurate it gets. We could combine them all.
About programming the atmega, when will you be available at gearbox. Or any other way you could guide ne throught.
Hey Emmanuel. I can answer questions you may be having concerning programming, any difficulties you face. I know that on the forum there is a post we discussed on programming atmega328 standalone
Can you describe the exact trouble you are facing?
Programmer not detected by atmel studio. Thought it was a driver problem,
looked into it, still not detected
Before moving into atmel studio have you used the programmer on the normal arduino IDE to program atmega328 standalone chip? its a good starting point.
Arduino IDE supports a wide range of programmers
-Arduino as ISP
-Atmel STK500 development Board
-BusPirate as ISP
After diagnosis and fault searching, I discovered that it was the programmer that was damaged. Quite a waste of my time.
Anyway, i proceeded to the prototype and made a rough picture of how the main part of the dispensor will work using what i currently have in my hobby components kit.
In the breadboard, observe the arduino, four buttons, LED bar and relay: the buttons are a preset value of given amount of drink each having a fixed price. In this case: 300ml, 500ml, 700ml and 1 Litre buttons. So if a 500ml drink is needed, the user simply selects the 500ml button, and the relay opens the valve to allow liquid flow.
I had made a short working video to demo the process, only to realise i couldn’t upload the video. So ill just add a screenshot from the video showing the valve pouring into a cup.
This is very nice Emmanuel! nice work. it is very good to do breadboard prototyping before the final design, it helps catch unseen errors of the design concept.
I can almost see your circuit. Were you able to get exactly 300ml, 500ml, 700ml from the various push button selections in your experiment? - I understand accuracy is going to be quite an important property of the dispenser if it is to be used for business and profit making.
Sorry about the broken programmer
With the valve, no. Something to do with minimum pressure requirements to
allow the valve to allow flow. Apparently, only the brass version of it
would work the concept.
However, i replaced it with a miniature pump, carried a few analysis and
balancing (pumping at a (calibrated) amount of time on a constant votage
suppy) and it worked fine. Repeatedly using the same time gap gave almost
accurate (probably due to factors like spillage and air gap) amount of
So my assumption is, the amount part works
Great. Thats very creative of you.
By the way, concerning the video, you can upload it to your google drive space and right click on the options to obtain a sharable link that you can paste here. I’d really like to see the video
I suppose its about time, to begin designing the schematic and then the PCB
I agree its a goot time for the design phase. How do you suggest we go
Hey Emanuel, I’ve seen the video. Its great. All this hardware can be condensed into a single printed circuit board, which will be the heart of your system. It will be cheap, compact, professional and reliable.
I suggest using a KICAD software to design this board. I’ve done a conversation thread on splashboard v2.0, which you’ll find as one of the topics, and you’ll get everything there to get you started. The good thing with such a software is that it’s open source (forever free), and there is no licence to pay for commercial products like this.
I’ll help with any question you have. Please begin by putting all this into schematic first, then upload the schematic here we both evaluate and verify
Am into this, arent there kits in the china market for milk meters with displays and unit cost programming?