Pages: [1]   Go Down
Author Topic: Arduino controlled ROV  (Read 1983 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey all
Im currently building a rov and am considering using a arduino to control it. I was considering the Uno since this is the only 1 available here smiley
but since im new to all this i still have some questions

1.Can a arduino Uno control 4 brushless esc's + motors and 4 relays at once? (motors and relays have to all be separatly controllable). Does the uno have enough channels/outputs to control all these functions at once. Would there still be ports open to control more functions?

2.Would i need some kind of shield to run the esc's and motors or can they be connected directly to the Uno?

3.Could i control the motors via a joystick connected to pc with usb(for variable speed)

4.Probably a stupid Q but the arduino cant be used when not plugged into a pc right? smiley

If someone could help me here i would really appreciate it
Thanks
Philipp

Sorry if some of the questions are stupid, im still new to all this smiley
« Last Edit: December 18, 2010, 10:48:58 am by SKY » Logged

Hyderabad , India
Offline Offline
God Member
*****
Karma: 6
Posts: 621
can't help not to think arduinaizing something !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
.Can a arduino Uno control 4 brushless esc's + motors and 4 relays at once? (motors and relays have to all be separatly controllable). Does the uno have enough channels/outputs to control all these functions at once. Would there still be ports open to control more functions?
YES ARDUINO MAKES IT POSSIBLE  smiley-grin
Quote
Would i need some kind of shield to run the esc's and motors or can they be connected directly to the Uno?
well the ESc's wont need a sheild
But the motors need one ( consider building one your self )
Quote
3.Could i control the motors via a joystick connected to pc with usb(for variable speed)
YES
Quote
4.Probably a stupid Q but the arduino cant be used when not plugged into a pc right?
YES

HOpe this helps smiley-wink
Logged

UK
Offline Offline
Faraday Member
**
Karma: 17
Posts: 2884
Gorm deficient
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Motor speed and direction  for all four motors?

Of course you can use an Arduino when it isn't conneccted to a PC - there wouldn't be much point in it if you couldn't!
« Last Edit: December 18, 2010, 10:54:53 am by GrooveFlotilla » Logged

Per Arduino ad Astra

0
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the replies  smiley
 
The esc arent reversible so the motors would only have to be controlled in 1 direction.

when the arduino is connected to the pc can it recieve instructions from the pc though like pressing keyboard button turns on motor connected to the arduino ect?

Would the coding for something like this be hard to create (I already know loops and some other basics)
Thanks Philipp

Logged

UK
Offline Offline
Faraday Member
**
Karma: 17
Posts: 2884
Gorm deficient
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can talk to the Arduino directly using a terminal emulator, or the IDE's serial monitor, or you could create an app in Processing, or VB or...
Logged

Per Arduino ad Astra

0
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So i can either control the arduino via the pc fuctions such as mouse,joystick and keyboard when its plugged into the pc (im guessing this is the better option if the system doesnt have to be portable and has lots of motors, relays that have to be controlled)??? :-?
If it is coded to recieve input from the pc i cant use it without 1 unless i modify the program right?

or download the program and use it on the go. and In this case how do you control it (just switches ect?) or is the on the go more for autonomous projects such as robots, bots ect that mainly control themselves with sensors ect?
Thanks
Philipp
« Last Edit: December 18, 2010, 12:29:10 pm by SKY » Logged

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9470
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just some general comments:

Use the board search function at the top of the page and search for ROV. You will probably get a half day's reading with some project links.

ESCs are usually controlled via the same PPM control that servos use, so the servo library probably can be used. Note that the ESC may need to be armed for it to work, and an external power source wil be needed.

Relays can be controlled via the digital I/O pins. Note that relays can't generally be powered from the arduino.

There are different ways to interface with an arduino, including applications on a pc, and via a web page when an ethernet shield is used.

Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

0
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks
Ive already seen schematics for the relays. So i will need 1 digital pin per relay
and to control the esc will be 1 analog pin for the pwm and the other 2 esc cables will go to the power supply (directly to battery or psu)
Is that correct?
And it is possible to make a pc gui via which you can control the arduino is that correct?
Sorry for all these questions smiley
Thanks

Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey
i was hoping someone could help me with this:
What is the maximum amount of servos/esc i can control individually with a arduino duemilanove

*Btw should i rather get the duelianove or the mega (need to control 4 esc's and 4 relays )
Thanks for the help
Philipp
« Last Edit: December 19, 2010, 04:01:46 am by SKY » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48569
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What is the maximum amount of servos/esc i can control individually with a arduino duemilanove
The answer is either 2 or one per pin, depending on what else the Arduino is doing.

If the Arduino is doing things that require disabling interrupts for periods of time (no matter how small), the Servo2 library needs to be used. It does not use hardware capabilities to do the pulsing, but it can only manage two pins.

If the Arduino is not doing things that disable interrupts, the Servo library can be used. The Servo library does use hardware capabilities, and, as a result, can drive a servo on each pin.

NewSoftSerial does disable interrupts, so if you are using it, you are limited to two servos, on the Duemilanove and similar one hardware serial port models.

Because the Mega has 4 hardware serial ports, NewSoftSerial is generally not needed on the Mega, so it can control lots of servos.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the Info PaulS smiley

So just to be sure before i buy 1
to control 4 brushless esc's withs motors and so that each one can be individually varied from stop to full throttle
and to power 5 relays (on/off)
the duemilanove will be enough or would i have to get the mega?

Thanks for all the help so far, sorry if half my questions seem stupid lol :smiley

Philipp
« Last Edit: December 19, 2010, 10:16:55 am by SKY » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48569
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, the Duemilanove, or Uno, would be enough. You need 4 pins for the servo/ESCs and 4 pins for the relays. You have more than enough.

However, doing something with those servos and relays, when the PC is not providing instructions, may require other sensors that will also require pins.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks so much man smiley
Im planning to have it connected to the pc and then use a joystick or gamepad as inputs so that
all the instructions and inputs would be sent over the usb cable so no pins are neccesary for input then?
This should work right? or do the inputs have to be connected directly to the arduino

Thanks for all the help smiley
Philipp
« Last Edit: December 19, 2010, 11:05:43 am by SKY » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48569
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You won't be able to read the joystick position from the Arduino, unless the joystick is connected to the Arduino.

But, you can have an application that runs on the PC that the joystick is connected to that sends serial data to the Arduino, whenever a change in the position of the joystick occurs.

This will not be as fast as connecting the joystick to the Arduino, but it can work. Minimizing the amount of data sent is essential, as is clearly defining the boundaries and intentions of a packet.

The serial data can consist of the joystick value as a string (<U:1020>) that the Arduino needs to parse and convert to an integer that it then converts to a servo angle, or as a string <U:120> that the Arduino needs to parse and convert to an integer that IS the servo angle, or as a byte <U:xxx> that needs only to be parsed, and already IS a servo angle.

Each method has advantages and disadvantages. The raw joystick value means that the meaning of that data is entirely in the Arduino code. The servo position as a string is easy to process and verify on both ends, but it means that the PC is doing most of the work. The servo position as a byte is the quickest to transmit, but the hardest to debug.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks

That was a very helpful post smiley
So to use the joystick I would have to use a program to "bridge" the arduino and the joystick signals. What program could i use for this

Thanks
Philipp
« Last Edit: December 19, 2010, 12:58:08 pm by SKY » Logged

Pages: [1]   Go Up
Jump to: