Anti-Missile Defense System Prototype help

Status
Not open for further replies.

EEngineer

New Member
Hey guys, I am designing a prototype of an anti-missile defense system and I need some help with:

1. the pan/tilt setup to control a laser pointer that I will be mounting on the 2 stepper motors
2. some potential improvements to the project. Let's start:

Components:

1. Play station 3 EYE Camera

PlayStation Eye - Wikipedia, the free encyclopedia

(purchased, drivers installed, working on openCV, code is nearly done; the object is detected and a red circle is placed around it, *remaining part is the object estimation and then sending the coordinates serially through COM1 port to the microcontroller)

2. Computer (to perform the image processing that will detect the object)

3. RS-232 to RS-485 converter + adapter (input to the ORIENTAL driver is RS-485)

4. Renesas M16C62P micro-controller

5. 2 x ORIENTAL MOTORS: Stepper Motors + drivers

Item # CRK546PMRKP, Microstep System with Built-in Controller (24 VDC) on Oriental Motor U.S.A. Corp.

(1 is already shipped, tested and working; the other one still on the way)

6. *Pending: Pan/Tilt setup to mount the 2 motors

7. *Some sort of scalable laser pointing (scalable since my system won’t be precise and chances are I can never get the laser pointer to be on the moving object the whole time, so I would need a scalable one so that I can measure the error)


Items marked with an asterisk are my current challenges. Let me explained my project briefly, so you can get an idea of what I am doing and I can get some quality feedback 

Detection System

I implemented a single object detection code on my computer using openCV and the play station EYE. The outcome is decent, but is still not complete, I am getting the current coordinates but I need a way to estimate the motion of the object so I can output the future coordinates to the micro controller so that can ultimately send it to the driver and move the steppers.

*Challenges:

1. to find future position

2. to send the future position serially

3. Interfacing problems (future position comes from the PC serially through COM1 to the micro controller, problem is connecting the micro controller to the driver/motor since I am inputting through RS-485)

Tracking System

I tested the stepper motor and driver and they seem to fulfill the speed requirements of this real time system. They are controlled through hypertext terminal with a language that is easy to comprehend. You can set the acceleration time, deceleration time, starting velocity and running velocity. You have an encoder to tell you your position, set a home position or return to a home position. These are just some of the features of this stepper.

Sample Code:
-------------------------------------------
CRD5xx-KP CRK Series Built-in Controller
Software Version: A378 V.1.03
Copyright 2009-2010
ORIENTAL MOTOR U.S.A. CORP.
-------------------------------------------
>ta
TA=0.500
>ta=0.025
TA=0.025
>VR = 10000
VR=10000
>VS = 10000
VS=10000
>td = 0.025
TD=0.025
>mcp

After running this code on Hypertext terminal, the motor seems to be pretty fast. Good. Next.

*Challenges:

1. Setting up a pan/tilt with 2 of these steppers

2. Again interfacing problems with the micro controller

Your input is greatly appreciated
Thanks in advance.
 
Please find my openCV code attached as well as some pictures of the stepper, driver and a screen shot of the code output.
 

Attachments

  • 1.JPG
    57.5 KB · Views: 214
  • 2.JPG
    65.3 KB · Views: 177
  • Code Test.JPG
    27.5 KB · Views: 184
  • Code.txt
    4.9 KB · Views: 268
Last edited:
quick question, whats the best way to mount this laser on the stepper motor
 

Attachments

  • Laser + Stepper problem.JPG
    51.6 KB · Views: 173
quick question, whats the best way to mount this laser on the stepper motor

duct-tape!

...but seriously i don't know. i think that it's pretty normal let the laser just sit where it is and use mirrors mounted on motors to deflect the beam.
at least that's what i did, but it was a pretty low-power laser, not really suited to missile defense.
'optical mirrors', with the silver on top of the glass rather than behind, are preferred because normal mirrors split the beam.
 
I can't really help here. All I know is that I don't want to be the guy testing this and then realise that it doesn't work...
 
Well were using a laser pointer for testing purposes and error calculation etc.
Good news is the 1m, single-axis demo worked today

Calculations:
(Ball is 1meter away from tracking system)

From the camera calibration:
Actual distance camera can view on the board: 120cm (640 pixels)
Therefore, 1 pixel = 0.1875cm on board

From the motor calibration:
1 step = 0.59cm on board

Therefore, 1 pixel = 0.31 steps

using this piece of information, the system worked perfectly with 8/10 tries.

Now I am thinking of putting all the processing on the microprocessor, and eliminating the computer. This required 2 things:

  • Connecting the camera to the microprocessor

I tried finding the data sheet of the PS3 eye but all I got was a dead Japanese link. I did find a lot of links explaining how to strip down the assembly of the camera and something to do with VSYNC, but nothing to do with converting the USB to UART (which is what is required in my case)

  • Shifting the image processing using the openCV library to the microprocessor

I dont think this will be a relatively hard task
 

Attachments

  • Photo 9.jpg
    66.2 KB · Views: 144
  • Photo 12.jpg
    83.3 KB · Views: 159
well not at the moment, the challenge right now is eliminate the PC. Realized the microprocessor I have will not do the job as our code is in C++ in-addition to an external library whilst the microprocessor can only be programmed in C. Not only that, but the 1MB memory it has is not enough for the throughput of the PS3 and image processing requirements.
Did the following calculations:

PS3 EYE camera requires the following memory for processing:

640x480 = 307,200 pixels, which means (1 frame --> 307,200 pixels)

@60fps: 307,200 x 60 = 18,432,000 pixels per 1 second.
@120fps: 307,200 x 120 = 36,864,000 pixels per 1 second

Since 1 pixel = 2 bytes;

@60fps: 36.864 MB per second
@120fps: 73.720 MB per second

In our image processing program, the code constantly works on 6 images at a time, before releasing them which means multiply the above numbers by 6. :S

Ive done some research and it appears that beagleboard is the commonly used development board for image processing in robots. Still need to dig deeper, can it be programmed using C++?
 
anyone know whats the best way to do the pan/tilt module with these steppers? I cant find anything online

stepper motor drivers can be used in your case, what you need is to provide a signal to tell the direction, and series of pulses to tell how many step move is required. you will have to have a program to translate your coordinate in to pulse train for vertical and horizontal motors, marking its direction.

i think there can be few ways to do it, send the train of pulse & check the error at last, or send preset few pulses in one decided direction and keep on checking the error for next pulse.

you better check few interface techniques if available on net. sorry if what i posted is far from your requirement.
 

ok, i think you can pull some old tilt assembly from a security camera or better you can combine two 1d actuators by mounting one on another.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…