Show Posts
Pages: [1]
1  Using Arduino / Motors, Mechanics, and Power / Re: 12V motor control with H-Bridge speed issues, plz help on: May 12, 2012, 09:09:37 am
got it. thanks for your help guys!
2  Using Arduino / Motors, Mechanics, and Power / Re: 12V motor control with H-Bridge speed issues, plz help on: May 11, 2012, 08:23:16 pm
well that did it!

now would this application make better use of the switch() case function? that's probably what i'll be using anyway since I need to drive four of these motors...

and lastly, any thoughts on the output of the h-bridge? i'm still only getting 8.6v max. I'm using a 12v battery directly which has improved the smoothness and speed (slightly) of the motor. would I do better with a regulator in the circuit or do I have to increase beyond 12v supply?
3  Using Arduino / Motors, Mechanics, and Power / Re: 12V motor control with H-Bridge speed issues, plz help on: May 10, 2012, 08:47:50 pm
Supply: 12.23v idle
            12.02v motor fwd
            12.23v motor rev

Vreg Pin: 5.02v idle
        5.12v motor fwd
        5.02v motor rev

Arduino Vcc (i'm assuming the 5V pin?):
        4.93v idle
        4.96v motor fwd
        4.94v motor rev

One thing though, (i think I mentioned in one of my previous posts) if I cut the arduino out of the equation, tie SB and PWM to 5v, put IN1 and IN2 straight to the buttons and try it works  great except for the lower voltage output (8v instead of 12v)
4  Using Arduino / Motors, Mechanics, and Power / Re: 12V motor control with H-Bridge speed issues, plz help on: May 07, 2012, 07:06:00 pm
Quote
Have you tried measuring the voltages on the IN1 and IN2 pins when you are trying to run the motor in each direction?

If you swap the connections to IN1 and IN2, is the "bad" button still the same one?

nope that's one of the first things I did, and I even swapped the buttons. The motor runs nicely in rev with IN1 & IN2 swapped.

now here's another question do these/other H-Bridges normally have a voltage drop like that? I'm expecting 12v or slightly lower output with a 12v supply... or have I got it wrong? The datasheet mentions 1ohm 'on' resistance. I'm assuming that wouldn't yank it down to 7.8V like that...

the other thing is how sensitive are the arduinos to shorts? because I have messed up on a few occasions where the arduino would rest itself could I have wrecked my arduino, or both of them?
5  Using Arduino / Motors, Mechanics, and Power / Re: 12V motor control with H-Bridge speed issues, plz help on: May 07, 2012, 06:58:33 pm
I did these tests:

-first, I commented out the LED from the code, because I know the buttons are working. This made no difference.
-I uncommented/readded control of the SB pin in the code this also did not work

-I then tested the motor right off of a 12V 2.6Ah lead acid battery. The motor spun faster in both directions, though slightly slower in the reverse direction, or at least it made a slower 'sound' in reverse.

-Then I broke out multi meter. Here are the voltages I found:
  Supply: 11.90V
  Fwd direction output voltage (across motor terminals): 7.86V (shouldn't it be 11.90v?)
  Rev direction output voltage (across motor terminals): 21.7mV (uh oh)
  Signal to IN1 (fwd): 4.91V
  Signal to IN2 (rev): 1.77V (should be 4.5V to 5.5V?)
  Signal to SB: 4.91V
  Signal to PWM (fwd btn pushed): 4.91V
  Signal to PWM (rev btn pushed): 1.88V (uh oh)
  Signal to arduino Pin 7 (button pushed): 4.91V
  Signal to arduino Pin 8 (button pushed): 4.91V
  Supply to buttos: 4.91V

SO there is obviously something causing the Arduino to send a lower voltage when the REV btn is pressed.
6  Using Arduino / Motors, Mechanics, and Power / Re: 12V motor control with H-Bridge speed issues, plz help on: May 06, 2012, 04:43:17 pm
Alright here is an eagle schematic of the way I have it hooked up, and a few pictures of my breadboard. I did find that I missed one ground connection (one of the S-GND's) on the LH side of the chip. It didn't make a difference when I hooked it back up (I hope I didn't fry it?).

And I tried all this again with the modified code (thank you), to no avail.

I'm not sure if the buttons are correctly represented in the schematic, anyways, as far as I can tell they are the same configuration as in the digital read and button tutorials. The SB pin is still tied to 5v from the arduino, I'll try it again later with arduino actually controlling SB signal, but I don't see much hope there, as I originally had the arduino doing PWM and SB with the same crummy result.

Cheers!
7  Using Arduino / Motors, Mechanics, and Power / Re: 12V motor control with H-Bridge speed issues, plz help on: May 05, 2012, 10:01:44 pm
ooops that was a quick debug its just for an led to light up when the buttons are pressed, to make sure it's not an input problem. One thing I can tell you though is the led is ever so slightly dimmer when I push the button for the direction that piles up.
Quote
Code:
Example, what is this pin for?
Code:
pinMode(12, OUTPUT);

also I tried setting the PWM pin as an output, but it didn't work. I will leave it on there though.

and are you saying I should use analogWrite(255) instead? the only reason I set the pwm high in the else statement is because the datasheet specifies that the PWM sig should be high when not in use... I guess to keep the capacitors charged? Regardless it didn't make a difference. Other than that does the code make sense?

i guess i'll break out the multimeter tomorrow.
8  Using Arduino / Motors, Mechanics, and Power / 12V motor control with H-Bridge speed issues, plz help on: May 05, 2012, 07:05:42 pm
Hello,

I am using a Toshiba TG6549PG H-Bridge to control a 12v DC motor. The reason I went for the TG6549 is because it can handle about 3.5A steady (The motor in it's application would draw around 2.5A).

Here is the datasheet http://www.toshiba.com/taec/components2/Datasheet_Sync/261/3626.pdf

I've run in to the following issues: I have full speed/power in one direction, and very little in the other. The H-Bridge uses four pins, one for standby, one for PWM to control the speed and one for each direction. I have connected the H-Bridge according to the typical application outlined in the datasheet for 12v Vcc, with arduino pins 2 & 4 going to IN1 and IN2, arduino pin ~11 to PWM on the TG6549. I have two buttons, one is for full-speed CW, the other full-speed CCW.

From what I can tell, there is something wrong with my code or the arduino board itself (though I tried it out with an UNO and a MEGA), or maybe the connections yet. I tried the H-Bridge manually, supplying 5V and GND from the arduino and trying the buttons w/ their pulldown resistors directly to the IN1 and IN2 pins, and tied the PWM and SB pins to 5v as well and I get full speed in each direction no problem. That's why I figure its my code... anyways here it is, it's probably a rookie mistake...
Code:
//Toshiba TB6549PG Motor Driver Test


//PINOUT
//Input
const int ctrlFwdPin = 7; //0-5v Signal to Arduino Pin 50
const int ctrlRevPin = 8; //0-5v Signal to Arduino Pin 52

//Output
const int fwdSig = 2; //0-5v Signal to in1 pin on Driver
const int revSig = 4; //0-5v Signal to in2 pin on Driver
const int pwmSig = 11; //PWM Signal to PWM pin on Driver
//const int sbSig = 25; //0-5v Signal to SB(Stanby) pin on Driver

//Variables
int ctrlFwdStat = 0;
int ctrlRevStat = 0;

void setup() {

  //Pin Setup
pinMode(ctrlFwdPin, INPUT);
pinMode(ctrlRevPin, INPUT);
pinMode(fwdSig, OUTPUT);
pinMode(revSig, OUTPUT);
//pinMode(sbSig, OUTPUT);
pinMode(12, OUTPUT);

}

void loop() {
   
  ctrlFwdStat = digitalRead(ctrlFwdPin);
  ctrlRevStat = digitalRead(ctrlRevPin);

  if(ctrlFwdStat == HIGH) {
     digitalWrite(12, HIGH);
     analogWrite(pwmSig, 255);
     digitalWrite(revSig, LOW);
     digitalWrite(fwdSig, HIGH);
  }
  if(ctrlRevStat == HIGH) {
    digitalWrite(12, HIGH);
    analogWrite(pwmSig, 255);
    digitalWrite(fwdSig, LOW);
    digitalWrite(revSig, HIGH);
  }
  else {
     digitalWrite(12, LOW);
     //digitalWrite(sbSig, HIGH);
     digitalWrite(pwmSig, HIGH);
     digitalWrite(revSig, HIGH);
     digitalWrite(fwdSig, HIGH);
     
  }
}

Right now I have the SB pin tied to 5V and commented it out in my code just to see if that made a difference. The best results I get is if I set IN1 & IN2 high (short stop) in the else() statement and then in the direction that has trouble I get some movement, but not much. It doesn't seem to matter if I give it a PWM signal, it will move proportionally slower. Maybe I have to set the the PWM frequency? (which I have no idea where to start).

Thanks in advance!
9  Using Arduino / Project Guidance / Re: Submersible ROV Project Help on: May 01, 2012, 08:39:59 pm
Thank you for the prompt reply. The chips should be coming in tomorrow.
10  Using Arduino / Project Guidance / Re: Submersible ROV Project Help on: April 29, 2012, 06:29:09 pm
So I've attached a schematic of a full duplex setup using two LTC490's based on a typical connection from the datasheet ( I also included the figure of that typical connection).

Now, does this seem to make sense? are the connections to the arduino's correct? and the capacitors across the 5v and ground/cable shield on either end I think are only necessary for proper AC termination, is that right?

I apologize in advance if anything is incorrectly represented, this is my first foray into Fritzing...

Thanks again!

11  Using Arduino / Project Guidance / Re: Submersible ROV Project Help on: April 23, 2012, 09:57:04 pm
I have completed the frame and the main "capsule" where the Arduino, batteries and electronics will reside. It was always just a matter of getting a good control system going. I also built the relay board which I was considering housing in a separate smaller capsule filled with wax like they do at http://www.homebuiltrovs.com/.

Anyways thanks for the link, I was searching the arduino forums internally which oddly did not yield as many results as having google sift through it.

All the sensors i'm gonna use are from sparkfun.com and most of them have tutorials on how to interface them with an Arduino. What I'm really trying to figure out is transmitting to and from the ROV...
12  Using Arduino / Project Guidance / Submersible ROV Project Help on: April 22, 2012, 02:12:31 pm
Hello.

I'll start by saying I am new to Arduino, and have minimal electronics experience.

I have been building an ROV on and off for the last couple of years. The main hurdles I am running into are the control boards and the tether. As I said, I don't have much electronics experience, so I never liked the idea or had the energy to build my own control boards especially since I didn't really know what I was doing. Well, the Arduino changes all of that, it eliminates the need to design/build my own controller and to me it seems like an excellent platform for this kind of a project and for learning. I have many questions regarding the Arduino's actual capabilities but it mostly breaks down to the number of inputs and outputs I need and then how to get sensor information back to the surface.

To best explain the issues I am thinking about, I will first list the intended specs of the ROV:

Control Boards:
-TX Arduino Uno (surface, interfaces with PC or PS2 controller)
-RX Arduino Mega (ROV)

Tether
-150' to 300' of Cat5/Cat5e

Power Supply:

-2 onboard (ROV) 12v lead acid batteries, typically found in alarm systems

Sensors:
-Barometric Pressure Sensor (needs 2x analog in)
-Compass module (needs 2x analog in)
-RCA Camera Module (needs it's own twisted pair over the cat5)

Actuators:
-4 Thrusters, 2 for up/down/roll, 2 for fwd/rev/left/right (for now I want to stay away from proportional/speed control of the thrusters as there seem to be only dual motor shields or breakout boards out there)
-4 Lights
-The Arduino Mega will drive a relay board that will control the motors and lights (on/off), one relay for the lights, one relay pair for each thruster

So the biggest issue I think is the communication between the two Arduinos. The configuration that sounds the best to me is to use two Arduinos, one at the surface(UNO) one on board the ROV(MEGA). That way I can interface a joystick or PS2 controller to the Uno on the surface, or even connect it to a PC with an ethernet shield or something. And also with the Mega onboard the ROV I have tons of extra pins for expansion. Anyways, from what I understand, the signal strength from the Tx and Rx pins built on the Arduino would not be adequate over a distance of 300' of cat5 on a twisted pair. I have googled as much as I can on this issue and it seems the best way to do it is over RS485 for its long distance capability.

I found this tutorial : http://www.gammon.com.au/forum/?id=11428 to breakout the Arduinos to RS485. Now this setup (correct me if I am wrong) is a half-duplex? Meaning it cannot send/receive simultaneously. I'm wondering how much this would affect the sensor data updates, making their way back to the surface, since I would probably almost always be moving the unit forward/backwards or something, therefore almost always transmitting. Again correct me if I am wrong, but this could be overcome by using a full-duplex RS485 setup? And if I understand correctly, this means I would need to use two twisted pairs on the cat5?(which is fine).

I have seen some different configurations for this on google anyway such as using one Arduino with an ethernet shield straight to a PC on the surface. Now this is not Ideal since I need a camera onboard and I have read (correct me if I'm wrong) that the Arduino does not have the ability to decode video, let alone stream it. So if I use an ethernet shield directly that takes away my twisted pair for the video signal. The solution to this that I have read is having an network switch onboard the ROV with an IP camera. That idea seems mickey-mouse because it means extra weight and power consumption.

The other thing I was wondering, based on the sensors I listed above, does this seem like too much information to be passing along at a time? (ie the Barometric Pressure sensor has a built-in thermometer, and can calculate altitude etc). I suppose it would depend on how often the program would poll to update the sensor values? That's also why I want to use the Arduino Mega on board, because it has more processing power.

Am I overthinking any of this?

Anyways, any help/guidance at all would be greatly appreciate.

Thanks!
Pages: [1]