05.06
Hi everyone! I like to share my advances on the topic “Motion Control with Blender”. So here is a step by step tutorial, Enjoy! This tutorial will be focused on Linux, but with minus changes works on Win too.
Software
- Blender
- Arduino IDE (version 022, download it here, on version 1.0 don’t work)
- Eibrielex Addon (whit Arduino Library, Addon and Blend file, here [attachments tab])
- Eibrielex library to control steppers
- Arduino Sketch (to load on the Arduino board, here)
- Blend File
Hardware
- PC
- Arduino Board (I’ve tested my configuration on Arduino Uno)
- L293D Integrated
- Breadboard (or something to hold the components)
- Wires
- Stepper
- A power supply for the steppers (5 to 24v)
Hardware Setup
First we will setup the hardware, first you need to connect the components following this scheme:
By default is using pins: 6, 7, 8, 9 for motor A, and 10, 11, 12, 13 for motor B.
Now you can install my stepper library. (copy the “Eibrielex” folder on “/your-arduino022-path/libraries”)
And burn the Sketch on your Arduino board (remember to use Arduino IDE 022).
If you have problems try following this steps:
Find the file “your-arduino-path/hardware/arduino/cores/arduino/wiring.h”, and comment (line 79~):
// #define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
Software Setup
First we will setup the software, and the communication with the Arduino board.
Download the Blender Addon and install it (the addon will be on Animation tab.
Load the blend file, and follow this instructions:
The serial port must be the Arduino port, you can find it on the Arduino IDE software (on Win look like “COM3″).
The RX and TX leds must be blinking on the board, showing the data flow.
If the stepper is properly connected will be turning following the blender animation.
That is it!
Notes
- The Addon will assume 200 cycles per turn on four stepper.
- If you turn on “Position” property, that axis will not work.
- The properties “Calibrated” and “Live, Stop Motion, Timelapse” don’t work for now.
- The movements are relatives, not absolutes. So, if you stop the playback, and start again from first frame, the stepper will take the last position as first position. (In other words, every time you jump frames the system lost calibration)
The BlenderArtist thread.
Let me know if it work for you!
A demonstration of how can be used on VFX:




Hi, hope you are fine. I need a little help with conecting the Blender with Arduino Uno.
I’ve upload the Arduino Sketch and installed the Add on to Blender. When I press Connect button in the Eibrielex Libre Motion Control taskbar, Blender shows that Connection fails and the taskbar goes disfunctioned. I did not run any scripts on Blender. Could you please show me how I can connect the Blender with the Arduino Uno.
Thanks a lot
Hi George, you need to set on the Addon taskbar the serial port where is your Arduino board, in my case is “/dev/ttyACM0″, the number could change (“/dev/ttyACM1″), if you are using Windows, it will look like “COM3″.
You can find it on the Arduino IDE on menu “Tools->Serial Port”
Regards!
Hi Eibriel, I reconstructed your setup like you show above. I´m using windows 7. When I type “COM3″ in the serial port and push connect, blender says “connected” and the L and TX LED on the arduino light up for a moment. But when i say send and play the animation nothing happen. No lights on the arduino and no movement on the stepper. Maybe you have an idea whats wrong.
Regards!
Hi Mat, and the animation run on Blender? or it stops on some frame?
Are you compiling using Arduino IDE version 022?
Thanks for answering! Yes, the animation runs and loops itself. Everything seems ok for me. I tested the hardware with a potentiometer and it works. As I said blender says “Connected”. Then I press the play button direct under the disconnect button and blender says “Sending motion”. When I then play the animation, nothing happens. Arduino Version is 022 as you mentioned.
Hi Eibriel,
it seems that the addon is not working Blender 2.65.10 (build 54562).
File “…….\AppData\Roaming\Blender Foundation\Blender\2.65\scripts\addons\animation_eibrielex\__init__.py”, line 65, in
bpy.context.scene.send_check = True
AttributeError: ‘_RestrictContext’ object has no attribute ‘scene’
Do you have any idear how to get it working again?
Hi Eibriel,
I’m new to arduino and scripting.
This looks very interesting. I was wondering if it is posible to modify the code to work with a cupple of EasyDrivers?
With the ED I (for starters) will only need a pin for step and one for Dir on the Arduino. Can this bee adapted easily into the code?
Hi Ralf, I’ll check it as soon I can!
Hi Chris, Yes, could be easily changed to work with EasyDrivers, maybe with some lost on precision.