Show Posts
Pages: [1] 2
1  Using Arduino / General Electronics / Re: Control DC motor with transistor 2N3055, pwm from Arduino on: December 22, 2012, 11:51:51 am
It's the same thing I making. Same exact circuit, but I didn't post the photo with relay.. it uses a relay to swith positive and negative wires from the motor and change direction.
2  Using Arduino / General Electronics / Re: Control DC motor with transistor 2N3055, pwm from Arduino on: December 21, 2012, 10:42:11 am
I purchased 4x  IRL3103 and other IRF mosfets.
Irl3103 has only 12 mOhms Rds
I'll let you know how it goes.
3  Using Arduino / General Electronics / Re: Control DC motor with transistor 2N3055, pwm from Arduino on: December 21, 2012, 08:20:02 am
Is a IRLZ44N mosfet a good solution? It's the best I found from a seller near by.
Rds is 0.022 ohm
Ids is 47A

What about the IRF series? Are they ok for driving a motor from 5V pwm? Some people say the only difference is the voltage applied on the gate.. 5V with IRL, 10V with IRF. Is that correct or is there a more substantial difference?

Let me know so I can purchase it.
4  Using Arduino / General Electronics / Re: Control DC motor with transistor 2N3055, pwm from Arduino on: December 17, 2012, 04:00:53 pm
Isn't power= intesity x intesity x resistance?
So 10x10x0.077= 7.70W

I measured again. The motors actually need from 2.5 to 7.6 A each (peak is about 9A)
This means 4.44W with 7.6A and 0.077ohms
Is it too much? A normal heatsink with a pc fan (60mm x60) shuold work to keep the temperature to resonable levels...
5  Using Arduino / General Electronics / Re: Control DC motor with transistor 2N3055, pwm from Arduino on: December 17, 2012, 01:47:27 pm
The PWM frequency is the one normally generated by an arduino mega, I prefer not to change it because I'm using several other devices with it. It is also going to communicate through serial usb with a computer. I know that changing the pwm frequency changes the clock frequency of the arduino.
Otherwise if changing it isn't a problem, what would be the best pwm frequency?

I'm a bit confused on wich mosfet to use... It has to be a IRL series with very low Rds(on)... Correct?
The problem is that a IRLU8726PBF is not so easy to buy online. (I live in italy), IRL540 is more common, also on ebay..
6  Using Arduino / General Electronics / Re: Control DC motor with transistor 2N3055, pwm from Arduino on: December 17, 2012, 11:59:39 am
Ok. So if I just swap the 3055 with the Mosfet it should work... Is the circuit in the drawing correct? Do I need a resistor (1K?) from the arduino to the mosfet?
The mosfet only needs a small heatsink, with a fan?
If this is the final solution I just need to order a couple of IRL540.

Thanks for the help!!
7  Using Arduino / General Electronics / Control DC motor with transistor 2N3055, pwm from Arduino on: December 15, 2012, 06:53:05 am
I need to control the speed of a  dc motor (0.5 A no load, to 10 A full load). In the picture you can see that I'm using a 2n2222 that controls a TIP3055 (or a 2N3055). The circuit works but I'm not sure that is perfectly ok... Can you check it out?
I don't know if I need the two green resistors (with question marks), I didn't use them in the test but I saw that some people use them. What should be the values?
Also: what is the functionality of the 1N4007 diode next to the motor? And do I need to put another diode from the collector to the emitter of the 3055?
8  Using Arduino / Project Guidance / Re: Cable for submarine robot on: October 04, 2012, 04:05:56 pm
I bought a logitech c170, non hd. It works without problems with the cable we have.
I can send serial to arduino mega while The webcam is working.

I think the topic is resolved.

If you like you can follow the project on twitter ( I'm sorry it is written in italian.

Thanks to everyone!
9  Using Arduino / Project Guidance / Re: Cable for submarine robot on: September 24, 2012, 08:58:39 am
Ip cameras cost a lot. Probably it is better to have a normal web cam for driving and in the fututre we'll buy something for recording in hq. Like go pro cameras.
10  Using Arduino / Project Guidance / Re: Blink on: September 23, 2012, 04:57:00 pm
Last character is wrong and after


There's ";" not ":"
11  Using Arduino / Project Guidance / Re: Cable for submarine robot on: September 23, 2012, 04:30:55 pm

I'm going to use one of these, it can reach 60-70 meters using an ethernet cable, max speed 12mbs -usb1.1. Already test it, and it works. You can find better ones that reach 100 meters but they are pricy. 60 meters is fine to start with.
Connection will be: pc----->usb ethernet converter----->60-70meters of cat5 cable----->ethernet to usb converter----->usb hub----->hd webcam(port1). /  arduino mega(port2)

Does anybody knows if A 12mbs usb connection supports an HD 720p webcam??
The problem is that the computer will comunicate with the arduino, using serial comunication, on the same cable of the webcam. I'm not shore that 12mbs is enough for both. Any body knows how many mbs takes an hd webcam? Otherwise I can always use a normal webcam.

This is a drawing of the electronic connections inside th rov + some photos of the electronics box already finished.

The electronic box works at 12 Vdc. It contains:
Arduino mega
Relays for outside Leds
Relays for internal strip Leds (just for fun)
Relays for 2 motors direction (fw-left/bw-left+ fw-right/bw-right)
Tip31c transistors for motors speed
5v voltage regulator (for steppers)
Plus 2 smal pc fans for cooling the transistors and the volt reg


We've bought 2 RE-540/1 dc motor ( and propellers (different sizes to test, from 35mm to 50mm).
These will move the Rov underwater. One on the left and one on the right side, so you can go forward, backward, and 360 degres turning by giving opposite directions.
Behind the motors there are rudders (controlled by stepper motors) for going up and down.

The dc motor will stay in the water, because normal brush motor(and some brushless) can go undervater with no problem. The trick is to spray it with products like CRC Marine 6-66 or WD40.
Tests seem to confirm. I've only tried with unsalted water.
12  Using Arduino / Project Guidance / Re: Cable for submarine robot on: August 20, 2012, 12:34:33 pm
I just want the cable as long as possible, and I think 100 meters is plenty. That doesn't mean I want to go at 100 meters deep. I'm going to use it (after all the tests) in a lake and it means that 100 meters is the distance between the pc and the robot. I still don't know what the maximum depth will be.

I'm not working on it at the moment, I'll post more info as soon as I get back to work.

Thanks for all the advices and help!!!
13  Using Arduino / Project Guidance / Re: Cable for submarine robot on: August 10, 2012, 10:01:47 am
I just saw the video of the OpenROV that MichaelMeissner linked (thank you!), it's a very interesting project. They obviously use battery to supply power to the ROV, I think I'll be better using rechargeable batteries too. Just need to be shure they supply enough current for the motor I'm using and all the other electronics.
For the communication they use a Ethernet to Single Twisted Pair Adapter. Wouldn't that be better? It looks more simple.
I connect the Arduino and the web cam to a router and the go trough the single twisted pair adapter.

To cr0sh: Thanks for the advices. We already went trough those problems and we still need to choose the motor for the Rov. (We where thinking to get this:, it has 3500rpm max without load, 10Ncm torque. It can't go faster than 3000rpm because of the oil-seil we have.)
An ethernet cable isn't actually the best thing for a ROV, but if I use the adapter I'd just have 2 wires...

14  Using Arduino / Interfacing w/ Software on the Computer / Re: Sending different informations to arduino with serial monitor. on: August 08, 2012, 11:22:11 am
This is what I have now:
There are two pushButton with an red LED each connected to the first arduino. When I press them the arduino serial.prints a message to the serial pins 1 and 0. The message is received from the second arduino that decides how to move the stepper motor, if I press forward the motor goes forward for 5 steps, If I press reverse the motor reverses 5 steps.

Video here

Code for the Arduino n° 1 with L293D Motor shield and Stepper:
Invio di comandi tramite serial monitor
trovato su web + modifiche
Giacomo Marelli

Controlla uno stepper.
Scrivere nel serial Monitor: "<stepper,+>" o "<stepper,->".
Ogni comando sposta di 5 passi (9°) in avanti (+) o indietro(-).

//inserisce le due libreri necessarie,
//la prima per comunicare, la seconda per lo stepper
#include <avr/pgmspace.h>
#include <AFMotor.h>

//variabili per comunicazione seriale

#define SOP '<'
#define EOP '>'

bool started = false;
bool ended = false;

char inData[80];
byte index;

// Connect a stepper motor with 53 steps per revolution
// to motor port #2 (M3 and M4)
AF_Stepper motor(53, 2);

void setup() {
  motor.setSpeed(300);  // 50 rpm   

void loop() {
  // Read all serial data available, as fast as possible
  while (Serial.available() > 0) {
    char inChar =;

    if (inChar == SOP) {
       index = 0;
       inData[index] = '\0';
       started = true;
       ended = false;
    } else if (inChar == EOP) {
       ended = true;
    } else {
      if (index < 79) {
        inData[index] = inChar;
        inData[index] = '\0';

  // We are here either because all pending serial
  // data has been read OR because an end of
  // packet marker arrived. Which is it?
  if (started && ended) {
    // The end of packet marker arrived. Process the packet
    char *cmd = strtok(inData, ",");

    if (cmd) {
       char *val = strtok(NULL, ",");
       if (val) {
          sendCommand(cmd, val);

    // Reset for the next packet
    started = false;
    ended = false;
    index = 0;
    inData[index] = '\0';

// controllo dello stepper
// usare linguaggio specifico del motorshield di ADaFRUIT
void sendCommand(char *command, char *value) {
  if (strcmp(command,"stepper") == 0) {

void stepper(char *value) {
  if (strcmp(value, "+") == 0) {
      motor.step(5, FORWARD, MICROSTEP);
   else if (strcmp(value, "-") == 0) {
      motor.step(5, BACKWARD, MICROSTEP);

And this is the code for Arduino n° 2, with 2 pushButtons.

Giacomo Marelli

sketch per arduino di comando
invia tramite seriale il comando "<stepper,+>" o "<stepper,->"
il secondo arduino riceve i comandi e li esegue
muovendo il motore stepper

int ledForw = 6;
int ledRev = 19;

int buttonForw = 4;
int buttonRev = 5;

int time = 200;

void setup()
  pinMode( ledForw, OUTPUT);
  pinMode( ledRev, OUTPUT);
  pinMode( buttonForw, INPUT);
  pinMode( buttonRev, INPUT);
  Serial.print("<stepper,+>"); // tests the stepper

void loop()
  if (digitalRead(buttonForw) == HIGH)
    digitalWrite(ledForw, HIGH);
  else (digitalRead(buttonForw) == LOW);
    digitalWrite(ledForw, LOW);
    if (digitalRead(buttonRev) == HIGH)
    digitalWrite(ledRev, HIGH);
  else (digitalRead(buttonRev) == LOW);
    digitalWrite(ledRev, LOW);
15  Using Arduino / Project Guidance / Re: Cable for submarine robot on: August 08, 2012, 10:01:40 am
Thanks for the answers, I think I  will try the usb to ethernet converter and buy two ethernet cables on ebay (100 meters long each). One for the usb and one for power and serial.
If it works I'll tell you,but I think it won't be before september-october.

To gr0p3r & surferTim: I haven't got any pictures yet, I'm running the project with four friends of mine and one of them is sorting out the mecanical point of view. The structure will be a steel tube (170 mm diam, 480 mm long), motor and propeller at the back and web cam at the front. No static immersion, only dynamic through propeller job. Another friend an I are doing the electronic part.
It will go in lake Como (italy).

To Riva: how do I chose to use a RS422? When I connect two arduino with pin 1, pin0 and ground is it using RS232? I'm not really practical of these things..

Thank you!

Pages: [1] 2