Loading...
  Show Posts
Pages: [1] 2 3 ... 8
1  Using Arduino / Networking, Protocols, and Devices / Re: ADNS-2610 + Processing - pixel dump - working example? on: May 17, 2013, 08:50:48 am
Thanks a lot. I'll give it a try.

Robert
2  Development / Other Software Development / Re: PING duration to cm division / 29 optimized on: May 17, 2013, 05:42:39 am
Quote
That's a sign you understood the math 
Wouldn't say this.  smiley-confuse
But at least I learned bitshifting and masking when you helped me out with the hacrocam.  smiley-grin

My project is a robot for SLAM. The Ultrasonic sensors I use for correcting the estimated position (based on odometry) by measuring the distance to known landmarks.
I need constant pinging with good accuracy. So your code should releave the mp a bit. :-)

Robert
3  Development / Other Software Development / Re: PING duration to cm division / 29 optimized on: May 16, 2013, 12:22:07 am
Hi robtillaart,

thanks for your math skills here. I'll use the final version for my project.
Just one note:

I changed:
Code:
  x = x >> 14;
  return x;

to:
Code:
  x = x >> 15;
  return x;

so I get distance in cm as respone (ping roundtrip time / 2).

Regards,
Robert
4  Using Arduino / Motors, Mechanics, and Power / Re: Servo not centering at 90° - after calibration on: May 06, 2013, 12:47:52 pm
Hi,

the servo is a GoTeck gs-9025mg. The two different mappings is a good idea. I also have  a 28BYJ-48 lying arround. I'll give this a try. If it gets too complicated I'll go for the mapping approach.

Thanks for your answers.
Robert
5  Using Arduino / Motors, Mechanics, and Power / Servo not centering at 90° - after calibration on: May 06, 2013, 01:56:27 am
Hi,

I calibrated a servo for (more or less) exact 0° and 180° position using the min/max timing options when attaching the servo (using the servo library).
When I now move it to 90° it doesn't center but is off by estimated 3°.

I would like to get this more exact as I use it for moving a IR sensor to map the environment. Is there a way to improve this situation or is it simply the inaccuracy of the hardware?

Thanks
Robert
6  Using Arduino / Sensors / Adding sensors to odometry - working approach? on: May 02, 2013, 12:52:13 am
Hi,

I build a differential drive robot. It is supposed to operate indoor, with changing floor covering.
So far odometry for dead reckoning works well. Calibration has been done using UMBmark. After driving a square with two meters side length I get a displacement of two to six cm. With the given (cheap) platform I don't get it to work any better.
I now want to improve the results by better sensing the yaw/turning angle.

What I tried:

-   optical mouse sensor: Not usable with changing floor covering - gives different cpi, dependent on floor covering / distance to floor only 1-2mm
-   AHRS using a 10dof IMU: Not usable indoor. The magnetometer gets highly distracted at some points. (electrical outlet, concrete reinforcement ..)
-   gyro + accelerometer: drifts (didn’t try it .. just read there is no way to prevent drift)

Two questions:
-   One thing I would like to know if it may work: Place the accelerometer out of center of the robot. Rotation should then be sensed as movement on the x-axis. Could his work or do I miss something?
-   Is there any other (maybe also mechanical/unorthodox) way I can improve sensing the turning angle?

Thanks
Robert
7  Using Arduino / Networking, Protocols, and Devices / ADNS-2610 + Processing - pixel dump - working example? on: April 29, 2013, 07:30:13 am
Hi,

I am trying to get an ADNS-2610 (optical mouse) sensor to work.
Reading DeltaX,DeltaY and SQUAL works.

But I don't get the pixel dump to work.

Using examples I found I can dump the data. But showing them in Processing doesn't give a valid picture (only noise).

I used this example:  http://conorpeterson.wordpress.com/2010/06/04/optical-mouse-hacking-part-1/
The Arduino part looks good. The output per pixel is between 0 and 63. (fits the specification)
But the processing part seems to write the pixels not regarding the specification. (or I expect a different pixel order in the output data than there really is). I changed the position of the pixels but it still don’t get a valid picture.

Trying this library: http://tim.cexx.org/?p=613 (changing the addresses for the register regarding the ADNS-2610 spec)
DeltaX, DeltaY works. Dumping the pixel data I get values bigger 63. So this must be wrong.

Does someone have a working example using Arduino and Processing (or another PC frontend for Windows, just to verify the output is ok at all).

Thanks
Robert
8  Using Arduino / Sensors / Re: encoder - phantom readings on: March 05, 2013, 03:27:06 pm
With both then, as I get the phantom readings on both encoders. It's sometimes even so that the encoder from the wheel which isn't running has more readings than the actual encoder.
I'll try to dejam them.

I was hoping it's a software problem. Would have been easier. :-)
9  Using Arduino / Sensors / encoder - phantom readings on: March 05, 2013, 02:59:37 pm
Hi,

I got my new robot parts:
Chassis: http://www.dfrobot.com/index.php?route=product/product&product_id=65
Encoder: http://www.dfrobot.com/index.php?route=product/product&filter_name=encoder&product_id=98
Motor Shield: http://store.iteadstudio.com/index.php?main_page=product_info&products_id=361
Board: http://www.adafruit.com/products/191

I am a bit frustrated.
When I run the left wheels I get a lot of phantom readings on the right encoder. Same the other way arround. If I disconnect the encoder I get less bot not zero readings.

The relevant code parts:

Definitions:
Code:
#define EnAL 10
#define In1 8
#define In2 9

#define EnBR 11
#define In3 12
#define In4 13

volatile unsigned long encRight = 0;
volatile unsigned long encLeft = 0;

Setup:
Code:
pinMode(2, INPUT_PULLUP); attachInterrupt(0, encLeftInterrupt, CHANGE);
pinMode(3, INPUT_PULLUP); attachInterrupt(1, encRightInterrupt, CHANGE);
int i; for(i=8;i<=13;i++) pinMode(i, OUTPUT); //motor pins

Interupt Functions:
Code:
void encRightInterrupt() {
encRight = encRight+1;
}

void encLeftInterrupt() {
encLeft = encLeft+1;
}

Drive functions:
Code:
void LWFWD(){
digitalWrite(In1,HIGH);
digitalWrite(In2,LOW);
}
void LWBWD(){
digitalWrite(In1,LOW);
digitalWrite(In2,HIGH);
}
void LWBRK(){
digitalWrite(In1,LOW);
digitalWrite(In2,LOW);
}

void RWFWD(){
digitalWrite(In3,HIGH);
digitalWrite(In4,LOW);
}
void RWBWD(){
digitalWrite(In3,LOW);
digitalWrite(In4,HIGH);
}
void RWBRK(){
digitalWrite(In3,LOW);
digitalWrite(In4,LOW);
}

One of my test functions:
Code:
void TLF(){
drive='X';
encRight = 0;
encLeft = 0;
LWFWD();
analogWrite(EnAL,savespeed(240));
while (encLeft<=500){}

Serial.println(encLeft); // counts to 500 (well 501) - but sometimes it ven stops after 256??
Serial.println(encRight); //should be 0 but isn't
stop("TLF");
}


Does someone know what I may do wong? I really hope so...

Thanks
Robert
10  Using Arduino / Networking, Protocols, and Devices / Re: Keep Serial TX low before and after Serial Com on: February 01, 2013, 02:05:18 am
What device is it? What protocol is used? Normal UART?

You may have a look here:
http://playground.arduino.cc/Learning/OneWire

Robert
11  Using Arduino / Networking, Protocols, and Devices / Re: Arduino->Processing wireless Serial CRC/ACK on: February 01, 2013, 02:01:39 am
Thanks a lot. But I think a full TCP protocoll might indeed be overdone. :-)
12  Using Arduino / Networking, Protocols, and Devices / Arduino->Processing wireless Serial CRC/ACK on: January 31, 2013, 04:55:18 am
Hi,

I want to wirelessly transfer a larger amount of data (camera picture from a Hacrocam) from my arduino mega to my PC (processing). I use XRF modules (XBee like UART <-> RF devices). There are some transmission errors and the XRFs don't offer any retransmit mechanisms. So I need to implement them myself.

I wonder if someone implemented something like this before and could share its experience and/or code.
I found this link: http://hacromatic.com/blog/2012/08/make-your-serial-protocol-robust-with-8-bit-crc-codes/ which might be a good start.

Thanks
Robert
13  Using Arduino / Networking, Protocols, and Devices / Re: nRF24L01 serial like synchronous bi-directional communication on: January 29, 2013, 01:24:33 am
I mainly used it to steer a robot. I used one Arduino on the PC, and one on the robot.
The one on the PC acted as controller for the NRF. At the same time I can unhook the controller on the PC and can use physical control (joystick, buttons) to control the robot.

The communication was manly based on predefined message patterns. Like D:100 is: go forward 100cm. For the manual/physical control it's then a simple F: to go forward until the stop message arrives.
14  Using Arduino / Networking, Protocols, and Devices / Re: nRF24L01 serial like synchronous bi-directional communication on: January 25, 2013, 03:33:23 pm
That's how it was meant :-)
With this you can send instaructions to both involved arduinos. In addition you can use them as wireless serial adapter.
15  Using Arduino / Networking, Protocols, and Devices / Re: nRF24L01 serial like synchronous bi-directional communication on: January 25, 2013, 05:53:58 am
:-) That was easy then.
I hope my code works, if there is a problem, just let me know.

Robert
Pages: [1] 2 3 ... 8