Show Posts
Pages: [1] 2 3 ... 15
1  Using Arduino / General Electronics / Re: Questions about 8x8 Dot Matrix Display on: October 19, 2012, 10:19:15 am
Sorry, but I don't remember which code I used.
I just searched on Google for some tutorials.
Good luck!
2  Topics / Robotics / Re: Starting my first UGV project - need some starting help on: August 31, 2012, 08:41:04 am
Here is a picture of my 'work in progress' ground station:

Hmm, interesting idea mounting the display inside the case lid. What type of display did you use?  Have you run into any excess heating by surrounding it with foam after extended use?
It's a TFT-LCD monitor.
I didn't have use it for a long period yet, but if it becomes a problem, I'll just drill some holes in the back of the case.
3  Topics / Robotics / Re: Starting my first UGV project - need some starting help on: August 29, 2012, 10:35:38 am
Thank you smiley-wink
There should be other chassis out there, but I'm not sure.
This chassis is worth the price!
Keep me updated about your project smiley

Here is a picture of my 'work in progress' ground station:
4  Topics / Robotics / Re: Starting my first UGV project - need some starting help on: August 22, 2012, 01:00:12 pm
Installed IR leds for fpv'ing when it's night smiley
5  Using Arduino / Programming Questions / Re: PulseIn: Reading RC signal for switching IR led on on: August 21, 2012, 10:03:23 am
What is the RC system frame rate? I do not really understand this.

That is how often the RC receiver sends a pulse to the servo.
Okay thanks smiley

I just tested again, and if my transmitter antenna gets to close to the receiver antenna, the switch doesnt work. But that's no problem at all.
6  Using Arduino / Programming Questions / Re: PulseIn: Reading RC signal for switching IR led on on: August 21, 2012, 09:42:03 am
Strange, now it works...
So i'm sure it has something to do with the PPM value, because sometimes the switch reacts much slower, because the PPM value don't reach the treshold always. I need to play with the values.

Or, maybe it needs to much memory because of the PulseIn?
7  Using Arduino / Programming Questions / Re: PulseIn: Reading RC signal for switching IR led on on: August 21, 2012, 09:19:04 am
The codes works perfect with my other Arduino, without the IR leds flashing.
So it's a problem on my arduino on my robot(it's an onboard arduino on a motor controller "Wild Thumper")

These are the PPM  values on the working arduino:

Switch OFF:
Lowest is 905
Highest is 932

Switch ON:
Lowest is 2039
Highest is 2049

Is it possible that the values change on other arduino, because that's why the leds are flashing.

This is the code that worked on my Arduino Uno, but didn't work on my onboard Arduino on the motor controller:
Code:
int transistorIR = 2; // transistor pin
int RCsignalCh5 = 4; // pin connected to channel 5 on rc receiver
int ch5; // hold the value

void setup(){
  pinMode(transistorIR, OUTPUT);
  pinMode(RCsignalCh5, INPUT);
}



void loop(){

  ch5 = pulseIn(4, HIGH, 25000);
  if(ch5>2039){
    digitalWrite(transistorIR, HIGH);
  }
  if(ch5<932){
    digitalWrite(transistorIR, LOW);
  }
}

I can't use the serial monitor on the Wild Thumper arduino because the motors start turning then(strange?).
8  Using Arduino / Programming Questions / Re: PulseIn: Reading RC signal for switching IR led on on: August 21, 2012, 05:49:13 am
Here is the test code:

Code:
int ch5; // Here's where we'll keep our channel values


void setup() {

  pinMode(2, INPUT); // Set our input pins as such


  Serial.begin(9600); // Pour a bowl of Serial

}

void loop() {

  
 ch5 = pulseIn(2, HIGH, 25000); // Read the pulse width of



  Serial.print("Channel 5:"); // Print the value of
  Serial.println(ch5);        // each channel


  delay(100); // I put this here just to make the terminal
              // window happier
}

I got this code from sparkfun.

Quote
For example, you could count the number of readings above and below the threshold and print these on the serial port once per second. This will show whether the pulse times are consistent, and you can compare the total count with the RC system frame rate (assuming you know / can find that) to see whether you have a significant number of missed/spurious pulses.
What is the RC system frame rate? I do not really understand this.


Already thanks for helping everyone.
9  Using Arduino / Programming Questions / Re: PulseIn: Reading RC signal for switching IR led on on: August 21, 2012, 05:41:10 am
I'll probably use a seperate Arduino for complex tasks in the future.
I'm already looking at your blog at this time, but it seems to be difficult. But it's nice smiley

So, there is no solution for my problem?
10  Using Arduino / Programming Questions / Re: PulseIn: Reading RC signal for switching IR led on on: August 21, 2012, 05:02:31 am
Here are the results of the test:
Code:
Channel 5:915
Channel 5:917
Channel 5:923
Channel 5:915
Channel 5:1359
Channel 5:1968
Channel 5:1986
Channel 5:1986
Channel 5:1986
Channel 5:1986
Channel 5:1988
Channel 5:1986
Channel 5:1986
Channel 5:1988
Channel 5:1129
Channel 5:923
Channel 5:919
Channel 5:919
Channel 5:919
Channel 5:923
Channel 5:917
Channel 5:918
Channel 5:918
Channel 5:917
Channel 5:925
Channel 5:918
Channel 5:918
Channel 5:917
Channel 5:918
Channel 5:917
Channel 5:918
Channel 5:918
Channel 5:918
Channel 5:918
Channel 5:917
Channel 5:918
Channel 5:917
Channel 5:918
Channel 5:917
Channel 5:917
Channel 5:918
Channel 5:923
Channel 5:917
Channel 5:918
Channel 5:918
Channel 5:917
Channel 5:918
Channel 5:918
Channel 5:917
Channel 5:917
Channel 5:917
Channel 5:918
Channel 5:918
Channel 5:918
Channel 5:917
Channel 5:917
Channel 5:918
Channel 5:918
Channel 5:923
Channel 5:917
Channel 5:918
Channel 5:918
Channel 5:918
Channel 5:923
Channel 5:918
Channel 5:918
Channel 5:918
Channel 5:918
Channel 5:923
Channel 5:918
Channel 5:918
Channel 5:918
Channel 5:918
Channel 5:918
Channel 5:917
Channel 5:918
Channel 5:917
Channel 5:917
Channel 5:917
Channel 5:918
Channel 5:917
Channel 5:917
Channel 5:918
Channel 5:917
Channel 5:918
Channel 5:923
Channel 5:917
Channel 5:1467
Channel 5:1495
Channel 5:1960
Channel 5:1990
Channel 5:1985
Channel 5:1986
Channel 5:1988
Channel 5:1988
Channel 5:1988
Channel 5:1988
Channel 5:1988
Channel 5:1988
Channel 5:1989
Channel 5:1988
Channel 5:1747
Channel 5:1514
Channel 5:935
Channel 5:919
Channel 5:915
Channel 5:915
Channel 5:922
Channel 5:917
Channel 5:917
Channel 5:917
Channel 5:917
Channel 5:922
Channel 5:917
Channel 5:917
Channel 5:917
Channel 5:917
Channel 5:917
Channel 5:917
Channel 5:915
Channel 5:917
11  Using Arduino / Programming Questions / Re: PulseIn: Reading RC signal for switching IR led on on: August 21, 2012, 04:51:57 am
I just tested the ppm values by serial printing them, and when the switch is on, it gives values around 1988 and when the switch is off it gives around 915.
So I changed the code like this:
Code:
if(ch5>1900){
digitalWrite(transistorIR, HIGH);
}
if(ch5<1900){
digitalWrite(transistorIR, LOW);
}

And still the same problem...

I'll take a look at your blog smiley

The IR leds are for night vision for my UGV.

12  Using Arduino / Programming Questions / PulseIn: Reading RC signal for switching IR led on on: August 21, 2012, 04:00:38 am
I'm trying to turn my IR leds on with a switch on my 40Mhz transmitter.
This is the code I currently have:


Code:
int transistorIR = 4; // TIP121 transistor pin
int RCsignalCh5 = 2; // D2 pin connected to channel 5 on rc receiver
int ch5; // hold the value

void setup(){
  pinMode(transistorIR, OUTPUT);
  pinMode(RCsignalCh5, INPUT);
}



void loop(){

  ch5 = pulseIn(2, HIGH, 25000);
  if(ch5>1000){
    digitalWrite(transistorIR, HIGH);
  }
  if(ch5<1000){
    digitalWrite(transistorIR, LOW);
  }
}

Now when I run the code and test it, the IR leds are already on(very dim) without turning the switch.
And when I turn the switch, the IR leds become brighter, but go on and off very fast.
What  could be the problem?
The leds even go on when I set the value of 1000 to 10 like this:
Code:
 if(ch5>10){
    digitalWrite(transistorIR, HIGH);
13  Using Arduino / General Electronics / Re: Easy transistor circuit won't work on: August 20, 2012, 03:07:07 pm
Thanks smiley
14  Using Arduino / General Electronics / Re: Easy transistor circuit won't work on: August 20, 2012, 03:00:20 pm
Thank you for explaining. Is it always 1000 ohm? Why 1000 ohm?
I'm very interested smiley

@pwillard:  Oops, I thought they were seperate.
15  Using Arduino / General Electronics / Re: Easy transistor circuit won't work on: August 20, 2012, 02:49:25 pm
The power supply isn't connected to the arduino gnd at this moment.

That's the problem then. You need to connect power supply ground (i.e. negative side of its output) to Arduino ground.
Haha yes! It works now!
Thank you VERY much!!!!!

So, can anyone explain me why there is a resistor needed with a transistor? I never did it before...
Pages: [1] 2 3 ... 15