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
|
|
|
|
|
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 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. /* 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
|
|
|
|
|
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
|
|
|
|
|