Mini Turret Project Continues

Ok, cool! The new forum is up and I can post my updates here!

So, I finally got some missing parts, and now it looks more like a completed turret. So, to save some time, here is the link to the project page:

Hope you like how it looks. I will write up a simple demo program to show it slewing soon.

Looks solid!

So, what are you going to attach to the business end? Laser? BBGun? Flamethrower?

Looking cool!!! Only thing I would have done different, is the way the tilt works. I would have used some bearings to hold it, and then with the servo on the back instead, so the bearings would hold the load, and the servo only doing the tilting.

Going to make this on a bigger scale some day, when some of all my current projects are done. :slight_smile: Want it to be strong enough to hold a real video camera with optical zoom and auto focus and all, and then make it remote controllable. Maybe even with a little pc on, so it can be put up somewhere, with a USB modem on, and then have a wireless 3G internet connection to it, both streaming audio and video back, plus allowing for pan/tilt.

Here is the assembled turret with a short demo to test the range of motion.

Mr_Manny: Here is the assembled turret with a short demo to test the range of motion.

Why not have it so middle position is horisontal?

Ok, I get what you mean, but for me, it is horizontal. The sensors are horizontal at the 90deg position.

Maybe even with a little pc on

You should check out the Vivotek VS3100 series video servers as an alternative to PCs. They’re cheap, reliable, and compact: you can put one right up on the pole with a camera to simplify cabling. The one big drawback is that they depend on an Activexploit plug-in for viewing, so there’s no Linux support :0

I really wanted to use a Linux-based server on a couple of the projects I’ve worked on recently, but the open-source video codecs just can’t get the same level of compression as the commercial ones, so we had to drop the idea to stay within our bandwidth limits :frowning:

So, I haven't made my other 2 sensors yet, so I thought about what I could do in the mean time. Here is a simple little program for a single servo and a single IR sensor. The servo sweeps to predetermined points, reads the values, and then calculates which direction gave the strongest reading (lowest number to Arduino) and then slews to that point for a few seconds. Then starts over. I figure this can be modified to use as a range finder, or something similar. You will just have to change it to suit your needs. You can open up the serial monitor to see the values populating.


/******************************************************* Simple little program to sweep and scan with a single sensor by Mr_Manny

  • define connections * *******************************************************/

Servo myservo; // create servo object to control a servo int Sensorpin= 0; // IR sensor pin int Servopin = 11; // servo pin

/******************************************************* * define variables * *******************************************************/

int scanPos[] = {0, 30, 60, 90, 120, 150, 180}; // Rotation for scans int scanVal[7]; int i = 0; int M = 0; int newVal = 0; int Low = 1024; //1023 is the darkest value int Pos = 0; /******************************************************* * set up section * *******************************************************/

void setup() { Serial.begin(9600); // start serial communication myservo.attach(Servopin); // servo pin myservo.write(90); // initial start position delay(2000); }

/******************************************************** * start loop * ********************************************************/

void loop()

{ //******************************************************* while (i < 7 )

{ myservo.write(scanPos*);* * delay(500);* * newVal = analogRead(Sensorpin);* _ scanVal*= analogRead(Sensorpin);_ **Serial.print("Servo Pos=");Serial.print(scanPos_);Serial.print(" Value=");Serial.println(scanVal); i++; } //*************************************************** { for (int M=0; M<7; M++) // For IR Sensors 1023 is dark*_ * { // so I need the LOWEST value* * if (scanVal[M] < Low)* * {* * Low = scanVal[M];* * Pos = M;* * }* * }* * }* _//************************************************** { delay(2000);* **Serial.print("Final Pos= ");Serial.println(Pos); * myservo.write(scanPos[Pos]); // Now I write the final position* * delay(5000); } //*************************************************** { i = 0; // This is how I reset the loop* * Low = 1024; }* //**************************************************** } [/quote]*_