1
0
Fork 0
bescor-mp101-libre/README.md

372 lines
9.2 KiB
Markdown
Raw Permalink Normal View History

# Bescor MP101 Libre
Notes on using the Bescor MP101 motorized pan head hardware
with libre software.
No proprietary applications, SDKs, or similar are used.
2023-03-14 10:39:25 -06:00
![Photo of Bescor MP101 motorized pan head.](img/bescor-mp101.jpg)
2023-03-26 09:44:27 -06:00
# Introduction
The Bescor MP101 is a very low cost motorized pan/tilt head.
It ships with a wired remote.
The software in this repo, with a custom built cable, enables
software control of the MP101 with a Raspberry Pi or Arduino.
# WARNING
Doing any of the below can fry your device.
2023-03-13 19:41:33 -06:00
# Development Setup
2023-03-26 09:44:27 -06:00
Two different boards have been tested so far.
One for Arduino-like setup.
One on a Raspberry Pi.
## Arduino
2023-03-13 19:41:33 -06:00
The development setup is using a LattePanda 3. It is an Intel
based board with an Arduino Leonardo built on board.
This should be similar to using other Arduino devices plugged
into USB ports.
2023-03-26 09:44:27 -06:00
GPIOs on the Arduino can be controlled thusly:
* Natively.
* Various libraries.
## Raspberry Pi
Testing on a Raspberry Pi is using a Pi 4 running
Raspbian (Debian stable/bullseye 11).
GPIOs on the Pi can be controlled thusly:
* Natively.
* pigpiod.
https://abyz.me.uk/rpi/pigpio/
* RPiGPIO.
https://pypi.org/project/RPi.GPIO/
* Various libraries.
# Applications
At present, there are only small test scripts to move.
Ideally, it integrates with other applications.
There are many possible targets:
* INDI via Raspberry Pi GPIO.
https://github.com/indilib/indi-3rdparty/tree/master/indi-rpi-gpio
https://www.indilib.org/raspberry-pi/raspberry-pi-gpio-control.html
* Hamlib.
https://github.com/hamlib/hamlib
* OBS Studio with obs-ptz.
https://github.com/glikely/obs-ptz
https://obsproject.com/forum/resources/ptz-controls.1284/
* OpenCV.
There are also other protocols used in other cameras that could be
implemented (such as obs-ptz uses) as a software daemon.
* VISCA UDP.
* VISCA TCP.
* ONVIF.
2023-03-27 12:23:18 -06:00
https://github.com/onvif/specs/blob/development/doc/PTZ.xml
https://github.com/onvif/specs/blob/development/wsdl/ver20/ptz/wsdl/ptz.wsdl
https://www.onvif.org/specs/srv/ptz/ONVIF-PTZ-Service-Spec.pdf
https://github.com/BreeeZe/rpos
Other:
* Custom web API.
Hardware protocols:
https://github.com/RogerHardiman/node-ptz-decoder
* Pelco D.
* Pelco P.
* BBV422.
* Bosch(Philips PCSS)
* Forward Vision
* VCL
* Vicon
* American Dynamics (Sensormatic)
* JVC
* Panasonic
* Samsung
* Sony VISCA CCTV
2023-03-13 19:41:33 -06:00
# Pins
2023-03-25 10:23:50 -06:00
Not all cables have the same color pin out. In fact, most have different
pinouts, so each cable should be tested.
2023-03-25 11:02:38 -06:00
Note: colors may be different on different cables!
Each cable pinout needs to be tested or the MP101 can get fried.
2023-03-13 19:41:33 -06:00
2023-03-25 10:23:50 -06:00
2023-03-25 10:25:13 -06:00
## Seven Pin DIN Standard
2023-03-25 10:23:50 -06:00
The standard DIN pin ordering for a 7-pin connector is below:
![7 Pin DIN Connector Pinout](img/DIN_connector_pinout-7pin.png)
2023-03-25 10:23:50 -06:00
From: https://en.wikipedia.org/wiki/DIN_connector
2023-03-25 11:18:14 -06:00
![MP101 Panel Pin DIN Connector Pinout](img/bescor-mp101-panel-pins.jpg)
Pinout of the Bescor MP101 panel.
![MP101 Cable Pin DIN Connector Pinout](img/bescor-mp101-cable-pins-label.jpg)
Pinout of the Bescor MP101 cable.
2023-03-25 11:02:38 -06:00
## Pins from Bescor Fifty Foot Extension Cable
Pins on the MP-101 50 foot extension cable.
Numbered using the standard DIN pin order.
2023-03-25 18:27:45 -06:00
XXX Confirm this, I think it is reversed. Compare with remote. XXX
2023-03-25 11:02:38 -06:00
```
Pin Color Use ArduinoPin Raspberry Pi 4 B Pin
--- ----- --- -------- --------------------
2023-03-25 11:11:56 -06:00
1 Black Right D3 10 GPIO15
2023-03-25 11:02:38 -06:00
2 Green 5V 5V 2 5V
2023-03-25 11:11:56 -06:00
3 White Left D0 3 GPIO2 (Orange)
4 Blue Up D2 8 GPIO14
5 Brown Down D1 5 GPIO3
2023-03-25 12:28:03 -06:00
6 Red GND GND under ICSP 7 GND XXX 9?
2023-03-25 11:11:56 -06:00
7 Yellow Speed ? PWM 12 GPIO18
2023-03-25 11:02:38 -06:00
```
The "ArduinoPin" column is how the Arduino pins on the Panda are labelled.
## Pins from Bescor Twelve Foot Extension Cable
Pins on the MP-101 12 foot extension cable.
Numbered using the standard DIN pin order.
2023-03-27 15:03:17 -06:00
Cable labelled "2", white/orange, in my inventory.
2023-03-25 12:44:56 -06:00
```
PIN Color Use Raspberry Pi 4 B Pin
--- ----- --- --------------------
2023-03-25 18:27:45 -06:00
1 Green Left 29 GPIO5
2023-03-25 12:44:56 -06:00
2 Orange 5V 2 5V
2023-03-25 18:27:45 -06:00
3 Brown Right 31 GPIO6
4 Yellow Down 36 GPIO16
5 Red Up 11 GPIO17
2023-03-26 09:10:36 -06:00
6 Blue GND 9 GND
7 Black Speed 32 GPIO12 PWM0
2023-03-25 12:44:56 -06:00
```
2023-03-25 10:23:50 -06:00
## Pi 4
2023-03-25 12:18:08 -06:00
On the Raspberry Pi 4, with Raspbian installed running `pinout`,
with `python3-gpiozero` installed, will majickally print the pinouts.
Pinouts from Raspberry Pi documentation:
![Raspberry Pi Pinouts.](img/GPIO-Pinout-Diagram-2.png)
2023-03-25 12:18:08 -06:00
https://www.raspberrypi.com/documentation/computers/raspberry-pi.html
2023-03-25 12:18:08 -06:00
```
$ pinout
,--------------------------------.
| oooooooooooooooooooo J8 +======
| 1ooooooooooooooooooo PoE | Net
| Wi 1o +======
| Fi Pi Model 4B V1.5 oo |
| ,----. +---+ +====
| |D| |SoC | |RAM| |USB3
| |S| | | | | +====
| |I| `----' +---+ |
| |C| +====
| |S| |USB2
| pwr |hd| |hd| |I||A| +====
`-| |---|m0|---|m1|----|V|-------'
Revision : d03115
SoC : BCM2711
RAM : 8GB
Storage : MicroSD
USB ports : 4 (of which 2 USB3)
Ethernet ports : 1 (1000Mbps max. speed)
Wi-fi : True
Bluetooth : True
Camera ports (CSI) : 1
Display ports (DSI): 1
J8:
3V3 (1) (2) 5V
GPIO2 (3) (4) 5V
GPIO3 (5) (6) GND
GPIO4 (7) (8) GPIO14
GND (9) (10) GPIO15
GPIO17 (11) (12) GPIO18
GPIO27 (13) (14) GND
GPIO22 (15) (16) GPIO23
3V3 (17) (18) GPIO24
GPIO10 (19) (20) GND
GPIO9 (21) (22) GPIO25
GPIO11 (23) (24) GPIO8
GND (25) (26) GPIO7
GPIO0 (27) (28) GPIO1
GPIO5 (29) (30) GND
GPIO6 (31) (32) GPIO12
GPIO13 (33) (34) GND
GPIO19 (35) (36) GPIO16
GPIO26 (37) (38) GPIO20
GND (39) (40) GPIO21
POE:
TR01 (1) (2) TR00
TR03 (3) (4) TR02
```
2023-03-13 19:41:33 -06:00
2023-03-25 10:23:50 -06:00
2023-03-13 19:41:33 -06:00
# Wire Harness
I made a quick and dirty wire harness that works.
My MP101 kit came with two extension cables.
I used one of those to use the male headed to plug
into the MP101, and the newly cut wires to connect
to pins to plug into the Panda Arduino.
I had short jumper wires with pin headers on each end.
For the Panda male/male wire with headers is needed.
If the board being used has pins not headers, a male/female
wire jumper will be needed.
In lieu of connecting the pins to the wires via soldering,
WAGO crimpers were used. They work great and easy++.
2023-03-27 12:39:40 -06:00
## MIDI 7-pin
Pinout of cable.
2023-03-27 15:03:17 -06:00
Cable labelled "3", green and brown, in my inventory.
Right angle of header limits use locations.
Should work ok on most tripod heads, but maybe
not mounted on rail.
2023-03-27 12:39:40 -06:00
```
Manufacturer: Tensility International Corp
Description: CBL 7POS MALE TO WIRE 6'
Part Number: 10-00529
DigiKey PN: 839-1080-ND
https://www.digikey.com/en/products/detail/tensility-international-corp/10-00529/2625301
https://tensility.com/cable-assemblies/10-00529
Note: Pinouts in their spec sheet don't follow DIN ordering, afaict.
OBSOLETE
Has seven pins.
Eight wires, two black.
2023-03-27 14:37:59 -06:00
```
2023-03-27 12:39:40 -06:00
2023-03-27 14:37:59 -06:00
```
Pin Color Use Arduino UNO Pin
--- ----- --- ---------------
1 Brown Left D4
2 Yellow 5V 5V
3 Black 1 Right D7
4 Blue Down D2
5 Red Up D8
6 Green GND GND
7 Orange Speed PWM
Edge Black 2
2023-03-27 12:39:40 -06:00
```
2023-03-14 10:39:25 -06:00
# Photos
![Photo of Bescor MP101 motorized pan head panel.](img/bescor-mp101-panel.jpg)
Photo of Bescor MP101 motorized pan head panel.
![Photo of Bescor MP101 motorized pan head batteries.](img/bescor-mp101-batteries.jpg)
Photo of Bescor MP101 motorized pan head battery compartment.
![Photo of Bescor MP101 motorized pan head degrees.](img/bescor-mp101-degrees.jpg)
Photo of Bescor MP101 motorized pan head rotation degrees readout.
![Photo of Bescor MP101 motorized pan head dc-6v-1a-input.](img/bescor-mp101-dc-6v-1a-input.jpg)
Photo of Bescor MP101 motorized pan head DC 6V 1A input.
![Photo of Bescor MP101 motorized pan head camera-mount.](img/bescor-mp101-camera-mount.jpg)
Photo of Bescor MP101 motorized pan head camera mount.
![Photo of Bescor MP101 motorized pan head tripod-mount.](img/bescor-mp101-tripod-mount.jpg)
Photo of Bescor MP101 motorized pan head tripod mount.
![Photo of Bescor MP101 motorized pan head remote-control.](img/bescor-mp101-remote-control.jpg)
Photo of Bescor MP101 motorized pan head remote control.
![Photo of Bescor MP101 motorized pan head cable-male.](img/bescor-mp101-cable-male.jpg)
Photo of Bescor MP101 motorized pan head male cable.
![Photo of Bescor MP101 motorized pan head cable-pins.](img/bescor-mp101-cable-pins.jpg)
Photo of Bescor MP101 motorized pan head cable pins.
2023-03-14 13:41:29 -06:00
# Misc
Notes.
* LattePanda3 docs say their Arduino Leonardo files are needed.
* The LattePanda3 Arduino Leonardo files are old.
* I can't get the LattePanda3 Arduino Leonardo files to work.
* The Arduino Leonardo files in Arduino 2.0.4 appear to work fine
with the LattePanda3 Leonardo. XXX
2023-03-25 17:53:48 -06:00
# See Also
2023-03-25 17:55:31 -06:00
Other MP101 projects:
2023-03-25 17:53:48 -06:00
* https://github.com/AndruePeters/bescor_mp101_controller
* https://github.com/kovlerm/smarthead
* https://github.com/sensslen/Cgf.CameraControl.PtzLancCamera
2023-03-25 17:55:31 -06:00
Pinout info:
* https://pinout.xyz
2023-03-25 17:53:48 -06:00
2023-03-13 19:41:33 -06:00
# Status
2023-03-26 09:44:27 -06:00
Minimally works with both an Arduino and a Raspberry Pi.
Moves in four directions on both.
Speed control under the Pi.
No interface or API or anything like that yet.
2023-03-13 19:41:33 -06:00
# Disclaimer
I'm a computer sysadmin, not a video or camera expert.
This is just to explore how to use a free toolchain.
# Copyright
2023-03-25 17:53:48 -06:00
Unofficial project, related to Bescor, Arduino, or Raspberry Pi.
Upstream sources under their respective copyrights.
License: CC By SA 4.0 International and/or GPLv3+ at your discretion.
*Copyright © 2023, Jeff Moe.*