Show Posts
Pages: 1 ... 8 9 [10] 11
136  Using Arduino / Sensors / Re: Which sensor for turning? on: July 19, 2012, 08:18:59 am
Thanks for all the replies. I was afraid that it would not be as easy as "use sensor x".
DuaneB, your suggestion is interesting as I have servo mounted range sensors on the robot already. But it indeed varies in the environment if it works or not.

The "lamp approach" indeed would work but is too static for my purpose. I have a robot roaming indoor and outdoor.

Has someone realized a working solution with a compass or a gyro?

Robert
137  Using Arduino / Sensors / Which sensor for turning? on: July 19, 2012, 06:56:22 am
Hi,

I wouldl like to have my robot turun a specific amount of degrees.
I tried using the encoders of my crawler. But the slip seems to be too high. The angle at which the robot arrives varied too much.
I tries using the magnetic compass of the android phone which I use as bluetooth internet bridge. But the DC motors confuse the compass too much.

I now wonder which sensor to use for mesuring the turning angle.

My wish list (where possible):
- no serial communication
- not too expensive
- interrupt pins are in use by the encoders

What is the experience on this?

Thanks
Robert
138  Using Arduino / Programming Questions / Re: If statement combine comparison operators on: July 19, 2012, 05:48:01 am
It worked with the extra brackets. But the error was erlier in the code. With the extrad Serial.prints it showed that I never reached this statement.
Thanks for the help.
139  Using Arduino / Programming Questions / Re: If statement combine comparison operators on: July 18, 2012, 01:20:10 pm
Thanks majenko,

this doesn't work either. Tomorrow I'll check if it's the statement of if the worblem lies somewhere else.

Thanks
Robert
140  Using Arduino / Programming Questions / If statement combine comparison operators on: July 18, 2012, 12:50:31 pm
Hi,

the following statement doesn't seem to work for me:
if (MotorDisable == false && (drive=='L' || drive=='R') && encRight < waytogo)

I just want to know if my syntax is wrong or something in the rest of my sketch's logic.

I want:
+ MotorDisable to be false
+ drive to be L or R
+ encRgight smaler than waytogo

Thanks
Robert
141  Using Arduino / Sensors / Re: HC-SR04 on one pin only - possible? on: July 02, 2012, 12:44:19 am
Hi Tim,

thanks for the reply. I'll test it when the sensors are in. Ordering from China they cost barely 2$ these days. But 3 weeks shipping can pull your nerves :-)

Robert
142  Using Arduino / Sensors / Re: HC-SR04 on one pin only - possible? on: June 29, 2012, 04:33:56 am
OK, my question has been answert at page 8 and 9 of this thread:
http://arduino.cc/forum/index.php/topic,106043.0.html - thanks for the great library - waiting for my sensors to arrive.

If someone can/wants to add some informaiton or experience ...

Thanks
Robert
143  Using Arduino / Sensors / HC-SR04 on one pin only - possible? on: June 29, 2012, 12:58:47 am
Hi,

is it possible to use one pin for trigger and echo?
I could connect trigger and echo pin to the same pin and switch from OUTPUT to INPUT on that pin after triggering.
How would the SR04 react on an IN signal on the echo pin?

I assume it doesn't work - as nobody suggested it so far.

Robert
144  Using Arduino / Sensors / URM37 - PWM sketch on: June 22, 2012, 01:55:42 pm
Hi,

does someone have a sketch for reading the URM37 via PWM?
I found one example with 4 sensors and tried to adapt it for one. But I only get one reading. Then the arduino seems to freeze.

I don't get it to work. Maybe I also need to set it to PWM mode but I think it comes with PWM mode enabled by default. Also tried it like this:

Code:
// set URM37 to PWM

// # Connection:
// #       Pin12 (Arduino) -> Pin 1 VCC (URM V3.2)
// #       GND (Arduino)   -> Pin 2 GND (URM V3.2)
// #       Pin 0 (Arduino) -> Pin 9 TXD (URM V3.2)
// #       Pin 1 (Arduino) -> Pin 8 RXD (URM V3.2)
// #


int URPower = 12; // Ultrasound power pin
int val = 0;
int USValue = 0;
int timecount = 0; // Echo counter
boolean flag=true;
uint8_t DMcmd[4] = {
   0x44, 0x02, 0xbb, 0x01}; //set PWM mode

void setup() {
  Serial.begin(9600);                  // Sets the baud rate to 9600
  Serial.println("Init the sensor");
  pinMode(URPower, OUTPUT);
  digitalWrite(URPower, HIGH); // Set to High
  delay(200); //Give sensor some time to start up
}

void loop()
{

  for(int i=0;i<4;i++)
  {
    Serial.write(DMcmd[i]);
  }

  delay(20);
}

I hope someone can help. With TTL/SoftwareSerial I get problems with my servo.
(http://arduino.cc/forum/index.php/topic,110835.0.html)

Thanks
Robert
145  Using Arduino / Motors, Mechanics, and Power / Re: Servo shakes when URM37 scans on: June 22, 2012, 05:49:19 am
OK. I found that the problem is most likely caused by the SoftSerial library (taking interrupts and interfering with the servo library). Because of this I would like to interface the URM37 via PWM.
There seemed to be some example code on yerobot.com . But the site is down.

Does someone have example code for the PWM mode? All I found is for serial communication.

Thanks
Robert
146  Using Arduino / Motors, Mechanics, and Power / Re: Servo shakes when URM37 scans on: June 21, 2012, 08:29:58 am
Thanks for your response.
Did I get it right? :

- the servo need sconstant signaling from the board (every 20 ms?)
- the scan takes longer and blocks the signaling

So I change the URM37 library and change the timeout from 200 to 20 or 19?
Is there a way to run the scan and the servo control in parallel?

I thougt the servo keeps its position without signal (as well as without power).

Thanks for the explanation.

Robert
147  Using Arduino / Motors, Mechanics, and Power / Servo shakes when URM37 scans on: June 20, 2012, 01:51:10 am
Hi,

I am using the DFRobot Romeo all in one controller.
http://www.dfrobot.com/index.php?route=product/product&path=52_104&product_id=656

Allatched I have a servo with IR (Sharp) and Ultrasonic (URM37) sensors.

When I turn the servo 180° step by step and only read the IR Sensor at every step, the servo does a smooth round.
When I do a Ultrasonic Scan at every step, the servo starts to share as to be seen here: http://youtu.be/lEsOzdS8XlQ
The shaking seems to be especially strong when the scan distance is high (eventually higher than the 3m max range).

The board as well as the servo is powered via the Motor Power (11.1V LiPo).
I am using the milesburton library for the URM37. Sketch is attached.

Can someone explain what may go wrong?

Thanks,
Robert
148  Using Arduino / Installation & Troubleshooting / Re: can't upload anymore - worked before on: May 28, 2012, 01:29:18 pm
Thanks a lot Clemen99.
Can the bootloader "break"?

I think the big bang method doesn't work with the romeo all inone as it is based on the Uno.

Robert
149  Using Arduino / Installation & Troubleshooting / Re: can't upload anymore - worked before on: May 28, 2012, 06:57:13 am
Yes, absolutely. It World like this before. Also the Rx and Tx LEDs are blinking when I try to upload.
What I wonder about is that led 13 (L) isn't shortly  after powering on the board. I think it should do it...
150  Using Arduino / Motors, Mechanics, and Power / PLL Mode wiring on Romeo all in One Controller on: May 28, 2012, 06:43:37 am
Hi,

I don't understand how to do the jumper setting and the wiring for PLL motor control on the Romeo All in One controller.
http://www.dfrobot.com/index.php?route=product/product&product_id=656

Manual: http://www.dfrobot.com/wiki/index.php?title=DFRduino_Romeo-All_in_one_Controller_V1.1(SKU:DFR0004)

Do I realy need to cross wire the Pins or what does the x on the Jumpers mean? (this would then not be possible with jumpers, only with cables?)

Where do I connect the four signal cables of the two encoders?

If someone could help me here, I would be realy glad.

Thanks
Robert
Pages: 1 ... 8 9 [10] 11