Bescor MP-101 and Arduino v3.0

Update: The map function utilizes the Nunchuck’s full range to the Bescor speed. mapx = map(absx, 0, 100, 0, 115); Arduino /* * * This sketch controls the Bescor MP-101 Pan/Tilt system using the Wii Nunchuck * * Copyright (c) 2015 Matt Alford, http://www.protechy.com * Date: April 6, 2015 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses></http:>. * I am not responsible for any damage that may occur from the use of this software. * Nunchuck Library http://playground.arduino.cc/Main/WiiChuckClass * */ #include "Wire.h" #include "WiiChuck.h" // The library used by the Nunchuck #define left 11 //Pin 11 controls left pan #define right 3 //Pin 3 controls right pan #define up 10 //Pin 10 controls up tilt #define down 9 //Pin 9 controls down tilt WiiChuck chuck = WiiChuck(); int varx, vary, absx, absy, mapx, mapy = 0; void setup() { Serial.begin(115200); // Opening the serial port TCCR2B = TCCR2B & 0b11111000 | 0x07; //Adjusting PWM frequencies for testing pins 11 and 3 TCCR1B = TCCR1B & 0b11111000 |...

Bescor MP-101 Hack Part 2

In part 2, we’ll upload our sketch to the Arduino. Step 1: Plugin the Arduino to the Computer Connect the Arduino using an usb cable.  Note:  Disconnect the DIN cable from the Bescor before proceeding. Open up the Arduino program and make sure the Arduino is selected on the right COM port. Step 2: Upload the Sketch This sketch is a work in progress and can be modified and used freely. Updated: 4-6-2015 Arduino /* * * This sketch controls the Bescor MP-101 Pan/Tilt system using the Wii Nunchuck * * Copyright (c) 2015 Matt Alford, http://www.protechy.com * Date: April 6, 2015 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses></http:>. * I am not responsible for any damage that may occur from the use of this software. * Nunchuck Library http://playground.arduino.cc/Main/WiiChuckClass * */ #include "Wire.h" #include "WiiChuck.h" // The library used by the Nunchuck #define left 11 //Pin 11 controls left pan #define right 3 //Pin 3 controls right pan #define up 10 //Pin 10 controls up...

Bescor MP-101 Hack Part 1

In this tutorial,  I’ll show you how to connect the Arduino to the Bescor MP-101. Note: Please check for continuity with a multi-meter.  The colors of the wires may be different.  update: 12-26-2013 Pinout of the DIN connector. Pin 1 – Purple Pin 2 – Green – Right Pin 3 – Black – Up Pin 4 –  White – Vin Pin 5 –  Blue  – Down Pin 6 – Yellow – Left Pin 7 – Red – Ground Step 1: Prepare the Wires There are several ways to connect the wires to the Arduino.  I cut the controller and cut off the ends of the wires and solder jumpers to it.  Note: It’s better to cover the exposed soldered connections to prevent the wires from touching.   Step 2: Connect the WiiChuck Adapter, Power and Ground Wires The WiiChuck adapter makes it easy to connect the Nunchuck to the Arduino.  Here’s the one I’m using. Connect the white wire to vin and red wire to ground. White – Vin Red -Ground   Step 3: Connect the Blue, Black, Green, and Yellow Wires Note:  The purple wire is not used. Blue – Pin 9 Black -Pin 10 Green – Pin 3 Yellow – Pin 11         Bescor MP-101 Hack Part...

Arduino Installation Tutorial

This is a simple tutorial on how to install the Arduino software and library needed for our Bescor controller.  Note: Arduino 1.0.5 drivers are compatible with Windows 8. Step 1: Download Download the Arduino 1.0.5 Windows Installer.   Step 2: Installation Run the arduino-1.0.5-windows.exe Arduino License Agreement:  Click – I Agree   Arduino Setup Installation Options:  Click – Next >   Arduino Setup Installation Folder:  Browse  for a destination or Click – Install   Arduino Setup:  Installing   Arduino Setup: Completed   Arduino Windows Security:  Click – Install   If we are successful, the Arduino will show in device manager once we plug it in.   Complete!  We’re ready to install the library.   Step 3: WiiChuck Library Download Download the Wiichuck   Unzip the file in the Arduino library folder. Finished!  Now we can begin connecting the Nunchuck and Bescor to the Arduino. Bescor MP-101 Hack...

Arduino Ethernet Shield Client and Server

I want to share a project that uses two Arduinos to communicate over LAN as a client and server.  These two sketches were made for a pan/tilt controller, but you can modify the code to send other data. Client: Arduino /* * * This program controls the Bescor MP&minus;101 Pan/Tilt system via Ethernet * * Copyright (c) 2012 Matt Alford, http://www.protechy.com * Date: Sep 15, 2012 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses></http:>. */ #include <SPI.h> #include <Ethernet.h> byte mac[] = { 0x90, 0xA2, 0xDA, 0x0D, 0xXX, 0xXX }; //assign arduino mac address byte ip[] = { xxx, xxx, x, xx}; // ip in lan assigned to the arduino //byte gateway[] = { xxx, xxx, x, x }; // internet access via router //byte subnet[] = { xxx, xxx, xxx, x }; //subnet mask EthernetServer server(8888); //server port of the arduino EthernetClient client; byte serverName[] = { xxx, xxx, x, xx }; // (IP) Arduino server IP address #define up 9   #define down 3  ...

Bescor MP-101 Remote Development

Update Oct 20, 2012: I’m holding this project off.  I had a few questions about the pan/tilt speed of the Arduino remote vs the original remote.  The pan/tilt speed is reduced, but because we’re changing the original values designed for the motors, it could cause the motors to stall.   We’ve been using the Arduino Uno and Bescor MP-101 for a while now, and I’ve learned a lot, but now I’m ready to develop a Bescor Joystick Remote without the Arduino Uno.  If things come together with a little help and support, I want to implement a wireless solution using a smart phone.  In the meantime, I want to thank those of you for letting me see your cool pan/tilt projects.    ...

Bescor MP-101 and Arduino v2.4

  This code is slightly modified to keep the motors from stalling when they run back and forth, but it appears the problem is something to do with motors going to ground. Arduino /* * * This program controls the Bescor MP-101 Pan/Tilt system using the Wii Nunchuck * * Copyright (c) 2012 Matt Alford, http://www.protechy.com * Date: Aug 14, 2012 * * Nunchuck Library http://playground.arduino.cc/Main/WiiChuckClass * */ #include "Wire.h" #include "WiiChuck.h" // The library used by the Nunchuck #define left 11 //Pin 11 controls left pan #define right 3 //Pin 3 controls right pan #define up 10 //Pin 10 controls up tilt #define down 9 //Pin 9 controls down tilt WiiChuck chuck = WiiChuck(); int varx = 0; // The x-axis variable to store the value coming from the Nunchuck int vary = 0; // The y-axis variable to store the value coming from the Nunchuck int absx = 0; // The x-axis variable used to store the absolute value. int absy = 0; // The y-axis variable used to store the absolute value. void setup() { Serial.begin(115200); // Opening the serial port //TCCR2B = TCCR2B & 0b11111000 | 0x07; //Adusting PWM frequencies for testing pins 11 and 3 //TCCR1B = TCCR1B & 0b11111000 | 0x05; //Pins 9 and 10 // nunchuck_setpowerpins(); // use analog pins 2 & 3 as gnd & pwr (uncomment to use WiiChuck) chuck.begin(); chuck.update(); } /* //To power the WiiChuck Adapter static void nunchuck_setpowerpins() { #define pwrpin PORTC3 #define gndpin PORTC2 DDRC |= _BV(pwrpin) | _BV(gndpin); PORTC &=~ _BV(gndpin); PORTC |= _BV(pwrpin); delay(100); // wait for things to stabilize } */ void loop()...

Bescor MP-101 and Arduino: Update

  I’m retiring this project for now and encourage anyone to continue improving the Bescor MP-101 and Arduino, but in the meantime stay tuned for a really cool project involving Opentld and the Arduino.   Known issues: The Bescor sometimes stalls under reduced...

Bescor MP-101 and Arduino v2.1

New code here v2.4 On v2, I didn’t assign all the directional wires PWM pins, and it caused me to use the purple wire as speed which was unnecessary.  In v2.1 the speed and direction come from the direction wires.  Also, I learned from this link the Bescor goes to ground at limit which means it will stop moving overtime when it goes in two directions.  By using 1.5k resistors on each end of the four wires, the Bescor doesn’t reach the ground limit. White = up Blue = down Yellow = left Green = right White = pin 10 Blue = pin 9 Yellow = pin 11 Green = pin 3 The Bescor had a lot of electrical noise, so I changed the PWM frequency using this code.   Arduino /* * * This program controls the Bescor MP-101 Pan/Tilt system using the Wii Nunchuck * * Copyright (c) 2012 Matt Alford, http://www.protechy.com * Date: June 23, 2012 * * Nunchuck Library created by Gabriel Bianconi, http://www.gabrielbianconi.com/ * */ #include "Wire.h" #include "ArduinoNunchuk.h" // The library used by the Nunchuck #define left 11 //Pin 12 controls left pan #define right 3 //Pin 10 controls right pan #define up 10 //Pin 9 controls up tilt #define down 9 //Pin 8 controls down tilt ArduinoNunchuk nunchuk = ArduinoNunchuk(); int varx = 0; // The x-axis variable to store the value coming from the Nunchuck int vary = 0; // The y-axis variable to store the value coming from the Nunchuck int absx = 0; // The x-axis variable used to store the absolute value. int absy = 0; // The...

Bescor MP-101 and Arduino V2

This is a followup of a better way to control the Bescor using the Arduino UNO from this tutorial  (Update: Working on a new setup and hopefully have the code up soon.)   Here’s a breakdown of how the original controller works .   White = up Blue = down Yellow = left Green = right Black = Ground Red = 5v Purple = Speed When a button is pressed, an electrical current passes through one of the directional wires to the Bescor.  The red wire is 5v and sends the current through the slider that changes the voltage and returns to the Bescor through the purple wire. I’m still experimenting, but here’s how I connected the wires to the Arduino using the original Bescor controller White = pin 8 Blue = pin 9 Yellow = pin 10 Green = pin 12 Purple = pin 3 Without looking inside the Bescor, I didn’t know if this is the best setup.  I tried connecting the direction wires and ground to control the speed, but it didn’t work.  The solution was to use the purple wire as my speed control and change the voltage like on the Bescor controller slider using PWM.  The direction can be controlled by setting the digital pins HIGH “on” or LOW “off”. Here’s the code: Arduino /* * * This program controls the Bescor MP-101 Pan/Tilt system using the Wii Nunchuck * * Copyright (c) 2012 Matt Alford, http://www.protechy.com * Date: April 19, 2012 * * Nunchuck Library created by Gabriel Bianconi, http://www.gabrielbianconi.com/ * */ #include #include "ArduinoNunchuk.h" // The library used by the Nunchuck #define...

Arduino Basics: Installation Tutorial

  In this tutorial, I’ll show you how to install the Arduino Software and drivers on a Window 7 64-bit computer. Step 1: Download and Installation   Download the Arduino Software here Download and extract the zip file in any location.  I put mine on the desktop. Open the arduino-1.0 folder.  This folder contains all the files and drivers needed to upload programs “sketches” to the Arduino. Step 2: Driver Installation   I’ll show you how to manually install the Arduino Uno drivers on a Windows 7 64-bit computer.  Generally, the older versions of the Arduino can be installed on there own. Click on start and go to control panel and click on System and Security. Click on System Click on Device Manager Let’s plug in the Arduino using the usb cable and see the Arduino as a unknown device. Right click on the Unknown device and click properties and select the Driver tab and click Update Driver. Click on Browse my computer for driver software Browse to the Arduino folder we unzipped and select the drivers folder Click Next and a security window may popup, but we want to install the driver. The Arduino should be listed under Ports in device manager after we installed the driver. Step 3: Running and Testing the Arduino Software   Back in the Arduino folder, click on the Arduino blue icon. Let’s upload a example sketch to the Arduino.  Click on File, Examples, 1.Basics and click Blink. While the Arduino is plugged in to the computer via usb, make sure the Arduino Uno board is selected under Tools – Board.  Finally, upload...

Arduino Pan and Tilt System

[av_video src=’http://vimeo.com/41374127′ format=’16-9′ width=’16’ height=’9′]   I started this project a few months ago to record video at a distance of 18 meters.  Most pan and tilt systems I tried were not suited for slower and smoother speeds, but with the modified PT785-S System from ServoCity, I was able to get smoother control. I used ServoCity’s worm drive to get slower motion and more toque. Also, sometimes I needed to mount the camera up high.  This is the light stand I used.  The stand is reinforced with two galvanized steel pipes. The controller took the longest to build.  This is a early picture of the inside showing the motor driver and Arduino. I have a Ethernet cable running to the motors and servo from the Arduino...

Bescor MP-101 and Arduino Tutorial

New Tutorial Here – July 4, 2013 Update: Thanks to Bill Porter, there is a better way to connect the Bescor to the Arduino instead of using the Motor Shield.  I’ll try to get a working prototype up this week.  Here’s the link     [av_video src=’http://vimeo.com/40569055′ format=’16-9′ width=’16’ height=’9′]   The Bescor MP-101 pan and tilt is a great cost effective solution for video and photo setups, but it has several limitations.  First off, the controller only allows movement on one axis at a time.  Also, the speed slider is difficult to use while panning. I searched for a better remote, but couldn’t find one at a reasonable price, so after trying a few experiments, I found using the Nunchuck, the Arduino, and the motor shield together, I could make a great controller. Step 1: Strip the MIDI Wires   I’ll be using a five pin MIDI cable like this one.  It’s also possible to use the original cable.  (Note: The wire colors from other cables might be different from the original cable.) Step 2: Strip the Nunchuck Extension Wires To connect the Wii Nunchuck controller, I used this extension.    Yellow – Ground    Black – Clock    Red – Data    Brown – Power These wires will connect to the Arduino pins and later I’ll show in the code the pin assignments.  If you use a different extension, the wire colors might be in a different order.  Here is the Nunchuck pinout. Step 3: Connect the Nunchuck Wires to the Arduino Motor Shield The wires are connected as followed on the motor shield:    Yellow –...