Building a new Merlin/Orion internal controller  

Everything you need to motorize your head
User avatar
fma38
Moderator
 
Topic author
Posts: 5850
Likes: 2 posts
Liked in: 2 posts
Joined: Wed Dec 07, 2005 6:21 pm
Location: Grenoble, France
Info

Building a new Merlin/Orion internal controller

by fma38 » Thu Nov 12, 2009 11:33 pm

It seems that some new Merlin/Orion heads does not work as the old model. And even the old model could be improved for our needs. So, it is maybe time to make a new internal controller!

As there are a lot of people playing with Arduino, I think this is a good choice for this task. I have a few ideas for the global design, but I won't have time to make it myself. So, I open this thread to discuss about this project, if some people are interested.

Feel free to post your ideas, needs, or any suggestions. Let's see what will come out ;)
Frédéric

User avatar
vincen
Kolor Certified Trainer
 
Posts: 963
Likes: 23 posts
Liked in: 4 posts
Joined: Fri Mar 13, 2009 11:30 am
Location: Grenoble, France
Info

by vincen » Fri Nov 13, 2009 7:44 am

fma38 wrote:It seems that some new Merlin/Orion heads does not work as the old model. And even the old model could be improved for our needs. So, it is maybe time to make a new internal controller!

Hi Fred,

When you speak of internal controller, you mean the electronic inside the Merlin/Orion head itself ?

Vincèn
Blog: http://www.skivr.com
Nodal Ninja 4 R-D16 on Benro Tripod + Ultimate R1 on Nodal Ninja P2 + Nikon D800 + Nikkor 10.5 + Nikkor 14/24 f/2.8 +Pentax 645D

User avatar
fma38
Moderator
 
Topic author
Posts: 5850
Likes: 2 posts
Liked in: 2 posts
Joined: Wed Dec 07, 2005 6:21 pm
Location: Grenoble, France
Info

by fma38 » Fri Nov 13, 2009 7:51 am

Yes :)
Frédéric

User avatar
vincen
Kolor Certified Trainer
 
Posts: 963
Likes: 23 posts
Liked in: 4 posts
Joined: Fri Mar 13, 2009 11:30 am
Location: Grenoble, France
Info

by vincen » Fri Nov 13, 2009 7:59 am

fma38 wrote:Yes :)

Wow, you want to design your own electronic inside :lol: big project :cool:

Vincèn
Blog: http://www.skivr.com
Nodal Ninja 4 R-D16 on Benro Tripod + Ultimate R1 on Nodal Ninja P2 + Nikon D800 + Nikkor 10.5 + Nikkor 14/24 f/2.8 +Pentax 645D

no avatar
Greg Nuspel
Member
 
Posts: 169
Likes: 0 post
Liked in: 0 post
Joined: Tue Oct 06, 2009 6:50 pm
Location: Calgary, Alberta, Canada
Info

by Greg Nuspel » Fri Nov 13, 2009 12:54 pm

I think the Arduino is an excellent choice since the firmware can be up graded so easily by anyone using a USB cable. I guess it would be good if we could outline the structure of it and possibly create libraries/modules for the different sections like: communication, motor control, camera interface. This way it could be used to control more than just the Merlin/Orion by changing the libraries used in a build.

I think the following libraries would be useful:
Communication - bluetooth, wifi, etc.
Motor control - stepper, servo, dc motor
Camera - shutter, focus, exposure monitor
System monitoring - error detection
Main control - communicates with all the modules/libraries
Interface - joystick, lcd

We will also have to establish a variable naming protocol so that all the modules will understand each other and there aren't conflicts. This will require some project management in order to keep everything working. I would suggest a Wiki page setup so that information from the developers can be added and edited as needed. This also stops the need to search posting here to find out the information you require.
--Greg Nuspel

User avatar
fma38
Moderator
 
Topic author
Posts: 5850
Likes: 2 posts
Liked in: 2 posts
Joined: Wed Dec 07, 2005 6:21 pm
Location: Grenoble, France
Info

by fma38 » Fri Nov 13, 2009 1:32 pm

Before starting the wiki page, we should discuss here what we really want to implement. My first goal is to make a simple controller, which just replace the existing one. We can maybe add a few simple things (like another contact for focus or joystick input for manual move), but I didn't plan to add complex things like lcd, wifi or so.

This controller will need a daughter board, to put the encoders amplifiers/counters, and motors amplifiers; to control another kind of head, it will be possible to make another daughter board, instead of mixing all technologies.

The com. interface should be serial, as it is the most universal one (which can be connected to a PC, or to any XXX-to-RS232 converter, including wifi, bluetooth, zigbee...

My 2 cents...
Frédéric

no avatar
Greg Nuspel
Member
 
Posts: 169
Likes: 0 post
Liked in: 0 post
Joined: Tue Oct 06, 2009 6:50 pm
Location: Calgary, Alberta, Canada
Info

by Greg Nuspel » Fri Nov 13, 2009 1:34 pm

Does the Merlin/Orion head use a dc motor with an encoder?

If so I am working on a motor control that will run a 12v motor with an encoder, my prototype boards should be in next week so I can start testing. These boards require either a step and direction input or a serial command. I am setting up with the serial command structure for myself. With the Arduino this means either using a Mega board with it's multiple serial ports or using software ports. I am leaning towards the Mega board myself at this time and will build a shield that will interface with the camera, dc servos, and the bluetooth.
--Greg Nuspel

no avatar
UrsaMinor
Member
 
Posts: 54
Likes: 0 post
Liked in: 0 post
Joined: Fri May 29, 2009 4:12 pm
Location: Budapest, Hungary
Info

by UrsaMinor » Fri Nov 13, 2009 1:35 pm

My opinion: Building a new electronics maybe not needed.

The existing electronics in Merlins can be re-used.
It has a L293 driver, two nice PIC microcontrollers etc...

Just write a new firmware and reprogram the PICs.
They can be reprogrammed as soldered into the circuit.

Second idea:
I've developed a complete stepper motor driver circuit.
It can drive two bipolar stepper motors (motor current can be configured, max 600mA per windings)
It uses only one PIC microcontroller and can drive the motors in microstep. No speed problems as with the Merlin.
This circuit is almost complete. Some days needed to finish.

Originally I developed it to use with equatorial telescope mounts.

Tamas

no avatar
Greg Nuspel
Member
 
Posts: 169
Likes: 0 post
Liked in: 0 post
Joined: Tue Oct 06, 2009 6:50 pm
Location: Calgary, Alberta, Canada
Info

by Greg Nuspel » Fri Nov 13, 2009 1:42 pm

fma38 wrote:Before starting the wiki page, we should discuss here what we really want to implement. My first goal is to make a simple controller, which just replace the existing one. We can maybe add a few simple things (like another contact for focus or joystick input for manual move), but I didn't plan to add complex things like lcd, wifi or so.

This controller will need a daughter board, to put the encoders amplifiers/counters, and motors amplifiers; to control another kind of head, it will be possible to make another daughter board, instead of mixing all technologies.

The com. interface should be serial, as it is the most universal one (which can be connected to a PC, or to any XXX-to-RS232 converter, including wifi, bluetooth, zigbee...

My 2 cents...

I agree with the daughter board scenario I just want to make sure all the components are compatible. I was just thinking separate libraries/modules in the Arduino code would be best. It's like building your code with Lego blocks allowing customization within some limits.
--Greg Nuspel

User avatar
fma38
Moderator
 
Topic author
Posts: 5850
Likes: 2 posts
Liked in: 2 posts
Joined: Wed Dec 07, 2005 6:21 pm
Location: Grenoble, France
Info

by fma38 » Fri Nov 13, 2009 5:30 pm

Greg, yes, the Merlin uses DC motors and incremental encoders. But these deliver a sine signal (from 60 to 500mV), so they need a circuit to convert this signal to TTL. The Merlin design uses a LM324 (non inverter, gain 10) followed by a 74HCT14 (schmitt trigger).

Tamas, I didn't know that it was possible to re-flash the PIC (though they were locked)! Well, PIC µ-controllers are not easy to program (strange syntax), but if someone knows them, I agree it could be a very good idea. Do you think it is possible to backup the original firmware, and reflash it, just in case?
Frédéric

no avatar
UrsaMinor
Member
 
Posts: 54
Likes: 0 post
Liked in: 0 post
Joined: Fri May 29, 2009 4:12 pm
Location: Budapest, Hungary
Info

by UrsaMinor » Fri Nov 13, 2009 5:43 pm

If the pic is locked nobody can backup the code from it. Some newest pic's has military grade code protection. Others has standard grade protection (like the pic in Merlin), but it is also very strong and safe.

Locked Pic accepts only one command: full erase. It erases the whole content of the flash and the lock bit.
After erased, they easily can be re-programmed.
This in-circuit reprogramming works well. Just 5 pins needed: gnd, vcc, vpp(programming voltage), pgClock, pgData.

Tamas

no avatar
Greg Nuspel
Member
 
Posts: 169
Likes: 0 post
Liked in: 0 post
Joined: Tue Oct 06, 2009 6:50 pm
Location: Calgary, Alberta, Canada
Info

by Greg Nuspel » Fri Nov 13, 2009 5:49 pm

This is why I like the Arduino, they are simple to download a program onto, the language is easier to pick up than a pic. I do have a Basic compiler for pics http://www.mikroe.com/en/compilers/mikrobasic/pro/pic/ but I think for an open source project the Arduino is the easiest for people to implement. If we construct shields for the board it can be made pretty well plug and play. Daughter boards for the servos/steppers/dc motors can be added to this. There already are stepper driver boards like http://www.sparkfun.com/commerce/product_info.php?products_id=9402

It is to bad the encoder output is a sine signal.
--Greg Nuspel

User avatar
Paul
Member
 
Posts: 778
Likes: 0 post
Liked in: 0 post
Joined: Sat Aug 30, 2008 4:46 pm
Location: Bonn, Germany
Info

by Paul » Fri Nov 13, 2009 5:57 pm

my 2 cents

I would prefer not to bind this idea to the Merlin-hardware as the Merlin is not flexible enough to handle the some of the widely used cam-lens-combos

using an arduino to control a basic panohead could be a great openhardware / opensource project

somekind like the reprap-3d-printer-project
Paul

close, but no cigar ... ... ...

User avatar
fma38
Moderator
 
Topic author
Posts: 5850
Likes: 2 posts
Liked in: 2 posts
Joined: Wed Dec 07, 2005 6:21 pm
Location: Grenoble, France
Info

by fma38 » Fri Nov 13, 2009 5:58 pm

Tamas, thanks for the explanations. BTW, I guess that re-programming the PIC needs a special hardware?

Greg, another solution is to keep the encoder part of the original Merlin head, as well as the DC motors drivers. I think it can be done by removing the PICs, and wire the Arduino to the good pins. It can be a simple solution for tests, but it may damage the PIC... I also think that the Arduino cant't monitor the encoder, and will need special counters circuits (someone posted a link to nice circuits, a few weeks ago).
Frédéric

no avatar
Greg Nuspel
Member
 
Posts: 169
Likes: 0 post
Liked in: 0 post
Joined: Tue Oct 06, 2009 6:50 pm
Location: Calgary, Alberta, Canada
Info

by Greg Nuspel » Fri Nov 13, 2009 6:03 pm

I wonder if the encoder could be changed for one that is TTL compatible. I won't be doing this myself since I am making my own mount. The software/firmware is still of interest to me so that I can keep my stuff compatible.
--Greg Nuspel

User avatar
fma38
Moderator
 
Topic author
Posts: 5850
Likes: 2 posts
Liked in: 2 posts
Joined: Wed Dec 07, 2005 6:21 pm
Location: Grenoble, France
Info

by fma38 » Fri Nov 13, 2009 6:10 pm

Well, it might be possible to change the photo-transistors, but it is not a very easy task.
Frédéric

User avatar
fma38
Moderator
 
Topic author
Posts: 5850
Likes: 2 posts
Liked in: 2 posts
Joined: Wed Dec 07, 2005 6:21 pm
Location: Grenoble, France
Info

by fma38 » Mon Nov 16, 2009 2:42 pm

UrsaMinor wrote:The existing electronics in Merlins can be re-used.
It has a L293 driver, two nice PIC microcontrollers etc...

Just write a new firmware and reprogram the PICs.
They can be reprogrammed as soldered into the circuit.

Tamas, do you think it is possible to buy the original internal controller alone? Your idea is nice, but I don't want to overwrite the original firmware without possibility to go back. So, If we could buy a complete controller to develop an alternate firmware, that could be nice.

This way, it could be possible to sell this controller with the new firmware pre-loaded, and we may even find a way to allow users to update the firmware without using a special PIC programming tool (I don't know much PIC, but it may be possible to write some sort of bootloader?).
Frédéric

User avatar
claudevh
Moderator
 
Posts: 1349
Likes: 0 post
Liked in: 0 post
Joined: Sun Nov 25, 2007 11:12 pm
Location: Mont-Saint-André (Belgium)
Info

by claudevh » Mon Nov 16, 2009 4:03 pm

Hello Fréderic,

I thing that the bootloader allready exist ... this is probably the same that the bootloader for the big brothers of the Merlin head or maybe it can only work for updating the "hand controler" , I don't know exactly ...
Tamas know that probably !?!
:cool: Claude :cool:
Merlin + Papywizard on Windows 7 & Nokia 770 § N810 & Acer (Netbook) + PanoramaApp Androïd + Deltawave PapyMerlin BT + Autopano
Spherical Pano (180 x 360) with Canon 40D + Canon EF-S 10-22mm f/3.5-4.5 Zoom & Pôle Pano with Canon 5D MK2 and shaved Tokina 10-17 3.5-4.5 AF DX Fisheye
Gigapixel photography with Nikon D200 + Sigma 70-200 F 2.8 EX DG APO HSM

User avatar
fma38
Moderator
 
Topic author
Posts: 5850
Likes: 2 posts
Liked in: 2 posts
Joined: Wed Dec 07, 2005 6:21 pm
Location: Grenoble, France
Info

by fma38 » Tue Nov 17, 2009 8:50 am

Herre is a first draft of the arduino shield I'm thinking about for the controller replacement. Feel free to comment.


Frédéric

User avatar
AlexandreJ
Kolor Team
 
Posts: 5987
Likes: 7 posts
Liked in: 10 posts
Joined: Mon Nov 14, 2005 4:56 pm
Location: Francin, France
Info

by AlexandreJ » Tue Nov 17, 2009 8:58 am

My comment is ... It's like Chinese for me ! Anyway, great job as always.

no avatar
Greg Nuspel
Member
 
Posts: 169
Likes: 0 post
Liked in: 0 post
Joined: Tue Oct 06, 2009 6:50 pm
Location: Calgary, Alberta, Canada
Info

by Greg Nuspel » Tue Nov 17, 2009 12:11 pm

Looks good. Would you be able to add a flash monitor input, this allows the controller to ensure the exposure is completed prior to next step.
--Greg Nuspel

User avatar
fma38
Moderator
 
Topic author
Posts: 5850
Likes: 2 posts
Liked in: 2 posts
Joined: Wed Dec 07, 2005 6:21 pm
Location: Grenoble, France
Info

by fma38 » Tue Nov 17, 2009 12:29 pm

I don't know the internal flash contact design. Do you have docs? Does it require special circuit to protect µ-controller input?
Frédéric

no avatar
Greg Nuspel
Member
 
Posts: 169
Likes: 0 post
Liked in: 0 post
Joined: Tue Oct 06, 2009 6:50 pm
Location: Calgary, Alberta, Canada
Info

by Greg Nuspel » Tue Nov 17, 2009 12:34 pm

I will check into it, but from what I know is it will switch a low voltage this is why some older flashes can't be used since their voltage is too high. We could use an analog input since it looks like the pins are all used. I am sure Vcc will work and then monitor for 5v or 0 and that will indicate the flash/shutter state.
--Greg Nuspel

no avatar
Greg Nuspel
Member
 
Posts: 169
Likes: 0 post
Liked in: 0 post
Joined: Tue Oct 06, 2009 6:50 pm
Location: Calgary, Alberta, Canada
Info

by Greg Nuspel » Tue Nov 17, 2009 12:36 pm

--Greg Nuspel

User avatar
fma38
Moderator
 
Topic author
Posts: 5850
Likes: 2 posts
Liked in: 2 posts
Joined: Wed Dec 07, 2005 6:21 pm
Location: Grenoble, France
Info

by fma38 » Tue Nov 17, 2009 1:58 pm

Thanks. I will add an opto-coupler so it will be safe. And I don't think we have to use an AD input, as all pins are simple IO by default.
Frédéric

Next

Who is online

Users browsing this forum: No registered users and 1 guest

cron