Building a motorized lens slide using an Arduino - AVS Forum | Home Theater Discussions And Reviews
Forum Jump: 
 
Thread Tools
post #1 of 7 Old 10-22-2019, 06:32 AM - Thread Starter
Member
 
evanft's Avatar
 
Join Date: Oct 2009
Posts: 142
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 87 Post(s)
Liked: 37
Building a motorized lens slide using an Arduino

Background
I recently acquired a Panamorph UH380 anamorphic lens for a great price. After buying it I started looking for a good slide. Unfortunately, it seems that lens slides, especially motorized ones, have been become very rare. If I did find one, it was typically used, packaged with lens, and very expensive (sometimes four figures!). This lead me down the rabbit hole of designing and building my own. After a couple weeks I believe I've got it.

How It Works
The slide uses a stepper motor attached to an Arduino uno. An IR sensor is used to trigger movement while two limit switches act as stoppers.

Parts Used
  • 400mm Travel Length Linear Stage Actuator (Part number Sfu1605). This comes with a 3.0A 1.8deg 24V stepper motor. I'm sure you could also build one using some extruded aluminium and an off-the-shelf motor.
  • Arduino Uno. I bought the super starter kit with the various extra little parts, like the IR sensor and remote. I highly recommend getting a kit if you don't already have all the stuff for this.
  • TB6600 stepper motor driver. There are a lot of these available from manufacturers in China.
  • Meanwell 24V 6.0A power supply. This is for powering the stepper motor through the motor driver. I imagine many others will work fine as long as it has enough power for your particular stepper motor. I found mine for a pretty good price on eBay. You'll need to strip a power cord to hook it up to the connections on the PSU. Just use whatever you have around
  • Limit switches. Tons of options for these. Just get a bag of them from Amazon or something.
  • LM2596S DC-DC convertor. This steps down the power from the PSU to something appropriate for the Arduino
  • Sensor shield v5. Not absolutely necessarily, but makes wiring much easier and cleaner.

Here are some things to keep in mind before adapting this to your setup.
  • In my setup left moves it front of the projector and right moves it away from the projector.
  • The IR remote codes are hard coded in the program. These would need to change based on whatever remote you use. You will likely need to use an IR code capture program of some kind to figure out what the codes are if you're using something different. There are many examples for this online. I used the remote that came with my kit and simply added the codes to my projector in my Harmony hub setup.
  • The pause between motor pulses may differ based on your choice of motor. If you're having problems, this may be causing it.
  • Different stepper motors may have different pin setups or power needs, so the TB6600 may not work for certain motors.
  • I used a three-prong IR sensor that came with my kit. I don't know if different sensors have different pins or communicate differently.
  • My limit switches were wired as normally open (NO). You will need to reverse the states in the program if you wire them as normally closed (NC).

Here are some hurdles I ran into while working on this.
  • On many TB6600 drivers the A and B pins are swapped. Before plugging everything in open up your driver and confirm the pins are correct.
  • For some reason running the serial print out causes some weird behavior with the driver and motor. It almost seems like it's changing the delay between pauses somehow. If you want to use the serial output, just disconnect the power from the driver/motor.
  • If I set my motor enable pin to high while the motor isn't moving, the motor makes a slight buzzing noise. Turning the pin off when not moving fixes this.
  • Pin 1 on the Arduino is a serial pin. Don't connect anything to it.
  • The limit switches need some somewhat special wiring. The NO/NC pin needs to be wired to both the communication pin on the Arduino and a 5V source. You also need to put a resistor in between this pin and the 5V. 5Kohm worked for me. The common pin needs to be wired to ground.

GitHub with code.

JVC RS-520, Elite Screens 100" AcousticPro UHD electric
Klipsch RP-8000F, RP-450C, 2xRP-240S, 2xRP-402S, 2xSVS PB-1000
Denon AVR-X3200W/HDFury Linker/MiniDSP 2x4 HD
Panasonic UB820/PC/PS3/PS4 Pro/Switch/WiiU/Xbox One X/Original Xbox
Logitech Harmony Hub

Last edited by evanft; 10-29-2019 at 10:15 AM.
evanft is offline  
Sponsored Links
Advertisement
 
post #2 of 7 Old 10-22-2019, 10:30 AM
AVS Forum Special Member
 
ScottAvery's Avatar
 
Join Date: Mar 2002
Location: Great Falls, VA
Posts: 1,812
Mentioned: 24 Post(s)
Tagged: 0 Thread(s)
Quoted: 729 Post(s)
Liked: 213
Quote:
Originally Posted by evanft View Post
Background
I recently acquired a Panamorph UH380 anamorphic lens for a great price. After buying it I started looking for a good slide. Unfortunately, it seems that lens slides, especially motorized ones, have been become very rare. If I did find one, it was typically used, packaged with lens, and very expensive (sometimes four figures!). This lead me down the rabbit hole of designing and building my own. After a couple weeks I believe I've got it.

How It Works
The slide uses a stepper motor attached to an Arduino uno. An IR sensor is used to trigger movement while two limit switches act as stoppers.

Parts Used
  • 400mm Travel Length Linear Stage Actuator (Part number Sfu1605). This comes with a 3.0A 1.8deg 24V stepper motor. I'm sure you could also build one using some extruded aluminium and an off-the-shelf motor.
  • Arduino Uno. I bought the super starter kit with the various extra little parts, like the IR sensor and remote. I highly recommend getting a kit if you don't already have all the stuff for this.
  • TB6600 stepper motor driver. There are a lot of these available from manufacturers in China.
  • Meanwell 24V 6.0A power supply. This is for powering the stepper motor through the motor driver. I imagine many others will work fine as long as it has enough power for your particular stepper motor. I found mine for a pretty good price on eBay. You'll need to strip a power cord to hook it up to the connections on the PSU. Just use whatever you have around
  • Limit switches. Tons of options for these. Just get a bag of them from Amazon or something.
  • LM2596S DC-DC convertor. This steps down the power from the PSU to something appropriate for the Arduino
  • Sensor shield v5. Not absolutely necessarily, but makes wiring much easier and cleaner.

Here are some things to keep in mind before adapting this to your setup.
  • In my setup left moves it front of the projector and right moves it away from the projector.
  • The IR remote codes are hard coded in the program. These would need to change based on whatever remote you use. You will likely need to use an IR code capture program of some kind to figure out what the codes are if you're using something different. There are many examples for this online. I used the remote that came with my kit and simply added the codes to my projector in my Harmony hub setup.
  • The pause between motor pulses may differ based on your choice of motor. If you're having problems, this may be causing it.
  • Different stepper motors may have different pin setups or power needs, so the TB6600 may not work for certain motors.
  • I used a three-prong IR sensor that came with my kit. I don't know if different sensors have different pins or communicate differently.
  • My limit switches were wired as normally open (NO). You will need to reverse the states in the program if you wire them as normally closed (NC).

Here are some hurdles I ran into while working on this.
  • On many TB6600 drivers the A and B pins are swapped. Before plugging everything in open up your driver and confirm the pins are correct.
  • For some reason running the serial print out causes some weird behavior with the driver and motor. It almost seems like it's changing the delay between pauses somehow. If you want to use the serial output, just disconnect the power from the driver/motor.
  • If I set my motor enable pin to high while the motor isn't moving, the motor makes a slight buzzing noise. Turning the pin off when not moving fixes this.
  • Pin 1 on the Arduino is a serial pin. Don't connect anything to it.
  • The limit switches need some somewhat special wiring. The common pin needs to be wired to both the communication pin on the Arduino and a 5V source. You also need to put a resistor in between this pin and the 5V. 5Kohm worked for me. The NO or NC pin needs to be wired to ground.

GitHub with code.

I will be posting pictures and video later today.

Thanks for posting all these details. I have been considering building a masking system and some of your solution would work in that design as well.
ScottAvery is offline  
post #3 of 7 Old 10-22-2019, 10:37 AM - Thread Starter
Member
 
evanft's Avatar
 
Join Date: Oct 2009
Posts: 142
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 87 Post(s)
Liked: 37
Thanks.

You could also make this work with a 12V trigger input from the projector itself, but I found that a bit finicky.

JVC RS-520, Elite Screens 100" AcousticPro UHD electric
Klipsch RP-8000F, RP-450C, 2xRP-240S, 2xRP-402S, 2xSVS PB-1000
Denon AVR-X3200W/HDFury Linker/MiniDSP 2x4 HD
Panasonic UB820/PC/PS3/PS4 Pro/Switch/WiiU/Xbox One X/Original Xbox
Logitech Harmony Hub
evanft is offline  
Sponsored Links
Advertisement
 
post #4 of 7 Old 10-22-2019, 09:32 PM
AVS Forum Special Member
 
ScottAvery's Avatar
 
Join Date: Mar 2002
Location: Great Falls, VA
Posts: 1,812
Mentioned: 24 Post(s)
Tagged: 0 Thread(s)
Quoted: 729 Post(s)
Liked: 213
Quote:
Originally Posted by evanft View Post
Thanks.

You could also make this work with a 12V trigger input from the projector itself, but I found that a bit finicky.
I has the same issue with my slide. The JVC 540 model can't scale 4k60 so the anamorphic mode is not accessible with a lot of Apple TV content, and the trigger is connected to that mode. Had to switch to using my Oppo to scale and put an external 12v power supply on an Insteon on/off module for slide control.
ScottAvery is offline  
post #5 of 7 Old 10-23-2019, 01:45 AM - Thread Starter
Member
 
evanft's Avatar
 
Join Date: Oct 2009
Posts: 142
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 87 Post(s)
Liked: 37
Quote:
Originally Posted by ScottAvery View Post
I has the same issue with my slide. The JVC 540 model can't scale 4k60 so the anamorphic mode is not accessible with a lot of Apple TV content, and the trigger is connected to that mode. Had to switch to using my Oppo to scale and put an external 12v power supply on an Insteon on/off module for slide control.
Yep, it's dumb. You'd think they would just allow it to switch as soon as the signal dropped to 4k24, but nope.

JVC RS-520, Elite Screens 100" AcousticPro UHD electric
Klipsch RP-8000F, RP-450C, 2xRP-240S, 2xRP-402S, 2xSVS PB-1000
Denon AVR-X3200W/HDFury Linker/MiniDSP 2x4 HD
Panasonic UB820/PC/PS3/PS4 Pro/Switch/WiiU/Xbox One X/Original Xbox
Logitech Harmony Hub
evanft is offline  
post #6 of 7 Old 10-29-2019, 10:08 AM - Thread Starter
Member
 
evanft's Avatar
 
Join Date: Oct 2009
Posts: 142
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 87 Post(s)
Liked: 37
Updates coming soon. I had to fix my washing machine and put this on pause for a week.

I've actually added the 12V trigger capability back into the code. I need some time to test it, but I think it may work after all. I also need to get some good pictures to post in the thread. I expect to have them in the next couple days.

JVC RS-520, Elite Screens 100" AcousticPro UHD electric
Klipsch RP-8000F, RP-450C, 2xRP-240S, 2xRP-402S, 2xSVS PB-1000
Denon AVR-X3200W/HDFury Linker/MiniDSP 2x4 HD
Panasonic UB820/PC/PS3/PS4 Pro/Switch/WiiU/Xbox One X/Original Xbox
Logitech Harmony Hub
evanft is offline  
post #7 of 7 Old 10-31-2019, 06:26 AM - Thread Starter
Member
 
evanft's Avatar
 
Join Date: Oct 2009
Posts: 142
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 87 Post(s)
Liked: 37
Updates delayed due to me being dumb and bricking an Arduino and sensor shield. Good times.

I have, however, gotten the 12V trigger working. I stepped down the 12V to ~3V using a DC-DC converter. This worked great, though I had to plug it in an analog pin instead of a digital pin to get it to work properly.

Once the projector is on, switching to an anamorphic mode seems to keep the 12V trigger switched on until you explicitly turn it off. So if you turn on the projector without turning on any input sources, you can immediately switch to the anamorphic mode to trigger anything connected to it. You can then turn on a source that initially outputs to 4k60, like the UB820, and have the anamorphic mode works when this source switches to playing 4k24 content. Obviously, the anamorphic processing won't turn on until the switch, but the trigger remains active.

To integrate into my Harmony hub, I'll simply put in a delay so that the receiver and UB820 don't switch on until after the projector has changed over completely.

JVC RS-520, Elite Screens 100" AcousticPro UHD electric
Klipsch RP-8000F, RP-450C, 2xRP-240S, 2xRP-402S, 2xSVS PB-1000
Denon AVR-X3200W/HDFury Linker/MiniDSP 2x4 HD
Panasonic UB820/PC/PS3/PS4 Pro/Switch/WiiU/Xbox One X/Original Xbox
Logitech Harmony Hub

Last edited by evanft; 10-31-2019 at 07:49 AM.
evanft is offline  
Sponsored Links
Advertisement
 
Reply 2.35:1 Constant Image Height Chat

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off