Made in my idle time, As you can see in the video ( I apologize for the quality. Before I take a good snap, the chip burntout,I will have to buy a new one(Uno),Anyway, I hope it will give you the basic idea about how it works) the concept is simple, the sensor is constantly feeding Arduino about any object it can detect. which is telling the two servos in the hand how much to rotate.
The 2 basic challange was to make a strong design to overcome the shaky feeling (which still requires lots of work) and mapping the movement of glass and the servo rotation so it does pour the drink on your mug, not spill it on your pant. I still have works to do on this one. Hopefully I will give you an update in january.
So you can move forward and backward the glass and shouldn’t spill out. To avoid frying further arduinos never power motors directly from the 5v of arduino, better to draw power directly from a 5v battery just like the a supplementary battery for smartphones, some of them can deliver 2A, which should be enough to power a couple of these servos(check stall current stats anyway!)
Always check the spec sheet for voltage range, max current, temperature range and safety for all electronics, motors and batteries included. Usually electronics are slightly tolerant about limits, for example you can draw 1A from arduino 5v pin(instead of 0.5) for about 10-20 minutes before it fries, so it may not seem obvious. Keep also in mind that batteries provide a slightly higher voltage when fully charged and slighly lower when near empty.
Thanks, one more thing is, I am sure that the cheap is fried, although I am not so sure about the board. Is there anyway to tell, if replacing the atmega will work?
Put the chip on a breadboard and test if current flows between 5v pin and ground with power attached to the chip(7-12v), see the spec sheet of atmega328 for reference. Or try the loopback test, but you will need a usb to ftdi converter chip. If the chip doesn’t work just buy a new one, if it works, something in the board it’s fried.