![]() ![]() Ive built a shotbot to make many tiny cocktails. If your interested in how I made the billboard I linked my blogpost below. SHOTBOT ARDUINO BUILD CODEUpload the code to your microcontroller and give it a whirl! We suggest testing it with some water first, just in case something in your build is funky. Couple years back I made a miniature billboard out of an Arduino. You should only run the pump if at least one valve is open. Each case is a line of actions, starting with changing the prompt on the screen, followed by turning on the lights, followed by the sequence of opening the proper valve and running the pump. You can add or change each case as you see fit for the drink you want to mix. This is the call for the drink, and the operations for the first drink on the list. This Arduino Pump Tutorial is known as the ShotBot Project, demonstrating an easy way to build a simple shot pouring robot. if ( debounce.fell() )ĬolorWipe(strip.Color(255, 0, 0), 50) // RedĭigitalWrite(PUMP_RELAY_PIN, HIGH) // Turn on the pumpĭigitalWrite(SELECTED_RELAY_PIN, HIGH) // Open Solenoid valve 1ĭelay(PUMP_TIME) // Run for the set amount of timeĭigitalWrite(SELECTED_RELAY_PIN, LOW) // Close Solenoid valve 1ĭigitalWrite(CLEAN_RELAY_PIN, HIGH) // Open Solenoid valve 7ĭigitalWrite(CLEAN_RELAY_PIN, LOW) // Close Solenoid valve 7ĭigitalWrite(PUMP_RELAY_PIN, LOW) // Turn off the pump Some screens are addressed differently than others, so if the screen doesn't display the list when you load up the sketch, change the address here. ![]() LiquidCrystal_I2C lcd(0x3F, 20, 4) //I2C 4 Row 20 Col LCD Screen at 0x3F LiquidCrystal_I2C lcd(0x27, 20, 4) //I2C 4 Row 20 Col LCD Screen at 0x27 You can change this to deliver larger shots by default. int PUMP_TIME = 2500 //Time for pumping station to run in milliseconds You can change this to accurately reflect the drinks and mixtures available. ![]() These names will show up on the LCD screen, and can be scrolled through to be selected. RobotGeekLibrariesAndtools-master.zip File → Sketchbook → RobotGeekSketches → Demos → drinkStationĪnd let's take a look at the code: // Selections The same process as listed above applies to the pump, minding that the Negative (Black, Ground) lead goes to the center terminal on the Relay, and the Positive (Red, Voltage) lead goes to the DC Jack's Voltage wire.īuild your LCD Control Panel and RobotGeek Drink Station before wiring.Īttach your components to the Sensor Shield: We used wire nuts because we're fans of quick and dirty, but you'll get a better electrical connection by soldering. Attach the other lead from your Solenoid Valve to the Voltage wire from the DC Jack, either by using a wire nut or soldering the connection.Attach your Ground wire from the DC Jack to NO or Normally Open on your Relay.Attach a wire from the Solenoid Valve to the center terminal on your Relay.Get your Relay, Solenoid Valve, DC Female Jack Pigtail, and a wire nut ready.To hook up your Solenoid Valves to Relays: This looks like some pretty intense wiring, and it is a bit of a mess, but it's really just the same process repeated several times over. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |