Close

Electronics and programming

A project log for [2016] Robotic Head

This is an old project of a robotic head that I built in the robotic laboratory of my university like 3 or 4 years ago.

maximiliano-rojasMaximiliano Rojas 06/08/2020 at 01:410 Comments

The servomotors are connected to an Arduino Pro Mini which one is connected to a computer (same for the cameras), to supply all the electronics an old pc power supply is used to provide 5 [V] and 10 [A] (approximately). To transfer information between the Arduino and the Processing program the firmata protocol is implemented (I just upload the one in the Arduino IDE examples).

A scheme of the electronic's connection is presented in the next image:

In the processing program, first the necessary libraries for the communication, some variables for storage the angles for the servos are declared as well:

Then the window control size is set, the Arduino to control selected, and the pins configured:

Because of the mouse position on the window configured above control the movements, only one thing can be control at the same time, so, to select what is controlled just one click is necessary:

The functions that transform the mouse position into angles are, for the neck:

For the eyes:

For the eyebrows:

For the mouth (jaw):

Discussions