Magic Lantern Forum

Using Magic Lantern => Hardware and Accessories => Topic started by: v1de0 on July 20, 2012, 04:56:24 AM

Title: magic lantern controlling usb devices (Time Lapse Dolly)
Post by: v1de0 on July 20, 2012, 04:56:24 AM
Can magic lantern control usb devices? Like the motor on a scanner.  Would make an awesome time lapse dolly. I'm guessing power out of the usb would be a problem.  maybe be able to control an audrino  http://www.arduino.cc/  if the usb deveice already on the scanner wouldn't work.  an external power source(or audrino)  could provide the power to the motor and let ML tell the audrino to trigger the motor and  of course you would have to remove the glass(and any other unnecessary parts)  and ad a camera mount.           Just an idea old Scanners make a good diy dolly
Title: Re: magic lantern controlling usb devices (Time Lapse Dolly)
Post by: a1ex on July 20, 2012, 11:05:28 AM
Tip: ML intervalometer uses the real-time clock (integer seconds), so you may not need any sync at all (motion controller can be standalone, just start them both and as long as their clocks don't drift, it's OK).
Title: Re: magic lantern controlling usb devices (Time Lapse Dolly)
Post by: nanomad on July 20, 2012, 02:13:12 PM
Here's how I'd do it:
- Trash the arduino and get a raspberry pi. The arduino has no real  USB ports, while the rPi can run linux without issues. This makes development 90% easier
- Use PTP (may need custom stuff, see http://magiclantern.wikia.com/wiki/PTP) to remote control the camera
- Use the board to control the USB dolly

Title: Re: magic lantern controlling usb devices (Time Lapse Dolly)
Post by: v1de0 on July 20, 2012, 06:04:46 PM
oh cool  I hadn't thought of that. I guess now I need to find a broken scanner(just glass) :-[ Shouldn't be that hard. I would need to figure out to get the scanner to get recognized by the raspberry pi well linux. and Figure out the back and fourth functions. Im thinking I would need to offset the time  so if magic lantern is shooting  a picture every 5 sec the dolly would have already needed to move. so it moves and takes a picture ;D
Title: Re: magic lantern controlling usb devices (Time Lapse Dolly)
Post by: nanomad on July 20, 2012, 07:06:57 PM
Moving this to a more appropiate section  8)
Title: Re: magic lantern controlling usb devices (Time Lapse Dolly)
Post by: v1de0 on July 21, 2012, 05:54:41 AM

I found this   http://dynamicperception.com/products/dollyshield-diy-kit (http://dynamicperception.com/products/dollyshield-diy-kit) its 55 dollars. (their other products are great but too pricy for me right now)  so I'm thinking all I would need to do is build this and hook it up to the scanners motor and boom time lapse dolly
Title: Re: magic lantern controlling usb devices (Time Lapse Dolly)
Post by: nanomad on July 21, 2012, 10:43:01 AM
You can also use motors from a dead printer, they are easier to find
Title: Re: magic lantern controlling usb devices (Time Lapse Dolly)
Post by: v1de0 on July 22, 2012, 06:41:50 AM
I did't think of that cool.
Title: Re: magic lantern controlling usb devices (Time Lapse Dolly)
Post by: kikko_fr on August 03, 2012, 12:10:17 AM
Hi, I'm also currently making an igus based camera slider and I've made good progress on the hardware side.
For the electronics & software, the idea of being able to use the screen and buttons of the camera to control the motor of the slider is really interesting to me (to avoid duplicates and I already have the stepper and electronics).

So I would like to know wether it would be possible (even just in theory) with some hacking, to create an extra menu in magic lantern, and get it to send some very basic serial data to the arduino via the usb cable? Maybe through some ptp properties ?

Thanks in advance for the hints!
Title: Re: magic lantern controlling usb devices (Time Lapse Dolly)
Post by: v1de0 on August 08, 2012, 10:50:16 PM
What I was thinking
Title: Re: magic lantern controlling usb devices (Time Lapse Dolly)
Post by: subsonic on October 01, 2012, 12:11:11 AM
Im really intrested in that idea and would like to help develop some stuff for this. Im really new to motor controls, but I am trying to build a board with two motors, which should be controlled by ml.
Title: Re: magic lantern controlling usb devices (Time Lapse Dolly)
Post by: Datadogie on October 07, 2012, 01:16:05 PM
 I hope you are not wasting your time. I read somewhere that stopping and starting the slider brought in to much jitter at start and stop so they reverted to have the slider move continuously.
Title: Re: magic lantern controlling usb devices (Time Lapse Dolly)
Post by: SDX on November 26, 2012, 05:29:41 PM
I hope people are still interested in this topic. Otherwise this post is more for the sake of documentation if someone should find it at a later point in time.

I have build my own timelapse dolly and it works pretty good. It has its own tangible user interface, a numerical pad with 12 buttons (0,1,[..],9,# and *). Through that I can specify the most relevant factors (Speed, interval, distance to move, de/-acceleration for smoothness, cooling, and so on). The camera is triggered through a shutter-release cable. Everything is build around a ATMega328. You could also easily use an Arduino for that. The motor is controlled using 2 H-Bridges of my own design.

It has a traveling distance of exactly 1m. It is driven by a threaded rod connected directly (without any gearing) to a stepper motor. (200 steps, bipolar, ~10W).

The all in all I just spend ~15$, but many hours on design and work.

I have been using it for a year now, and have modified and tweaked it several times. All in all I'm really happy with it.

Now to a more interesting part.
As described here (http://www.magiclantern.fm/forum/index.php?topic=1761.msg11752#msg11752) and here (http://www.magiclantern.fm/forum/index.php?topic=1705.msg11758#msg11758) I have done several attempts to control the dolly through ML.

Something I want to highlight is this PTP lib for Arduino here (https://github.com/felis/PTP_2.0). With that, you should be able to hook up your camera directly to an Arduino without any extra work. What you need is an Arduino and a USB host shield. Both ~20$ each. If you want to save a bit money, have basic electronic stuff (resistors, voltage-regulators, ..) available and have a bit experience with electronics, you can use a MAX3421E and a ATmega to achieve the same result (both ~7$ each, depending on the AT you choose).


What I can tell you: 1m is about the lowest distance you might want to have. In most situations, everything under 1m is too little to either notice the camera traveling or achieving the effect you want.
In general are printers good resources for lots of good stuff. But some, especially newer printers, don't use stepper motors anymore. They often have a counter attached to a brushed DC motor in order to count the amount of rotations they turned.
Title: Re: magic lantern controlling usb devices (Time Lapse Dolly)
Post by: SDX on November 26, 2012, 11:47:54 PM
Just a note:
A RPi costs you less than a Arduino and a USB shield. But..
My experience shows, that the GPIO pins on the RPI are not very precise. It is good enough for switching something on and off, but not for fast signals such as PWM or even servo-Signals. Combining a RPI and a Arduino is most likely the best solution. It is stable and secure, also, the RPI has 3 serial lines on the GPIO pins.
Even though I believe in my own circuits for the motor controller, connecting it to an RPi directly can be risky when you drive the motor with more than 3V. So I wouldn't. You just have to make a simple mistake somewhere and you'll get magic smoke and a toasted RPi. You'll have to use more than 3V. Moving the camera at a acceptable speed requires more power than you would expect.
Title: Re: magic lantern controlling usb devices (Time Lapse Dolly)
Post by: mexicodirk on January 27, 2013, 09:38:19 AM
look here
http://sourceforge.net/projects/projectchronos/?source=navbar
i use this Chronos2 with muy 600D and ML.
i am happy with this control. simple and this have so many cool stuff inside. I use a leadscrew.
you can use this control for beld and screw drived slides even for what ever what its driving with stepper motor !
depend on what you will make!
i think the Raspery Pi its a good solution too. i have 1 and i am experimenting with this,  learning programming , only time its what i dond have so much!
i am building right now the Pano axis and vertical axis, for the movement i will use the same control system.
so i have all axis complet independent.
the think its keepit simple, in the field i dond wont carry too much stuff and i dont think its a good idea too putt the control of the slide on the cam. The Cam have to do so much another thinks.
in this way we discover the Canon Firmware its BAD! look the 30 sec time! on Canon on ML and measured! its funny

Dirk