Assembly and operation instructions as of Maker Faire 2019

Please…if you have a better way to do anything please let me know. I·
made it up as I went along…

Assembly

Laser cut case
  • 2 sides
  • 1 back, with the cutouts for the pumps and mounting screws for the Pi
  • 1 front
  • 1 top
  • 1 dispenser/tubing management
Detail of dispenser mounted on the back
Pi, motor hat, wires, standoffs and mounting hardware
Pumps, mounting screws, and tubing
Insert four M2.5-12 screws through the back for the Pi mounting
Screw four standoffs onto those screws. Hand tight is fine.
Put the Raspberry pi on those screws. Use two M2.5 nuts on the side of the· Pi with the GPIO header.br> Screw two standoffs onto the standoffs on the other side of the board.
Attach the motor hat onto the GPIO headers. Use two M2.5 nuts to secure it. Put the pumps through the holes, attach with M3-12mm screws with nuts on the inside of the case. · The rear side of the bot.
Connect the black ground wire harness to each motor. Either top, or bottom lug, just be consistent. Route the wires in a way that is pleasing to you, cable tie them if you would like. Clip them shorter to fit your desire for order.
Connect the black ground wire to either of the screw terminals labeled ‘GND’ in the left group of screw terminals. Connect the first motor to the first pin of M1, and the second motor to the second pin of M1. The third motor to pin 1 of M2, and the fourth motor to pin 2 of M2. If you have 8 motors continue that pattern on M3 and M4.

The motor hat has 4 full H bridges which allow it to control four DC motors in forward or reverse. We are splitting the H bridges into two half H bridges, allowing us to control eight motors.


Tidy enough for me.
We have 12 volt pigtails that look a little different than this. Connect the red wire to + on the motor hat, black wire to -. Route the power pigtail out the hose hole in the back. Cable tie the pigtail to one of the standoffs on the pi
The insides are complete. Make sure the sdcard is inserted. Connect 5 volt 2.5 amp Micro USB power to the Pi, and 12 volt power to the 12 volt pigtail. Attatch the dispenser, connect hoses and run them into the dispenser.
Your kit has holes on the front panel for two screws and captive nuts to hold the front in place. You can also glue the back, sides, and top of the case. You probably don’t want to· glue the front because you want to have access to the Pi.

Software

Bartendro

Web Interface

Associate with the ‘HelloDrinkbot’ access point and then go to hellodrinkbot.local
in your browser. Or 10.0.0.1.

Restful Interface

You can make drinks by calling the restful interface

Example
http://hellodrinkbot.local/ws/drink/12?booze14=75&booze11=75

Command Line

The Hello Drinkbot repository has some utility programs demonstrating how to
talk to the motor control hat from Python.

cd hellodrinkbot/software/utility

# this will test all of the pumps, turning each on for 2 seconds, and then moving to the next
python ./pumptest.py 2··

Node Red

Chatscript

Your bot has a version of ChatScript installed for the Raspberry Pi.

ChatScript is a chat engine written by Bruce Wilcox.·
The Wikipedia page has a good description.

The official pages and the Github repository are·
filled with fascinating documentations and explorations into the issues involved with using natural language.

This article How to build your first chatbot using ChatScript has a nice introduction. Shorter version:

Connect to your pi, either connect a monitor/keyboard/mouse or ssh in.
cd Chatscript
BINARIES/LinuxChatScript64 local

Enter your name when prompted (or any identifier. ChatScript maintains persistence with a user across sessions)

Interact with the bot. After a couple of questions it will ask if you want a cocktail. If you say yes
it will pour a tiny cocktail.

There are multiple ways you can interface ChatScript with your bot.

Cleaning your bot

After I am finished I run water through all the pumps, and then I run some vodka through.

Accessing the Pi

Either connect a monitor, keyboard, and mouse to it, or access via ssh.
(Putty is an ssh client for Windows)

If you connect to the Pi via wireless you can ssh to the wlan0 interface. The username
is: pi, the password is: raspbery Yes, leaving the default username and password is a·
security risk. You can change it if you want.

ssh pi@10.0.0.1

You can connect the pi to your computer or hub via ethernet cable. If you·
have a Mac enable internet sharing (System Preferences -> Internet Sharing)
Your Pi will probably get the first address 192.168.2.2

ssh pi@192.168.2.2

The pi is setup with ‘Multicast Domain Name Service’ (mDNS) and so you should be
able to connect to it as hostname.local. The hostname is set in /etc/hostname
to hellodrinkbot.

ssh pi@hellodrinkbot.local

The ssid, the access point name, is set in /etc/hostapd/hostapd.conf.·

Look at logs/debugging

You can look at the logs by ssh’ing into the pi over any interface (10.0.0.1, possibly 192.168.2.2,·
or hellodrinkbot.local)

System logs are in /var/log and the web and bartendro logs are in /var/log/nginx

The following commands may be useful

tail -f /var/log/nginx/bartendro-error.log
tail -f /var/log/nginx/bartendro-combined.log
tail -f /var/log/nginx/access.log
tail -f /var/log/nginx/error.log
tail -f /var/log/syslog

Bartendro Admin

Click on the Bartendro logo in the upper right corner of the screen.

Default password is bartendro with password boozemeup

Exit admin by clicking on ‘menu’ on the upper left

···

Upgrade Bartendro Software

Connect to Hello Drinkbot - see above


Upgrade software
+--  2 lines: cd bartendro----------------------------------------------------------------------------------------------

Add pictures to your boozes for the graphical shots menu

ssh to your robot
cd bartendro ui
sqlite3 bartendro.db

Identify your booze:
select id, name, image from booze where name like ‘Vod%’;
1|Vodka|
55|Vodka, Blavad Black |
58|Vodka, Bacon Infused|

Update the picture:
sqlite> update booze set image=’potato.jpg’ where id in (1,55,58);

Put the pictures in bartendro/ui/content/static/images/

(there should be a way to add pictures at the Booze admin screen. Patches welcome 🙂

Join the Conversation

4 Comments

  1. Hi Rich,
    I wanted to say thanks to you, your daughter, and the rest of the team that was helping out today for a great workshop! I’m looking forward to iterating your design over the next few weeks and I’m hoping to get it somewhere that I’m confident enough to make it to the DNA lounge in July!

    Cheers! 🍸🤖
    Kevin

  2. ssh pi@10.0.0.1 requests a password.
    bartendro and boozemeup do not work.
    Have not been able to test the bot yet it keeps failing when trying to pour a drink. wanted to check the logs.

Leave a comment

Your email address will not be published. Required fields are marked *