This week I am programming the motors. We have decided to go with Gestalt. From Ilan Ellison Moyer´s Master's thesis "Gestalt is an accessible and flexible control framework which aims to augment the ability of individuals to create new automated tools, and to thus self-extend their abilities to create objects which would be too tedious or impossible to create by hand." A good place that helps to get started is this tutorial from fabacademy

To Do

  1. Prepare the environment for using Gestalt nodes
  2. First test
  3. Do the programming and testing

The "Doing"

Programming environment

Gestalt framework is python based. Specifically, python 2.7 is needed. Actually, the list of things to be done is:
  • pyhotn 2.7. Download from here
  • pyserial
  • Clone gestalt from here
  • install pygestalt by running python setup.py install

Preparing and testing

Physical layer is called Fabnet, "a multi-drop network, meaning that multiple modules (a.k.a. nodes) share a single set of communication wires. Signalling is differential based on the RS-485 specification." It is implemented with an RS485 bus. A bridge between it and fabnet is needed. Luckily, there was already a board prepared from last year. So I prepared the setting to test first just one motor:

12 V is needed from the ´power source and I adjust the Ilimit to 0.600mA
And prepared to run the single_node.py example. I just had to change the portName at the def initInterfaces(self) of the virtualmachine with my COM port number which was COM13 most of the times

At first it was not working. I checked, double checked, triple checked I had downloaded all the code needed and that I had the pins correctly connected. Nothing. I was almost sure it should be a connection, but not idea where. I could not get the blue led tinkle. I was very frustrated because it everything seemed to be very straightforward, but I got stuck in this point. Finally, another eyes (Jari) spotted the incorrect connection. And it worked as expected: blue led started tinkling, I pressed the buttonon the node to set it as the axis and it moved!

Programming the motors

Once I was able to move one motor, I went on to test the two motors. For that, I connected the two motors we had already prepared from last week:
... and started testing the xy_plotter.py example.
I then started to modify that code. I started looking to the output screen, trying to understand what was going on. Then, I set different points, first trying to adjust the horizontal movement to the actual length we needed. Then, I set different speeds for each node, testing them to see what worked better. Finally, setting the same slow velocity to both nodes (finally 2), was working better.

First demo with motors

Fruit Peeler Team from Marta on Vimeo.

Resources

Once done

Summary

  • I have programmed the gestalt nodes
  • I have done documentation on the page and organized the layout
  • I have participated in testing different solutions for the blades
  • I have participated in testing different solutions for holding the fruit

Difficulties

  • Main difficulty was a small but time consuming one: find the wrong cable when the gestalt motors were not working at first

Files