LRTimelapse Forum
Homemade Motion Controller with LRTimelapse Pro-Timer - Printable Version

+- LRTimelapse Forum (https://forum.lrtimelapse.com)
+-- Forum: LRTimelapse PRO Timer (https://forum.lrtimelapse.com/Forum-lrtimelapse-pro-timer)
+--- Forum: LRT Pro Timer Free (English) (https://forum.lrtimelapse.com/Forum-lrt-pro-timer-free-english)
+--- Thread: Homemade Motion Controller with LRTimelapse Pro-Timer (/Thread-homemade-motion-controller-with-lrtimelapse-pro-timer)

Pages: 1 2 3 4


Homemade Motion Controller with LRTimelapse Pro-Timer - ptweet - 2017-08-24

I am interested in modifying my Shapeoko 2 CNC machine to be a 3 axis motion controller. I can buy longer makerslide and retro fit the carriage to run along the slide and using the other 2 steppers for pan and tilt. 

https://www.shapeoko.com/wiki/index.php/ShapeOko_2


I want to make an open source motion controller. Currently the shapeoko is a list of open source hardware that anyone can obtain and build. It is run with an Arduino and a shield to control the steppers. If merged with a good design and this intervalometer, it could be something great for budget minded timpe-lapse photographers.

I understand this project is ambitious, but if someone wants to join me and write some code, that would be great. I am working on getting the machine built. I was considering outsourcing the coding to someone for money, but like I say if someone wants in on this let's work together.


Just a thought!


RE: Homemade Motion Controller with LRTimelapse Pro-Timer - ptweet - 2017-08-24

I see someone has done similar. https://forum.lrtimelapse.com/Thread-qdslr-with-arduino-motion-controller-and-intervalometer?pid=34167&highlight=motion+controller#pid34167


RE: Homemade Motion Controller with LRTimelapse Pro-Timer - SimenZhor - 2017-08-24

I've already played with the same* thought and made some sketches, but there are two problems with such a project, the first one being the size of the LRT Pro-Timer program (it already uses about 80% of the Arduino (Uno) internal memory), and the other one being the number of pinouts on the Arduino.

I've imagined two ways to solve this (but haven't proved/checked that any of them actually work), the first one being a master-slave setup with maybe an Arduino nano to control the motors on a trigger signal from the intervalometer (I figured it's better to let the motor controller know when to move rather than letting the intervalometer know when to trigger. Come to think about it it will probably need a two way communication). The other option is an Arduino Mega. That will probably solve these issues, however it will need an entirely new, bigger casing, and it won't be compatible with the shields for the Uno (isn't really a problem, but it will require a bit more to assemble). About the size of the case, it will need to be resized for the master slave setup as well, but probably not as much, since the LCD shield will still fit on the Uno. It will require motor drivers as well though, so lets say we want to control three motors, we will need to fit an Uno, a Nano and three motor drivers in the casing, + batteries and the transistor PCB.

*Not repurposing an open source CNC machine, but to make a 3 axis pan/tilt slider.


RE: Homemade Motion Controller with LRTimelapse Pro-Timer - MLXXXp - 2017-08-24

(2017-08-24, 09:54)SimenZhor Wrote: the first one being the size of the LRT Pro-Timer program (it already uses about 80% of the Arduino (Uno) internal memory)

80%? That's strange. When I compile the latest 0.88 version of the LRTimelapse Pro-Timer sketch for the UNO, I get:


Quote:Sketch uses 15902 bytes (49%) of program storage space.

(Using Arduino IDE version 1.8.3)


RE: Homemade Motion Controller with LRTimelapse Pro-Timer - SimenZhor - 2017-08-24

Oops, I got the 80% from an extended version of the software that I built. It has one more menu screen, 2 or 3 extra libraries and of course a bit more code. So the memory might not actually be an issue, although it will definitively be a close call, but the pinouts will be a problem with 3 stepper motors attached.

Edit: come to think about it, maybe the step triggering could be multiplexed? I have never done this before so I'll have to do some research on how much code something like that would need and if it would work with the existing stepper-libraries in Arduino. I'll come back with more info


RE: Homemade Motion Controller with LRTimelapse Pro-Timer - MLXXXp - 2017-08-24

(2017-08-24, 17:21)SimenZhor Wrote: but the pinouts will be a problem with 3 stepper motors attached.

Perhaps stepper controller boards could be used to reduce pin count. Each motor would only require 2 pins: direction and step. Or, if the controller enable pin could be used, then only 5 pins total would be required: enable 1-3, direction, step.

https://www.sparkfun.com/products/12859


RE: Homemade Motion Controller with LRTimelapse Pro-Timer - SimenZhor - 2017-08-24

So, I've read a bit around and it seems we might be able to squeeze the number of pinouts needed to control 3 motors down to 6 using shift registers (like these). If I'm not mistaken, Günthers code currently use pins 4-9 for the LCD display, pin 10 for the backlight LED and pin 12 for the shutter trigger. Although the code is a bit messy when it comes to pin initialization and doesn't follow Arduino standard on that area, so I might have overseen pins that are in use. If I'm correct though, this leaves us with pins 0,1,2,3,11 and 13 which is just enough (note to anyone interested that by using pins 0 and 1 we can't use Serial transmission through the USB to write to the console). I have one of those shift registers lying around, but I don't have any motor drivers currently. I do have some on the way though, so I will test a bit once I get them. Please note that this setup will require a hellovalot more wiring than the current Pro-Timer setup and probably won't be for rookies even with a detailed tutorial.

The number of 6 pinouts is just something I've read by the way. Personally I believe it can be done with 4, but I need to do some testing to be sure as I haven't programmed many logic circuits before (not many motor circuits either, so please shoot in if anybody with more experience than me reads this)

For a brief introduction to shift registers look at this video.


RE: Homemade Motion Controller with LRTimelapse Pro-Timer - SimenZhor - 2017-08-24

(2017-08-24, 18:44)MLXXXp Wrote:
(2017-08-24, 17:21)SimenZhor Wrote: but the pinouts will be a problem with 3 stepper motors attached.

Perhaps stepper controller boards could be used to reduce pin count. Each motor would only require 2 pins: direction and step. Or, if the controller enable pin could be used, then only 5 pins total would be required: enable 1-3, direction, step.

https://www.sparkfun.com/products/12859

As far as I know we need a motor driver like this one for each motor to control them individually, however these drivers also require about 6 pins in each (the ones I have used did in fact require more pins in than the motor itself).


RE: Homemade Motion Controller with LRTimelapse Pro-Timer - MLXXXp - 2017-08-24

(2017-08-24, 19:04)SimenZhor Wrote: we need a motor driver like this one for each motor

Correct. You would need a separate controller board for each motor. Each controller board requires only 2 pins from the Arduino, one for direction and one for step. All other control pins on the board could be permanently wired.


RE: Homemade Motion Controller with LRTimelapse Pro-Timer - SimenZhor - 2017-08-24

(2017-08-24, 19:08)MLXXXp Wrote: Correct. You would need a separate controller board for each motor. Each controller board requires only 2 pins from the Ardubino, one for direction and one for step. All other control pins on the board could be permanently wired.

Well, that makes it 6 pins, which might be possible to do. I'll still see if I can manage to get it down to 4 pins with a shift register as the Serial port is quite nice to have Smile