I plan on giving updates on what I'm working on here, since I'm useless at writing blogs. I'm hoping i can stick to short regular updates.

Here's my cocktail machine. I'm currently writing the software for it!

The 6 pumps you see are peristaltic pumps. Chosen for accuracy in pouring small amounts. They flatten anything carbonated though, so there's some air pumps in the back for pumping soda.

Software side is using .NET Core 3.0, Razor components running on a Pi, with the IoT library for controlling Pi hardware.

Mainly went this way because C# dev is part of my day job and i like the new razor components in 3.0.

The hardware rework is done, and things are no longer just hot glued to the back of the machine. I am however going away for the next 10 days.

So I've just had my first instance of the software locking up while the pumps are running. The pi is unresponsive and I cant stop the pumps spinning 😂

Success! Ran my first "recipe" - a series of steps that make a drink. Each step can run any number of pumps for any length of time.

The cocktail robot now uses entity framework! I'm working on the admin/management functions first (adding recipies etc) to make testing easier. User and ingredient management is done. I also got the RFID reader working.

Is this how I should be reporting on this, replying to the first toot about it?

Progres: new clear nozzle, rfid logo for people to tap their tags against, testing with gross green coloured water :raspberrypi:

The problem with the old prototype was the nozzle would drip heaps. Pumps now run backwards for a bit when they're done to suck liquid back up the nozzle - stole this idea from 3D printing.

Last night I also tested the 2 air pumps for dispensing carbonated or large volumes of liquid. They work well but don't create a vacuum when run in reverse, so those two nozzles still leak for a while.

Guests get a rfid tag. When the machine gets a tag it hasn't seen it asks for a name, which the guests put in arcade style with the joystick. Did I mention people are coming over this Saturday? 😂

The flash gives the user some immediate feedback. Also, i can use my gym card.

So i had a party, it mostly went well! There's a few bugs, and there are definitely improvements I'd like to make - but all the patrons were happy 😁 first thing to look at is why the calibration periodically changes..

One last minute problem was the slow bubbling of soda caused the bottles to pressurize and continually leak. I thought air would slowly leak out through the pumps, but no. Stressful! Not sure why the Sprite i tested with didnt do this. Solved by putting a pinhole in the side of each bottle 🤔

The work on the cocktail robot slowly continues. A loadcell arrived in the post so im setting it up for glass detection and calibration of the pumps.

While I've been quiet the robot has hosted an after-work drinks session that went really well 😁

I think this graph is going to be really handy to troubleshoot calibration etc.

I've replaced the mfc522 card reader with a Pn532 (temporarily wired for now). The pn has a more mature library for it, and seems to solve the issue of cards being partially read.

It also uses fewer pins (UART vs SPI) and so I can wire up the loadcell using all existing wiring.

I'd like to take a moment to praise d-sub connectors (DB-25 etc). They're awesome. I'm surprised by the current they can handle every time I look it up. You can't connect them backwards and they're easy to solder to.

All of the motors on the Cocktailor are powered through a DB-25. A lot of my model planes have DB-9s in them to connect wings etc.

Replacing rfid scanner with a different one. New scanner and load cell using the existing cable due to UART using fewer pins than SPI.

Man do my side projects move slowly!

I've 3d printed a mount for the loadcell, i just need to mount it, and then build a platform that will hold the glasses that is suspended by the loadcell. Hopefully i will get that done this weekend.

In the meantime I've started making a faux neon sign from the movie "Cocktail" 😂

The loadcell is mounted and a hole cut above it. Time to make the platform!

Promise kept! Platform done.

Theres not many things in life that require you to google "splashless urinal mat", but now i have! Hopefully water dripping onto this platform wont splash too much. Plus it has drain holes in it to drain out under the machine 👍

Got the loadcell functioning as a glass detector. There is just a weight threshold. It turns some lights bright white so you can see your glass 😁

I can only apologise for not thinking to do this the first time around. Why did i think a black, non-glowing platform was acceptable?

Added event-based glass detection that controls the bottom set of LEDs. Then mucked around for an hour with multi-thread locking and misreading the library docs. Just for this..

Small update, I've put a few coats of clearcoat on the glass holder/drain. My 3d prints are not typically water tight and my concern was coloured liquid getting in there and staining the print.

I also replaced the power supply to fix the issue of the machine going out of calibration due to fluctuating voltage.

Its actually quite a challenge to come up with a list of 8 ingredients, from which you can make several drinks. Here's an example for an upcoming party:

Orange juice
Cranberry juice
Lime juice
Passionfruit syrup

- Hurricane (rum/passionfruit/lime)
- Cosmopolitan (vodka/cran/lime/cointreau)
- Cranberry zombie (rum/cran/lime)
- Vodka cranberry
- Vodka orange

I feel like this is an O(n^2) problem..

@IVData So are Razor components similar to React components?

@jmwright yes, in that you can define them and then reuse them with a tag etc. The cool thing for me is that I can call C# from user interaction so i can mostly avoid js 🙄

@IVData However you want to do it is fine. Having it in as thread like you're doing it makes it easier for people to go back through and catch up on your project if they get in part-way through, which is nice.

@IVData So like the retract setting on a 3D printer? Cool. Does it make it harder to dispense an accurate amount since you might pull air into the system when it's reversing?

@jmwright exactly. It works pretty well. The tubes go 'downhill' once theyre behind the wall of the machine. I only retract just enough that the liquid would have to go uphill to leak out - so likewise the air would have to travel down into the liquid to mess things up.

It just occurred to me that smaller tubing for the air pumps might mean air cant leak in to let it drip (rely on surface tension).

@IVData Is the dispenser nozzle set up in a way that wouldn't result in cross contamination with this retraction? Also, is there a viscosity limit for what they can pump?

Cool project!

@sexybenfranklin thanks man. Silicone tubes actually run all the way to the tip of the 'nozzle' so there's no contamination. And they pump at least a thick syrup (though at about half the speed of water).

@IVData Did the rfid cards work as expected with the guests? How did they react to them?

@jmwright most of them had used them before with the previous prototype. But they are quite intuitive really. Main issue is drunk people losing them lol. If you didn't want to keep track of who was drinking what you wouldn't even need them though.

@IVData What will the process be for calibrating the pumps?

@jmwright given a density value for each ingredient, the loadcell can be used to calibrate how long the motor should be on to pour a certain amount. Needs to be done for a variety of motor speeds too because PWM % to flow rate is not linear.

@jmwright also it can detect when a glass is present so a drunk patron doesn't make the machine pour all over itself 🤣

@IVData glad to see a new update. So this is going to be used for weighing out the measures?

@sexybenfranklin it'll just be used to calibrate so the measures are accurate. When making a drink all ingredients are poured at once, so you could only check the final weight in that case.

Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!