Barmonkey-type robot... seeking advice

Hello all!

First off, I haven't even touched an arduino yet, or any 'duino' for that matter. I am brand new to almost everything, although not long ago I soldered an IR LED extension together off a remote control... but that's it. I am a very capable, fast learner though- so given a little time I bet I'll be working well with arduino no problem (fingers crossed)

Ok, my first (and possibly most important) question: Which model of arduino would be capable of running 16 separate liquid pumps (the type I am using can be seen here: Amazon.com ), run one stepper motor, accept input from an ipad over a local network (using the Ardumote HD app hopefully), and input from 5 touch sensor switches.

Will that be possible, or am I dreaming too big?

The above setup is for a "barmonkey" style robo-bartender, controlled by ipad, with a platter that moves to pour up to 5 drinks/shots. I don't want to use windshield wiper pumps as many say since they arent food safe they arent wise to use, plus the sweet pumps listed above are cheap and have great reviews.

If there is an Arduino board with more room than that- I would also like to implement one more input and one more output for a completely different purpose (those would be to open and close a theatre screen curtain when the projector sends a signal from it's trigger port, which is a simple 1/8" female audio cable port)

Should I get a mega as my first arduino in order to complete this project, or will that not even be enough? What shields should I consider getting right off the bat? From my initial research tonight, it seems a Arduino Mega should fit the bill for the number of I/O right? I think I will need either an ethernet or wifi shield as well to allow communication between the ipad, via my home network, to the Arduino. This will allow guests to choose the drinks on the iPad, and the arduino will run a "recipe sketch" turning on specific pumps for specific amounts of time. All pumps lead to a funnel suspended over the glass/shot glasses. If the recipe called up is a drink that requires a glass, the arduino just pours it. If it is a shot recipe, the touch switches tell the arduino how many shot glasses are in the tray (they will sit securely in holes in the tray), and the tray moves via stepper motor under the funnel between shots until the proper number is poured.

Additional questions:
Is it ok for me to locate almost everything inside a fridge? (provided reception for communication is still ok)
Do I need to worry about the power draw if several pumps fire at once? (I'll be using a wall wart power adapter for the Arduino's power)
and (I know I'm asking a lot here) if there are two MORE outputs available to me, I would like to have a strand of blue LEDs switch to a strand of red ones while the pumps are running, for effect.

Just to recap: I'll need 16 outputs for the little liquid pumps, one for a stepper motor, five for the shot glass switches, hopefully one input and one output for the theatre curtain, and it would be nice to have two more outputs capable of running LED strands for lighting effect. Oh yeah, and I am hoping to use the Ardumote HD app, so I'll need the Ardunio to have the capability to do so either wirelessly, or wired (but it can't be wired to the iPad directly... the iPad is entombed inside a poured acrylic bartop ((kind of, I can still get it out... but it has to be always plugged in because it's a pain to get it out of there))

Steer me in the right direction guys!

Will that be possible, or am I dreaming too big?

At least most parts may be possible, but for somebody that "First off, I haven't even touched an arduino yet, or any 'duino' for that matter. I am brand new to almost everything", this will probably be a significant undertaking. You may want to start by doing a google search of this forum and the old forum for similar projects (I think I remember similar robo bar projects). Go ahead and get a mega and start tinkering.

How much current do the pumps need? It's unlikely that you'll be able to drive them directly off the Arduino. The absolute maximum current you can draw from a single pin is 40mA, and the recommended limit is about 20mA. There is a figure for total current draw from the whole board, but I can't find it at the moment. The same goes for the stepper motor.

Thanks for the replies so far!

As for my experience level- after hours on end of reading tutorials from different sources, and learning about peoples hardships and roadblocks with their various projects and how they overcame them through sketches or hardware improvisation- as long as the solutions and hardware capabilities are out there, I am confident I will find them and succeed in this project, especially with help from guru gentlemen such as yourself as I embark on my journey :slight_smile:

Regarding the current draw- I figured this (as well as number of available I/O and the difficult sketch learning curve ahead of me) would be one of my my biggest hurdles. I saw a forum here on running "big things" off an Arduino... I'll check that after work today and learn me some knowledge about running things from a different power source than the Arduino, but still controlling them from it. I haven't seen the current draw of those pumps... maybe I'll make a phone call today and inquire... or I'll just order one and do a test or two?

Are you certain there is enough available I/O for what I hope to accomplish? If the answer is a hands-down "yes", I'll place my orders this afternoon!
Refrigerator / other questions?

Thanks so much guys- this forum will be instrumental to my success.

You can always extend outputs using shift registers. Using two 74HC595s, for example, you can control the sixteen pump outputs with three Arduino pins. http://arduino.cc/en/Tutorial/ShiftOut

Fantastic! I read that whole document on shift registers, and it gave me a lot of hope!

Will I need to shift register a Mega at all? It has 54 digital I/O… but to be honest… I need to read up on what outputs can control the pumps mentioned above. Can they be controlled via digital output? I would THINK so…

If the mega has the networking shields I need (Does the Wifly shield http://www.sparkfun.com/products/9954 play well with a Mega?) and if it would prevent me from having to shift register… than it seems like Mega wins out over the Uno with registers right?

Unless you guys from experience know that shift register actions are no sweat. I mean, if you think buying a mega for this project is overkill- please let me know so I don’t waste my money for something I don’t really need.

please let me know so I don't waste my money for something I don't really need.

Just as a reality check, if you can't afford the cost difference between the uno and mega, you can't afford your project. How are you going to accurately meter the liquid being pumped by the pumps you have chosen?

Oh no, I have about $600-$800 bucks to spend. If I can do it for $200 though, then that's what I'll do :slight_smile: No sense in spending more than needed to accomplish the goal!

I already have $2k in booze to select from, so that doesn't even figure into the project costs.

To somewhat accurately measure the liquid amounts, I'll run the pumps and record how long it takes to pump 1/2oz and 1oz in milliseconds, then use that data in my sketch as to how long each pump must run for depending on the required amount. I had thought of using weight pad sensors under the bottles to blink an LED when one of them approaches empty bottle weight too... but that's only a luxury idea I'll think about implementing if I can achieve my original goals first.

I'm not OVERLY concerned with accuracy, but I think my above idea will get me close enough to the ballpark I need to be in.

The shift register itself won't be able to source enough current to drive the pumps. You might look into something like the Logos Electromechanical 4x4 Driver which can supply 5A on (coincidentally) 16 channels. You can also add additional sets of 16 channels as needed.

With respect to getting WiFi reception inside a refrigerator you can pretty much forget it. The metal shell of the fridge is going to block any wireless signals. If I were in your shoes I'd link the Arduino via USB to an external computer that hosts a web application to drive the Arduino. It would simplify that aspect of the development an awful lot. See the Interfacing with Software page for lots of examples.

Ok, Thanks! I'll go read up on the 4x4 Driver for sure.

Wifi = out. I thought I'd have problems with that. No big deal, I'll use an ethernet shield to connect it to my network. There is an iOS app out there called Ardumote HD that seems PERFECT for what I want to accomplish as far as controlling the Arduino once it's on the network. (I can't just use the on-board USB port to get it on the house's network right? I figure why would they sell an ethernet shield if you could?) Good to know that the board and electronics themselves will be OK in the fridge though.

I started reading tons of motor forums and tutorials and I have learned how to properly add a separate power source for motors so they don't draw power away that the Arduino needs to run, so I figure that's what I'll do if the 4x4 driver isn't necessary.

I have made a quick Google Sketchup of my rough circuit layout, it can be viewed here:
http://sketchup.google.com/3dwarehouse/details?mid=3f81a2427e858d832a74e1c1b20a2b22

Obviously its very rudimentary and bare-bones, but it helps paint the picture a bit.

And for anyone who is interested, I have modeled my mancave in sketchup also- it now has my design ideas for the robobar in it too. I plan to use 6 Crystal Head vodka handle-sized bottles with their spouts cut off and holes drilled though thier teeth for the liquid lines. I have these positioned on the beam directly above the bartop, and behind them is where I plan to have the six blue LEDs and six red ones which will hopefully switch from blue to red when pouring a drink, then back to blue when done. You'll notice in the sketchup that the pumps and arduino are directly on the other side of the beam if you orbit around to have a look. That placement is just an idea... still thinking about locating it all in the fridge below the bartop. Also notice that the funnel and stepper motor shotglass arm are featured on the center of the back wall between the glass block liquor bottle shelving.

The sketchup link to see my design ideas for the robobar sitting in the Mancave (what I just described in the paragraph above) can be found here: Sign in - Google Accounts

WiFi doesn't have to be out, if you can attach an additional antenna to the board. It would be easier to route a thin antenna cable than it would be to route an ethernet cable, I would think.

The mega will have plenty of digital io ports for this but wouldn't supply enough amps. You could get the mega and add an io shield like: Mega IO Expansion Shield V2(SKU:DFR0165 from dfrobot.com. That allows an external power supply. Not sure how many amps you need or how much the io shield can handle. Alternatively could you use a solenoid valve like an ice maker valve and gravity feed? Probably less current and I'm guessing it might give you a more accurate measure.

I didn't know adding an antenna was an option! You are correct, it would be easier to route an antenna than the cable. Easier to get working correctly from a coding standpoint... maybe not so much I bet but I could be wrong. If I can find a tutorial on how to add the antenna, then a wifi shield is what I'll do instead!

I like the idea of the Mega IO expansion shield- especially if it has a separate power supply built right in! The only hang up is I need to figure out how many amps I actually need to run all 16 pumps + two stepper motors. If the IO shield lets me adjust the power up to meet my consumption needs then I'm in business. I suppose I would stack the Wifly on top of the Mega, and then stack the IO expansion shield on top of that?

As far as gravity feed options and using valves instead of pumps, there are inherent problems with that route- at one time I considered it. For gravity feed to work, all 16 bottles must be up higher than the dispensing point and only 6 of mine will be- the other ten will be much lower in a chest-style fridge. Also, as the volume of liquid inside each bottle changes from full to empty, the amount dispensed will change due to the decrease in pressure. The only way around that is to write some complicated sketch where the arduino either counts how many ounces it has dispensed and alters the timing of the valve associated with each bottle accordingly, or it uses a weight measurement of each bottle to calculate how much is left and adjust valve open time. That sounds really complicated to me... and a moot point anyway since my bottles are down low.

I saw a suggestion somewhere where a gravity-fed system opens the valve to fill a beaker that has a float in it (like a tiny ping-pong ball). when the float raises to 1oz it breaks an IR beam sensor at the top which closes the valve above the beaker and opens a valve below the beaker. That way no matter the flow rate from the gravity-fed bottle system, you always get the same amount. Pretty clever, I thought.

It is a common fatal mistake to attempt too much for your first projects. I would highly.. highly.. recommend getting a standard Uno, and a virtual parts run to Digikey/Mouser and learn how to make your own circuits on a breadboard.

Shift registers are going to be your friend here. If you need 128 outputs, you can use three pins and just string the shift register ICs from end to end to end to end. It's super easy to code, if you learn how to do bitwise operations (which is essential anyway).

For instance, let's say you have your Uno chillin' in the fridge. You can run a little ribbon cable to where the solenoids/pumps are and have the shift register there, along with a stout PSU with enough juevos rancheros to power them. The shift registers' individual outputs turn on high-power transistors which switch on your pumps/solenoids. Or, if your pumps end up using AC, then a relay instead of a transistor.

The nice part about this is you can use all through-hole components (no surface-mount ICs) and stripboard from your local Radio Shack to build it. Or you can make a nice PCB, if that's your cup of tea. If you use a Mega, you're in surface-mount land and things get more complicated. Still doable, but harder -- at least unless you have the equipment, eyesight, steady hand, and patience to do it.

So there's my two cents. Be patient, learn thoroughly, design smart. In the meantime, there are tons of cool mini-projects you can do. The parts are cheap. You're obviously at least kinda the DIY type if you're considering this, so enjoy experimenting for a while before you go all-in.

SirNickity, your post is great, thanks!

Your logic of doing through-hole instead of surface mount is sound, and a game changer. I was about to pull the trigger on a mega and you answered a key question for me. "This is doable, (and as you put it, probably less intensive) on an Uno" is what I pulled out of it.

As for learning my way up- I fully intend to- but I am going to try to learn by doing projects that relate to this overall goal in specific. I will light an LED. Next I'll light six in series. Then I'll alternate two sets of six LEDs. Then I'll try to light the same sets from off a shift register. Next I'll attempt to run a pump with it's own power source. Then I'll attempt to learn to work the Wifly shield. Next I'll mess around with the ipad app to try to get it to light LEDs. By this time I should have a bit of sketch-writing knowledge, and using the forums and tutorials I'll try to get the arduino to operate one pump if button A is pushed, and a different pump if B is pushed, and run them for a specified amount of time before stopping the operation. After that I will learn how to work a stepper motor, and then how to get the arduino to recognize touch switch inputs. I'll do these all as separate projects.

At a certain point, I will bring it all together. In this way, I can take baby steps toward one common goal: the RoboBar!

Being absolutely the DIY type, I have recently finished my 1,700sq ft bare basement with a stadium-seated theatre, a full bathroom, a lounge area, a bar/mancave, and a soundproof music studio (actually, the studio isn't quite finished yet), doing all construction and electrical work according to code, obtaining required permits and passing all city construction/electrical/plumbing inspections 1st time. (if you can't tell, I'm proud of it a little) Craziest part is, I learned EVERYTHING from the Black and Decker books- no kidding. I even wired in a new 150 amp subpanel service and the inspector said "well, you obviously know what you are doing here" HA! If he only knew I just read a few books and got to work.

It's silly to me that I feel capable enough to safely wire an entire house full of 110 and 220- but I shy away from low voltage stuff because my books didn't talk much about it! But I know that with enough reading and perseverance- I can pull this off :slight_smile:

I already own a good soldering gun, multimeter, USB cable, soldering workbench with magnifying glasses and helping hands...

So in my cart is an Arduino Uno, a Wifly shield, two 74HC595 shift registers (maybe I should get 3?), 16 pumps, 13 LEDs, 5 pressure switches, 2 stepper motors, 16 weight sensors, a power supply for the Arduino, some ribbon cable, an antenna extension wire for the Wifly, and a breadboard with a slew of jumpers. I can't get the power supply for the motors yet, because I still don't know how much power I'll need to supply. I'm sure there is plenty more I need besides that- but I'm unsure of what it is right now LOL. (transistors, resistors, and the like I am sure... Maybe a diode for good measure :wink: good thing Radioshack is right down the road, I'm sure I'll be making plenty of trips!

Any other "must-haves" for cart? Maybe even something to help with my "curriculum" I laid out above?

Any other "must-haves" for cart?

Powered USB hub to provide an extra level of protection for the computer when you accidentally short-circuit something.

Glad you mentioned that- I have one, but I may not have thought to use it :astonished:

Awesome, man. You're on the right track. Do you have pics of the room? Sounds like a heck of a project.

You might want to get some TI CD4021 shift registers for parallel-to-serial (multiple input) conversion as well. Always get more than you need, because at some point you'll flip the IC around, or misread the pin reference, or wire an output straight to ground....

Get lots and lots of 10K resistors, and 0.1uF ceramic caps. Lots.