Show Posts
Pages: [1] 2 3 4
1  Topics / Robotics / Re: 2WD Platform with compass on: January 21, 2013, 06:00:30 pm
That sounds great.  Glad you learned something.  Looking forward to seeing your code.

I believe a gyroscope can be used for dead reaconing and would be less influenced by the magnetic field.
2  Topics / Robotics / Re: 2WD Platform with compass on: January 21, 2013, 09:06:53 am
If you are averaging the last 50, you are lagging your adjustments to much.

From the description on how you are adjusting your speeds, it sounds like you are only using the I part of a PID circuit, if you wanted to go "round one" simplification of PID configuration I would do the following:

Run a 3 sample rolling average for your sample set.
Instead of having your loop change speeds by 1 increment, each cycle you are off direction, change your speed based on the difference between expected direction and actual direction: IE:

If your expected heading is 180 degrees, but you are going 160 degrees, drop the speed for the side needed proportional the error amount.  For example, drop the speed by 20 creating speeds of 255, 235.  You will probably need to work with your multiple to find a smooth offset amount - IE you may want 255, 245 (1 per 2 deg) or 255, 205 (2 per 1 deg) or some formula.  This would be the P part of a PID logic.
3  Topics / Robotics / Re: 2WD Platform with compass on: January 20, 2013, 08:16:23 pm
A few suggestions that might help:

look into PID logic for your speed adjustment calculations
You might want to use a running average of the last 3-5 compass outputs to smooth any jitter in its output

Does your robot always pull left or right?
If so you might want to look at trying different ratios of speeds - IE 253 and 255 at max speed

4  Using Arduino / Networking, Protocols, and Devices / Re: Serial communication distance. on: January 01, 2013, 09:46:04 pm
What data rate do you need?
Are you going to try to level the signals at TTL levels or use a converter chip for RS422, RS232, etc?

Data rates of up to 100K bits / second and distances up to 4000 Ft. can be accommodated with RS422. (http://www.rs485.com/rs485spec.html)
5  Using Arduino / Motors, Mechanics, and Power / Re: I had a problem on L293D on: February 14, 2012, 07:06:30 am
I don't see anything wrong with the code that isn't turning the motor on and off, at least nothing that is different between it and the other code that would cause it to "hang." Have you tried putting in a few debugging statements in your code? (IE flash the LED or send data to the serial interface).

You might want to check  your hardware, you may be getting interference between your motors and your IR receiver.  You seem to be able to receive IR signals when the motors are off,  but not when on.
6  Using Arduino / Motors, Mechanics, and Power / Re: I had a problem on L293D on: February 13, 2012, 04:00:54 pm
Please post you whole code, both the "working" and "not working" versions, otherwise we are left to guessing and divination.

Normally you want to avoid "delay" in code were you are doing multiple things and this may be your problem (see blink with out delay example code).
7  Using Arduino / Programming Questions / Re: Help needed with controlling a robot using obstacle avoiding sensors. on: February 03, 2012, 07:47:42 am
This isn't going to work either because you are doing a logical compare and sending it as the variable to digitalRead

Quote
boolean see_NOleft() {
    return digitalRead(sensorPinLO == LOW); // no obstacle on the left side
}

boolean see_NOright() {
    return digitalRead(sensorPinRO == LOW); // no obstacle on the right side
}


This is the format you are looking for however you may need to swap the true and false depending on your sensor output.

Code:
/*
This function tests the left sensor PIN and returns TRUE if the sensor PIN is LOW and FALSE if the sensor PIN is HIGH
This function is expecting a sensor that give a high value when it detects something in range and a low value when it does not detect something in range
*/

boolean see_NOleft(){
   boolean clear;
      if(digitalRead(sensorPinLO)  == LOW) {
         clear = TRUE;
      } else {
         clear = FALSE;
     }
   return clear;
}
8  Topics / Robotics / Re: programming walking gait for hexapod on: February 03, 2012, 07:15:23 am
I would suspect a forward gate would be something like this (sudo code):

give legs lay out of:
3  6
2  5
1  4

raise legs 1, 3, 5
move legs 1, 3, 5 "forward" & legs 2, 4, 6 "backwards"
lower legs 1, 3, 5
raise legs 2, 4, 6
move legs 1, 3, 5 "backwards" & legs 2, 4, 6 "forward"
lower legs 2, 4, 6
repeat
9  Using Arduino / Sensors / Re: Problem with 2 Sharp GP2D12 IR sensors on: February 02, 2012, 02:47:23 pm
make sure you serial monitor shows the same bit rate as you initialize your serial to in your code.
10  Using Arduino / Sensors / Re: Parallax Ping with Arduino Uno on: February 02, 2012, 08:41:52 am
http://tronixstuff.wordpress.com/2011/11/28/tutorial-parallax-ping-ultrasonic-sensor/

http://www.arduino.cc/playground/Main/UltrasonicSensor
11  Using Arduino / Sensors / Re: analogRead() returning no 0 on: January 31, 2012, 03:20:03 pm
the input is floating (definition of nothing connected) therefore does not have a defined voltage applied to it.
12  Using Arduino / Programming Questions / Re: Uploading to Uno board on: January 31, 2012, 11:19:31 am
what error message are you getting?
13  Using Arduino / Sensors / Re: MLX90614 distance on: January 13, 2012, 08:53:32 am
http://www.melexis.com/Assets/IR-sensor-thermometer-MLX90614-Datasheet-5152.aspx -> download the data sheet
pages 33 to 36 has some information about the field of "vision" of the sensor. 
Page 40 has some information that looks relevant to your question.
page 43 - 44 has some information that looks relevant to your question.
14  Topics / Robotics / Re: can anyone help me with prgraming the DFRobot 4WD Arduino Mobile Platform? on: January 09, 2012, 07:34:04 am
Green Motor
  • Gear Ratio 1:120
  • No-load speed(3V):100RPM
  • No-load speed(6V):200RPM
  • No-load current(3V):60mA
  • No-load current(6V):71mA
  • Stall current(3V):260mA
  • Stall current(6V):470mA
  • Torgue (3V): 1.2Kgcm
  • Torque (6V): 1.92Kgcm
  • Size: 55mm x 48.3mm x 23mm
  • Weight:45g

Yellow Motor
  • Motor Model: 130 Motor
  • Output Mode: Two-way shaft output
  • Gear ratio: 1:120
  • No-load speed (3V): 90RPM
  • No-load speed (6V): 180RPM
  • No load current (3V): 120mA
  • No load current (6V): 160mA
  • Locked-rotor current (3V): 1.5A
  • Locked-rotor current (6V): 2.8A
  • Size: Long 55MM W 48.3MM high-23MM
  • Weight: About 45g
15  Using Arduino / Motors, Mechanics, and Power / Re: Voltage Drop across H-Bridge on: January 05, 2012, 03:11:26 pm
I found the answer to question 1:

Looks like the reverse voltage protection diode is typically rated around 1A - so less then my stall current of my 2 motors, so I need to do separate Vin for the shield.

Pages: [1] 2 3 4