Self-made camera cloud platform and direct control through computer LPT parallel port (1)

Source: Internet
Author: User
Document directory
  • LPT parallel pin definition:
  • USB pin definition:

Recently, I was wondering, can I use the two steering gear replaced by the RC model and the common camera to remotely control the Webcam of the cloud platform to monitor pets in my house and avoid damages? This article is obtained.

Concept:

Use the cloud platform to rotate the left and right sides, up and down two latitudes to drive the camera orientation mounted on the cloud platform, and use TCP to establish a remote control page to control the cloud platform, and receives real-time data from the camera.

Cloud Platform DRIVER:

You can use the stepper motor or the steering gear used on the RC model to drive the cloud platform. Why not use a general motor? 1. You can't control the rotation speed. 2. You can't know where the current motor is. 3. You certainly don't want the data cable on the camera to be wound down by the motor and end up freezing. Due to material problems, I use the steering gear as the driving device.

Steering Gear information:

The steering gear has three pins, the middle is the signal line, and the two sides are the power supply. The steering gear is 0 ~ according to the signal pulse length of the signal line ~ 180 degrees of fixed point rotation. To control the left and right sides, the upper and lower latitudes, two Steering gears are required. The signal of the steering gear is very simple. The signal period is 20 ms, and there is a short high-level time in each cycle, that is, the pulse. The pulse length is usually ms ~ 2.5 ms. According to the pulse length, the steering gear's pointing angle has the following correspondence:

Pulse length: Steering Gear Angle

0.5 ms: 0 degrees
1.0 ms: 45 degrees
1.5 ms: 90 degrees
2.0 MS: 135 degrees
2.5 ms: 180 degrees

Of course, the steering gear can point to more than five angles, pointing to the angle with the pulse length linear change, a good steering gear can have 1024 levels, accurate to 0.17 degrees.

Use a computer to control the steering gear:

The computer does not have a special interface to control the steering gear, but a large number of desktops have 25-pin LPT printing parallel ports, eight of which can be programmed to control whether the data ports are high or low, the regular high/low level conversion constitutes a pulse signal, which can be directly output to the steering gear if properly controlled.

LPT parallel pin definition:

D0 ~ D7: data interface. The parallel port transmits one byte at a time. When the parallel port sends 0x00, the eight data ports are all low and 0xff is all high, 0x01 only D0 is high and the rest is low. The signal line of the steering gear is received here.

G0 ~ G7: Ground Wire. Any one is available.

Steering Gear driver power supply:

The steering gear on the RC model usually uses the driving voltage of 4.8-6 V. The LPT parallel port can output the 5 V voltage, but the current is too small, about 10 mA, and cannot drive the steering gear. USB can provide 5 V 500 mA power supply, can meet the general small torque steering gear, if not at ease can also be separately external transformer or battery.

USB pin definition:

1 and 4 feet are the power supplies we need.

Part 2 Preview

Server:

Remote control terminal:

Note: the control software has been completed and passed the test. Due to the large amount of design content in this article, we will continue writing the software tomorrow and add the physical images and core source code.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.