KR2 ROV
- KR2_Diving
- Posts: 391
- Joined: Aug 30th, 2012, 11:43 am
- Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin
Re: KR2 ROV
After the initial start, things have slowed down in my progress. Have dived into the deep end of studying each component at length trying to make heads or tails of each part.
I had a bit of time today, so I threw together a rough layout of the components I plan on using. After looking at it, I realize that it may look like a serial killer was paging through a few catalogues cutting out parts at random, and glueing them to the page. But I find diagrams such as this help to show the big picture, and may highlight things I had not previously thought of.
IN my case, I hadn't even considered what I would use to power my land based components... Oops!
Anyway, have a look! Let me know if you spot anything critical I may have missed! If I get time, I may clean this up a bit...
I had a bit of time today, so I threw together a rough layout of the components I plan on using. After looking at it, I realize that it may look like a serial killer was paging through a few catalogues cutting out parts at random, and glueing them to the page. But I find diagrams such as this help to show the big picture, and may highlight things I had not previously thought of.
IN my case, I hadn't even considered what I would use to power my land based components... Oops!
Anyway, have a look! Let me know if you spot anything critical I may have missed! If I get time, I may clean this up a bit...
- Attachments
-
- layout.jpg (442.08 KiB) Viewed 11230 times
- electronicscrazy
- Posts: 45
- Joined: Feb 10th, 2012, 7:39 pm
- Location: United Kingdom
Re: KR2 ROV
Wouldn't it be easier to use an onboard camera selector (hooked up to your arduino), and just run one cat5e pair to the surface?
- KR2_Diving
- Posts: 391
- Joined: Aug 30th, 2012, 11:43 am
- Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin
Re: KR2 ROV
probably, but at one point I was considering having a home security style receiver that could record multiple feeds at once, and that would need to be at the surface.
Also, I have not really found a reliable enough video switch that is compact enough to mount in my sub.
I'm open to suggestions!
Also, I have not really found a reliable enough video switch that is compact enough to mount in my sub.
I'm open to suggestions!
- KR2_Diving
- Posts: 391
- Joined: Aug 30th, 2012, 11:43 am
- Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin
Re: KR2 ROV
I've hit a bit of a snag recently.
I finally got my second batch of parts from HobbyKing over the weekend and started to do some testing. Now that I have more then one motor, I was hoping to simulate some vectored thrust.
This is where I hit the wall... How can I convert my analog input from the PS2 Joystick, to servo control signals?
The analog in has 2 chunks of data, X axis position and Y axis position. (Both on a scale of 0 - 255). Neutral position (center of joystick) is at 123, 123.
The confusing part is how to I convert this data into an analog output (20 - 180) to control my servo? In other words, how do I get the direction I am pushing the joy stick to correspond with the direction of travel of the ROV?
I have created some tables and diagrams to help understand the principles, but to get full analog control... I am struggling...
Any suggestions would be appreciated.
I finally got my second batch of parts from HobbyKing over the weekend and started to do some testing. Now that I have more then one motor, I was hoping to simulate some vectored thrust.
This is where I hit the wall... How can I convert my analog input from the PS2 Joystick, to servo control signals?
The analog in has 2 chunks of data, X axis position and Y axis position. (Both on a scale of 0 - 255). Neutral position (center of joystick) is at 123, 123.
The confusing part is how to I convert this data into an analog output (20 - 180) to control my servo? In other words, how do I get the direction I am pushing the joy stick to correspond with the direction of travel of the ROV?
I have created some tables and diagrams to help understand the principles, but to get full analog control... I am struggling...
Any suggestions would be appreciated.
- Attachments
-
- Servo Library Description.
- thrust5.jpg (44.48 KiB) Viewed 11181 times
-
- PS2 Controller Data output format.
- thrust4.jpg (47.63 KiB) Viewed 11181 times
-
- Motor Rotation Chart.
- thrust3.jpg (50.42 KiB) Viewed 11181 times
-
- Vectored Thrust - Motor Rotation directions
- thrust2.jpg (193.69 KiB) Viewed 11181 times
-
- Vectored Thrust - Motor Thrust Directions
- thrust1.jpg (213.41 KiB) Viewed 11181 times
Re: KR2 ROV
I was under the impression that the servo library did that for you???
- KR2_Diving
- Posts: 391
- Joined: Aug 30th, 2012, 11:43 am
- Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin
Re: KR2 ROV
Kinda, but it does not take "Vectored Thrust" into account. The servo library gives me the ability to feed a number from 0 to 180 to the ESC to control the speed of each motor. What I need is the ability to determine what speed each motor needs (relitive to each other) to accomplish the direction of thrust I am commanding (via the joystick).DavidF wrote:I was under the impression that the servo library did that for you???
If I had a basic 3 thruster set up, the servo library would be perfect! However, I had to go and make things hard on myself... I need to control 4 thrusters, mounted at an angle, by one joystick...
- KR2_Diving
- Posts: 391
- Joined: Aug 30th, 2012, 11:43 am
- Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin
Re: KR2 ROV
Had a bit of an Eureka! moment this week, and got my Vectored Thrust formulas figured out! Beginning to see some limitations to the PS2 controller... not sure if it is my set up, or the controller I have, but the resolution of joystick is not very high... Perhaps this is what I get for ordering a knock off PS2 controller...
Once I get a few more motors and other parts, I will post details. (want to test it in real life, not just code first!)
Ended up splitting the "range" of the joystick into 9 quadrants. Each quadrant has 2 or 3 zones inside of it. Depending on the position of the joystick in the virtual grid, a "zone" is output. (zone = 1 to 21)
That "zone" is then used in a case switch which has the correct motor directions programmed for each zone.
Bit confusing at the moment perhaps... but I plan on posting a short video once I have more details!
Once I get a few more motors and other parts, I will post details. (want to test it in real life, not just code first!)
Ended up splitting the "range" of the joystick into 9 quadrants. Each quadrant has 2 or 3 zones inside of it. Depending on the position of the joystick in the virtual grid, a "zone" is output. (zone = 1 to 21)
That "zone" is then used in a case switch which has the correct motor directions programmed for each zone.
Bit confusing at the moment perhaps... but I plan on posting a short video once I have more details!
Re: KR2 ROV
The esc is treated like a servo using the servo library. But I'm scraping the esc. its just to hard to get mapped correctly. I have been struggling with it since the begining and just when i get it running the way it should something changes and im back to tuning it.
I ordered one of these http://www.pololu.com/catalog/product/707 per one of our own derelicte and his pool rover. It works much better takes more Arduino pins but its worth it. Im ordering a http://www.pololu.com/catalog/product/706 to control the dive surface motor. they are really nice little boards. If you want or anyone else wants the code i can post it. I currently have camera control pan and tilt, thermistor temp sensor printing out to lcd, forward, reverse and turn on the drive motors, I have yet to figure out the serial communication between 2 Arduinos 1 topside 1 bottom side. so the code will have to be split up between the 2.
I ordered one of these http://www.pololu.com/catalog/product/707 per one of our own derelicte and his pool rover. It works much better takes more Arduino pins but its worth it. Im ordering a http://www.pololu.com/catalog/product/706 to control the dive surface motor. they are really nice little boards. If you want or anyone else wants the code i can post it. I currently have camera control pan and tilt, thermistor temp sensor printing out to lcd, forward, reverse and turn on the drive motors, I have yet to figure out the serial communication between 2 Arduinos 1 topside 1 bottom side. so the code will have to be split up between the 2.
- KR2_Diving
- Posts: 391
- Joined: Aug 30th, 2012, 11:43 am
- Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin
Re: KR2 ROV
Deakel wrote: ... I'm scraping the esc....
I really liked these parts too, but I have been pretty set on using the brushless motors, and unfortunately, these drivers are only for brushed DC motors.Deakel wrote: I ordered one of these http://www.pololu.com/catalog/product/707 per one of our own derelicte and his pool rover. It works much better takes more Arduino pins but its worth it. Im ordering a http://www.pololu.com/catalog/product/706 to control the dive surface motor.
I am however noticing some of the drawbacks to the cheaper ESC's that I am using. Perhaps someone can comment, but it seems that I don't have full analog control. IN other words, it seems I only have about 4 fwd and 3 rev speeds. It may be the resolution of the input device (PS2 Controller). I don't quite fully understand the world of ESC's yet to make an educated comment... If this is the case and there are only a few forward and a few reverse speeds, that is fine and I can happily work with it... but it would be good if I could clarify that...
Anywhoo... thanks for the continued comments Deakel and keep us posted!
Cheers,
Ryan
"KR2_Diving"
Re: KR2 ROV
There should be a full range of control with the ESC. Maybe just try some code without the ps2 controller and see what happens through the PWM range.
I am working on something very similar using the Xbox controller. Using servo appears to have full range of motion. I did notice this controller is wore out from kids play. But have adjusted the code to ignore slight movement around center stick position.
I have some car ESC coming will let you know what I find.
I am working on something very similar using the Xbox controller. Using servo appears to have full range of motion. I did notice this controller is wore out from kids play. But have adjusted the code to ignore slight movement around center stick position.
I have some car ESC coming will let you know what I find.