miniE v2 update 4

Hello everyone,

after some weeks of vacation and some more weeks of coming back to work it is time for another update. This time it will be focused less on the hardware or the user interface but on the core functionalities of the engine. This means that I am currently working on the keyframes engine which will then be used to control the motor movement.

But first let me explain what I am aiming for and why. The motor control-engine of the older miniEngine version don’t allow precise planning of the moves. This means for example that I can precisely define how far the motor should move but I have no real power over its timing. There are possibilities to tweak the speed with which the motor moves but this is far from intuitive and precise. To overcome this issue, I am currently working on ways to have a better control.

The basic idea is to base this new motor-move-management in curves as in the following picture:

Bildschirmfoto 2013-09-12 um 19.39.26

This is a screenshot of a small test-application I wrote in Processing 2. It shows a cubic Bézier-curve which would be the perfect solution for defining motor moves. Out of many of these curves side by side, one could create highly complex moves. Here is an example for 2 motors:

rect3787

Unfortunately are these Bézier-curves pretty processor intensive which is bad because I am using an Arduino. Have a short look at the Wikipedia page of Bézier-curves and you will understand why. For being able to control a stepper-motor with such a curve (or something similar but function-based), I need to calculate the curves y-position (= motor position at this time) based on the time that has elapsed since the program started. The Casteljau’s algorithm can solve this. After I have the y- and thus the motor-position, I can move the motor to that spot. Then I do another calculation based on the new time and so on… All this needs to be done for the two motors + the handling of the cameras, triggers, communication, …

My current main-task is to find a way to do this whole loop that way so that the motor movement is still smooth. To do this I need to find a performant way to do the calculations, pre-calculate as much as possible or use timer-interrupts and time-fragments of constant speeds. I am following different approaches for this and hope to find a good and solid solution.

When this basic technology is developed, I can go ahead and implement a first ready-to-use version which will be based on this new core… This will then be made public to all of you. It will just contain a basic set of features but I know you are waiting to start playing with the new version!

On the hardware side I can tell that the main-PCB is final. I received Revison C and tested it. On the picture below you can see an updated version (Revision D) which just has a nicer silkscreen:

mE2_shield_REV_D_gimp-render

Cheers,
Airic