Show Posts
Pages: [1] 2
1  Topics / Robotics / Re: New robot:battery drainage advice, mechanical design improvement on: March 20, 2011, 08:24:43 pm
Finally got it working. I guess the problems I was experiencing were just loose wires or something.
Here it is.
I will add the H-Bridge later. I will also add other commands besides the simple directional one. Sensors and an autonomous mode will also be added.
Thanks to everybody for all the help!
2  Topics / Robotics / Re: New robot:battery drainage advice, mechanical design improvement on: March 19, 2011, 10:19:02 pm
just tested the gearmotors again (with no load) and they seem to be working fine with the arduino program (smooth transition, no "overpowering" motor). I dunno maybe it's chronic...
--------
just a note, i didnt use any ir protocol, just modulated the carrier.
3  Topics / Robotics / Re: New robot:battery drainage advice, mechanical design improvement on: March 19, 2011, 10:01:51 pm
Ok so I found some gear motors i had lying around. They opperate somewhere around 60-70rpm. I attached them to a new quasi-chasis structure w/4AA batteries. They worked very well so the original problems i had have been solved. However when i inserted them into the actual circuit i started experiencing some rather unusual problems (i had had no actual problems with the circuit with the other motors).
Perhaps i should first explain in alitte more detail what iam doing .
An analoginput on the arduino is connnected to a 38khz ir photoreciever module. The reciever picks up the transmitter, a homemade dual-555 (one 555 for carrier 38khz, the other for modulating the carrier). The signal is demodulated in the reciever and the modulating waveform goes into the analogpin.
Basically all the arduino is doing right now is interpretting the pulse width of the signal and writing the output accordingly. The hightime(0 - period) is mapped from 0 - 255 (pwm of one motor). The lowtime (0 - period) is mapped from 0 - 255 ( pwm of other motor). The pwm values are also written to two leds that act simply as indicators.
The first problem that im having is that one of the geared motors seems to "overpower" the other. That is to say that once i turn on the "superior" motor i am unable to switch back to the "inferior" motor. Could this be because of the motors inductance and that it is pulling current away from the other motor? This is what i thought but then i saw that the indicator leds were also biased in this way. How is this possible if the leds are a completely separate circuit from the motors. Could the problem be magnetic interference? I looked through a scope and saw a lot of interference whenevr the motors were connected.
I also noticed (from looking at the indicator leds) that the transition from one motor to another when the pot was turned slowly was not smooth. Im pretty sure that this is related to the first problem .

I may upload some pics/vids if they would be helpful.
Sorry if my questions are getting annoying. And for the wordiness of my reply.
 Any ideas would be welcome.
4  Topics / Robotics / Re: New robot:battery drainage advice, mechanical design improvement on: March 16, 2011, 05:26:15 am
Heres some more info:
speed (noload)=24000
speed (load) =18000

1.98 is max current w/load. Part # 273-256.
So I should use gears? What would you recommend? Is there a gear kit??
5  Topics / Robotics / Re: New robot:battery drainage advice, mechanical design improvement on: March 15, 2011, 08:23:18 pm
Does this look right?
6  Topics / Robotics / Re: New robot:battery drainage advice, mechanical design improvement on: March 15, 2011, 07:46:26 pm
So could I drive the large transistors with  TIPs fed by through a biasing resistor connected to the arduino pins? Would the emitter of the TIPs be collected to the bases of the other transitors? Would the TIPs be connected to the 9-18v supply?
7  Topics / Robotics / Re: New robot:battery drainage advice, mechanical design improvement on: March 15, 2011, 05:27:10 am
motors are from radioshack, says 9-18v on package, 1.98A, 18000rpm
8  Topics / Robotics / Re: New robot:battery drainage advice, mechanical design improvement on: March 14, 2011, 09:33:51 pm
-RuggedCircuits
Thanks for the explanation. Im fairly certain that its not the transistors (i was going to mention that). They're NPN's. Here's the datasheet http://www.google.com/url?sa=t&source=web&cd=1&ved=0CBgQFjAA&url=http%3A%2F%2Fdalincom.ru%2Fdatasheet%2FFJL6920.pdf&ei=OM9-TZ_dAsia0QGxz5yBCQ&usg=AFQjCNHe1lRh5CMgc0MqnxRBijgwsSa67Q. They aren't currently set up in an h bridge (though i will implement this later). The arduino pins drive the transistors without a biasing resistor, so i figured that the current provided would be enough to fully saturate the tranistors. But maybe i am wrong? probably yes...if iam, i guess i will just use smaller signal transistor to provide the current necessary to turn on the power npns. Thanks for the advice.
9  Topics / Robotics / Re: New robot:battery drainage advice, mechanical design improvement on: March 14, 2011, 09:17:34 pm
Here are some more pics if they will help
10  Topics / Robotics / New robot:battery drainage advice, mechanical design improvement on: March 14, 2011, 09:15:05 pm
i just finished my first arduino based robot/vehicle. But i have a few problems:
- the vehicle only goes about 3mph (w/ x2 9-18v dc motors, opperating at 18v). I thought that the motors (even with only 2) would be able to go much faster than that...
- the motors have massive battery drain. after 1 minute of use with x2 new 9v batteries the voltage dropped to 16v. I didnt think that the drain would be that bad.

What can i do about the drain? How can i increase the speed?
The vehicle w/ x2 9v batteries weighs 519g, 9v battery weighs 47g, wheel (from hobbyshop, plastic, black, with no traction) weighs 5g, motors weigh 53g.
11  Using Arduino / General Electronics / Re: 556 PWM help on: March 06, 2011, 08:38:23 am
I put up the wrong schematic, here's the one that worked
http://www.instructables.com/id/Simple-and-dirty-Pulse-Width-Modulation-PWM-Wi/#step1
I was taking my output from the output pin and ground. Output has to be taken from discharge and vcc.
12  Using Arduino / General Electronics / 556 PWM help on: March 05, 2011, 11:50:51 pm
I used the following schematic for a 555 (I used 556) controlled pwm circuit, with variable duty cycle (pot).
I looked at the output through an oscilloscope. The pwm works. I am getting the proper duty cycles, but on a DC level (aprox. 6v w/ 6v supply, 1.5v pk to pk). This has happened with other circuits and only with the 556 (555 seems to work fine). I need to use the output to modulate another 555 for IR (reset pin).
Can anyone explain? This is the schematic I used
http://www.josepino.com/circuits/pwm
13  Using Arduino / Programming Questions / Re: Functions with Arrays on: February 26, 2011, 12:55:30 pm
Just figured it out
Quote
Code:
if(2 == HIGH)
Don't expect that to work.

 
Turns out you were right. Here's the working code
Code:
int button = 2;

int notes[13] = {
  1915, ((1000000 / 277) / 2), 1700, ((1000000 / 311) / 2), 1519, 1432, ((1000000 / 370) / 2), 1275, ((1000000 / 415) / 2), 1136, ((1000000 / 466) / 2), 1014, 956,};
int c = notes[0];
int csharp = notes[1];
int d = notes[2];
int dsharp = notes[3];
int e = notes[4];
int f = notes[5];
int fsharp = notes[6];
int g = notes[7];
int gsharp = notes[8];
int a = notes[9];
int asharp = notes[10];
int b = notes[11];
int C = notes[12];




void setup() {
  pinMode(9, OUTPUT);
  pinMode(2, INPUT);
}
void loop() {
  if(digitalRead(button) == HIGH) {
    play1 ();
  }
  else if(digitalRead(button) == LOW) {
    play2 ();
  }
}

void play1 () {

  byte totalnotes = 4;
  int tones[] = {
    c, d, e, f    };
  int beatnote[] = {
    1, 1, 1, 1    }; 
  int tempo = analogRead(14);
  tempo = map(tempo, 0, 1024, 1, 5);
  for(byte i = 0; i < totalnotes; i++)
  {
    int constantbeat = (100000 / (tones[i])) * (beatnote[i]) * tempo;
    for(int time = 0; time < constantbeat; time++)
    {
      digitalWrite(9, HIGH);
      delayMicroseconds(tones[i]);
      digitalWrite(9, LOW);
      delayMicroseconds(tones[i]);
    }
  }
}

void play2 () {

  byte totalnotes = 4;
  int tones[] = {
    c, C, c, C    };
  int beatnote[] = {
    1, 1, 1, 1    }; 
  int tempo = analogRead(14);
  tempo = map(tempo, 0, 1024, 1, 5);
  for(byte i = 0; i < totalnotes; i++)
  {
    int constantbeat = (100000 / (tones[i])) * (beatnote[i]) * tempo;
    for(int time = 0; time < constantbeat; time++)
    {
      digitalWrite(9, HIGH);
      delayMicroseconds(tones[i]);
      digitalWrite(9, LOW);
      delayMicroseconds(tones[i]);
    }
  }
}

Thanks to everyone for the help!
14  Using Arduino / Programming Questions / Re: Functions with Arrays on: February 26, 2011, 11:41:46 am
Thanks, I think this will work
15  Using Arduino / Programming Questions / Re: Functions with Arrays on: February 25, 2011, 03:40:01 pm
can it be used to store multiple melodies?
i just assumed that the tone function was another [easier] way of creating the desired frequency.
Pages: [1] 2