Galleger played without notes and not looking at the keyboard.It would have been completely natural if he were a musician, but Gelleger was an inventor.Drunk and crazy, but a good inventor.He wanted to be an experimental engineer, and, probably, would have achieved outstanding success in this, since it dawned on his moments.Unfortunately, he did not have enough money for systematic research, so Gelleger, a conservator of integrators by profession, kept his laboratory for the soul.It was the most dreadful lab in all States.He spent ten months creating a device that he called an alcoholic organ, and now he could, lying on a comfortable soft couch and pressing buttons, pour in drinks of any quality and in any quantity into his tinned throat.Only now he did this body, being in a state of severe intoxication, and of course, now he did not remember the principle of its action.It's a pity... (c) Henry Kuttner , Stories about Gelleger .
Somewhere about a year ago my friends and I decided to make a small film. Naturally, up to this point, none of us had ever made films. And what can graduates of the physics and technology department make a film about? Well, of course! About fiction and about alcohol. Therefore, without further ado, the basis was taken from Henry Kuttner's favorite book - “ Robot Intelligence ”. But this article is not about the film, which has not yet been completed and is not completed, but one of the devices from the film, which I decided to make. Of course, the film could use the layout. But who would refuse the opportunity to have fun with this device! So, Alkoorgan and its creation ... The organ in the book is practically an individualistic machine. Gelleger makes a keyboard and a ready drink is injected into his mouth. I decided that in my organ the drink would be served not into the mouth, but into a glass. Somehow more hygienic all the same, because many friends will want to try out the device. And in the film, no one will notice much difference. Now you can often meet bartender robots: first , second,third , etc. But I also did not go to extremes and move away from the original, making a robotic cocktail blender. In the creation of the alcohol company, I wanted something that would look like an outrageous gathering of improvised means and was full of references to the retro futures. In my opinion, such a thing must necessarily be manual control from something like a piano keyboard. Also, I decided to add one additional Wow factor. Since there is a keyboard, then apart from controlling the supply of alcohol, let this keyboard play notes. Hardly anyone tried to drink notes and try a properly built musical cocktail. Besides, remembering not the recipe of the drink, but its melody ... This is definitely an opportunity to feel like a synesthetic. The result of the entertainment is at the end of the article. And now the description of the elements of the body and its manufacturing process.
Flow control
The heart of the device is an electromechanical device that will be responsible for the flow of fluid. Initially, as soon as I began to invent the construction of the alcohol organ, I wanted to use some simple motor capable of pumping liquids. But, having gone deep into the problem, I realized that the optimal device for the price / simplicity of mining would be blockers on solenoids . Of course, they cannot pump fluid, but they are easy to use, they are not very expensive. And it is enough to hang the liquid from above and let it through the hose. When using solenoids, they need to be connected to a tube system. If the tubes are flexible, then nozzles are used (two for each solenoid). The fittings need to be screwed in beforehand by wrapping a fluoroplastic thread, or its substitute. Tubes are attached to the fittings by clamps. ')
Tubing
An epic laboratory instrument is not epic, if it does not have many tubes. In my opinion, the tubes should be transparent in order to see the desired liquid gurgle. For some reason they are very rare for sale. Yes! If suddenly someone will assemble a similar device - I advise you to check the hose for compatibility with alcohol: fill it with a piece of vodka, which you should carefully try in three days. Some hoses may dissolve!
Dishes for alcohol
At the initial design stage, I didn’t particularly bother about what kind of dishes to pour alcohol in. It seemed to me that ordinary bottles would go. But the closer the moment the assembly began, the more obvious it became to me that it would not be a ride. Bottles are not only different attachment caps. They often have dividers that would interfere with the return air flow. The idea that you need to do something overtook me more and more often, until I figured out how to solve the problem. For this, it was enough to recall that virtually any kind of glassware exists in the stores of laboratory glassware. I liked the separating laboratory funnels the most. They are of different sizes, like the tubes of a real organ, it is convenient to bring the tubes to them, they have a natural flow of air into the vessel. The only modification that needs to be subjected to them is to slightly wrap the electrical tape on the part of the tube to which the hose will be attached to the clamp. Without this, there is a chance to damage the tube or fail to fix the clamp sufficiently tightly.
Sound
We’ll finish with hydraulics and move on to a much closer electronic engineer. I had a lot of ideas on how to make a sound. The first was the idea to solder seven multivibrators. But my laziness did not allow me to do it. The second idea was the idea to put some processor on which to generate the output signal. I’ll probably come back to this idea in the future if I want to patch the current version of the alkoorgan. I implemented a much simpler idea. Already somewhere half a year I had an Arduino ... Why not generate a signal on it? And then there's the corresponding post on the topic. But, I could not get the desired speed. In addition, the output signal is clumsy, the sound is disgusting. But on the Arduino was the function "tone". Unfortunately, it can only produce 1 sound at a time. So there are no chords in the current version of alcohol. The sound is given by the program written below (a small modification of the example tone). Also added a switch so that you can play in two keys:
#include"pitches.h" int melody[] = { NOTE_C4, NOTE_D4,NOTE_E4, NOTE_F4, NOTE_G4,0, NOTE_A4, NOTE_B4, NOTE_B4}; int melody2[] = { NOTE_C3, NOTE_D3,NOTE_E3, NOTE_F3, NOTE_G3,0, NOTE_A3, NOTE_B3, NOTE_B3}; int start = 0; // note durations: 4 = quarter note, 8 = eighth note, etc.: int noteDurations[] = { 4, 8, 8, 4,4,4,4,4 }; void setup() { pinMode(2, INPUT); pinMode(3, INPUT); pinMode(4, INPUT); pinMode(5, INPUT); pinMode(6, INPUT); pinMode(8, INPUT); pinMode(9, INPUT); pinMode(10, INPUT); for (int thisNote = 0; thisNote < 8; thisNote++) { int noteDuration = 1000/noteDurations[thisNote]; tone(11, melody[thisNote],noteDuration); int pauseBetweenNotes = noteDuration * 1.30; delay(pauseBetweenNotes); noTone(11); } start = 1; } void loop() { if (start = 1) { int j =0; int note = 0; for (int i=2;i<10;i++) { if (digitalRead(i)!=0) { if (j<1) { note=i; j++; } } } if (digitalRead(10)==1) { if (note!=0) tone(11, melody[note-2], 220); } else { if (note!=0) tone(11, melody2[note-2], 220); } delay(0.2); } }
I decided to use the old speakers, which were nearly five years ago, as a device that makes a sound, but I didn’t lift my arm. To produce a sound of constant frequency is enough. In addition, convenient power from 12 volts.
Nutrition
By the way, to the question of nutrition. Solenoids and speakers fed on 12 volts, which is very convenient. As a power supply, I took nes-15-12 . Arduino is powered by 5 volts, so for him it was necessary to use l7805cv, connected according to the well-known scheme:
Keyboard
Ideas on how to do the keyboard also rushed back and forth. At first, I planned to use some kind of keyboard, broken from a children's toy. But finding something suitable turned out to be beyond my strength. I did not want to order via the Internet (according to the photo there was little that is clear). A bypass of a dozen children's stores gave nothing, except for the positive sensations from the sellers glance: "Are you a piano girl for a girl or for a boy? "For the alcohol organ!" In desperation, I went to Chip and Dip to look at the proposed switches. And suddenly there was an insight! Using a small amount of glue and wood from the B180E microswitches, you can perfectly assemble the keyboard! Of course, there was a slight distortion - I put one switch on the sound, and the second on the solenoid, where I could do with one. But on the other hand - the buttons on the two microswitches turned out more stable. Oh yes! And a great mechanical response! From small flaws: when I made a board to which I connected power and Arduino, I assumed that the switch would just open the circuit. Therefore, made suspenders to zero. And in B180E they were not needed. So now it looks a bit strange. In the end, after connecting to the Arduino, the music unit worked like this:
Alcoorgan!
What. So we got to the organ itself. Not to say that it looks right the way I originally wanted it. But something close to the work of Kuttner is felt in him.
So far, I have made him a temporary leg, so that he stood on the floor. In the film, it will hang on the wall. A couple of photos of the device:
PS
Yeah! Finally!) Hello to the people of Habr from the actor who plays Gelleger in our film and from the robot - damn it!;)