Show Posts
Pages: 1 ... 57 58 [59] 60 61 ... 68
871  Using Arduino / Sensors / Re: Please help me on this sensor on: May 15, 2012, 08:08:55 am
A IR phototransistor receives a 'beam', the ldr captures light from around.
You need both the IR sender and the IR receiver to have a 'beam' to 'look' inside the thumb.

An cadmium sulphide ldr is not sensitive for infrared. It's sensitivity is less than 10% for infrared.
A ldr is not very responsive, it can capture 10Hz maximum, but only poorly.
872  Using Arduino / Sensors / Re: Please help me on this sensor on: May 15, 2012, 04:01:39 am
First of all, stay cool. We're here to help.

It could be an infrared led combined with an infrared sensor (phototransitor or photodiode).
Google for [infrared tranmittor receiver] or [infrared reflective sensor]

Most people use a seperate IR led and IR sensor.
Like in these projects:
http://embedded-lab.com/blog/?p=1671
http://suchamagicworld.blogspot.com/2008/04/still-alive-heartbeat-irsensor-report.html
http://www.next.gr/inside-circuits/heartbeat-monitor-l7125.html
873  Using Arduino / Sensors / Re: 4-20 ma sensor reading on: May 15, 2012, 03:38:06 am
Normally 1k to 10k is used for a protection resistor. Since you use 12V: (12-5) / 1k = 7mA maximum. So 1k would already be enough.

I ment, sending it with Serial.println as an integer.
The return value of analogRead is an integer (it's the raw value of the ADC, 0...1023), so just send that.
Once you get normal readings, you can do the calculation with floats.

The "everything_is_ok" was just an example. If you are able to detect if the sensor is working, you can add this. Nothing special, just something that came to mind.

You see, once you know a little more, it's not that hard.
874  Using Arduino / Sensors / Re: 4-20 ma sensor reading on: May 15, 2012, 02:20:08 am
Thanks for your drawing!

This one is about that:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1292955787

This one has a picture, and there is a protection resistor of 10k:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1283882387

If the 250 Ohm was not connected by accident, the input pin might have been blown.
Can you add a protection resistor of 10k in series to the analog input, and use a different analog input?

The buffers in your code are too small.
This will mess up your variables on the stack:
Code:
char valadc[4] = "0";       // 4 characters
char pres[4] = "0";
...
dtostrf(val, 4, 0, valadc);  // width is 4 plus terminator is 5 !

A string is ended with a string-terminator, also called zero-terminator or '\0'.
I also prefer to initialize the string in the program (but that's just me, ignore it if you like).

During development, send it back as an integer.
You can use floats if that is working.

You need something like this:
Code:
char valadc[20];       // buffer, large enough
char pres[20];
...
  if (everything_is_ok)
  {
    val = analogRead(analogpin);
    Serial.println(val, DEC);
    // do some calculation: sensor = ((double) val - offset ) * gain
    dtostrf .....
  }
  else
  {
    strcpy (valadc, "INF");      // "INF", or "not valid", or "0"
  }
}
875  Using Arduino / Sensors / Re: Interface Arduino with GPS, accelerometer, gyro, magnetometer, barometer on: May 14, 2012, 03:48:23 am
Just some extra information for who is reading this thread:

There are boards with gyro, accelerometer, magnetometer, and pressure sensor.
They are used in RC plains and helicopters.
The only thing to add is a GPS module.

This one on Ebay: http://www.ebay.nl/itm/Mini-9-DOF-IMU-with-BMP085-Pressure-Sensor-Use-with-Arduino-Pro-Mini-/200735690678?pt=LH_DefaultDomain_0&hash=item2ebcc78fb6

You can find more if you google: [9dof baro*] or search for [10dof]

If just found some boards that has also GPS. Search for: [11dof]
876  Using Arduino / Sensors / Re: 4-20 ma sensor reading on: May 13, 2012, 06:06:33 pm
250 Ohm is very low.
Which sensor are you using ?
877  Using Arduino / Motors, Mechanics, and Power / Re: Adafruit Motor Shield code help! on: May 13, 2012, 02:36:09 am
I read that some people reverse the direction for a short time to make a quick brake.
But I have not tried that myself. About 10 microseconds? I would start with 500 milliseconds.

The battery pack doesn't have anything to do with the current through the motors. You have to measure the current through the motors.
878  Using Arduino / Motors, Mechanics, and Power / Re: Adafruit Motor Shield code help! on: May 12, 2012, 02:43:59 pm
The RELEASE command will release the voltages, and let the motor come to a stop by itself.
The BRAKE command is not yet implemented by the AdaFruit library, so use the RELEASE for a stop.
Since the L293D uses transistors instead of mosfets, it can't do a nice 'brake' to stop the motor anyway.

10V is no problem. The L293D is limited for the current. It can only do 600mA continuously.
You could measure the current of the motor, and block the motor to see it the current increases.

Once you have it running, even a motor of 200mA will heat up the L293D driver, that's normal.

879  Using Arduino / Networking, Protocols, and Devices / Re: Using the MISO pin when SPI in use on: May 12, 2012, 02:18:19 pm
Explain "SPI is enabled".
Directly on the ATmega chip, or using a library function ?
880  Using Arduino / Networking, Protocols, and Devices / Re: I2C problem (communication stop after like 3 seconds) on: May 12, 2012, 02:16:47 pm
With different drivers I ment for example mixing the Wire library with other libraries for i2c that use their own code.

So you use the Wire library for everything? That's good.

I assume you have the power supply at the ITG decoupled with 100nF, and have also the other capacitors for the ITG sensor. And the AD0 is connected to ground. Did you accidently connect the interrupt output, or is it shortcut to the SDA line ?

The MD25 will turn the motors off for safety, if there is no i2c communication (with the MD25) for two seconds.
So it seems that the ITG3200 blocks the i2c-bus, and the MD25 turns the motors off for safety.

My best guess would be that it is a software problem in the i2c communication with the ITG3200.

I found libraries for the ITG3200 here:
- http://code.google.com/p/itg-3200driver/
- http://awesomecopter.nl/?tag=itg-3200
- http://www.varesano.net/blog/fabio/my-first-6-dof-imu-sensors-fusion-implementation-adxl345-itg3200-arduino-and-processing
Or did you write your own code ?
881  Using Arduino / Networking, Protocols, and Devices / Re: I2C problem (communication stop after like 3 seconds) on: May 12, 2012, 10:48:37 am
Thanks for all the information.
As far as I can tell, there's nothing wrong with it.
I got a lot of comment on this page: http://arduino.cc/playground/Main/I2CBi-directionalLevelShifter
But it's good to see you try to do the right thing.

Do you use the Wire library?
I hope you don't mix two I2C drivers.
Do you use a library for the ITG3200 ? Perhaps there's an error in the library leaving the I2C-bus in a undesired state.

Perhaps you could add a delay in the software, after you communicate with a I2C device.

Or you could try a test:
Communicate with the ADXL345 and the MD25.
After that communicate with ITG3200 and the MD25.

So you have to do some test, since the problem is not obvious.
It could also be a bad power supply, or a bad connection somewhere.
882  Using Arduino / Sensors / Re: Old Mouse Phototransistor on: May 12, 2012, 08:34:18 am
Can you find a mouse with the same photodiode/phototransistor ? And do some reverse engineering.
883  Using Arduino / Motors, Mechanics, and Power / Re: Adafruit Motor Shield code help! on: May 12, 2012, 02:12:06 am
Sure, that's what the motorshield is for!

You have to create multiple classes during initialization: http://www.forums.adafruit.com/viewtopic.php?f=31&t=16928

There's one more thing to know about the motorshield: You can piggy-back extra L293D on top of the others to increase the maximum current: http://blog.tinyenormous.com/2010/06/23/how-to-piggyback-driver-chips-on-ladyadas-arduino-motor-shield/
884  Development / Other Software Development / Re: Wire library enables internal pull-ups -> bad for 3.3V I2C devices. on: May 11, 2012, 03:08:01 pm
I have changed a lot in the page about level shifting: http://arduino.cc/playground/Main/I2CBi-directionalLevelShifter

Everyone should be happy with it now, it is informative and practical and compleet. I think there's no need to make big changes anymore.

I still think that the Wire library should have an option for the internal pull-up resistors though.....
885  Development / Other Software Development / Re: Wire library enables internal pull-ups -> bad for 3.3V I2C devices. on: May 11, 2012, 09:05:57 am
Because one of the advantages of I2C being open-drain is that, you can just use a pull-up resistor to 3.3V instead of 5V, thus you don't need the level shifter

But not according to many datasheet.
It is not just open-drain, it is also an input. And that input is not tolerant for higher voltages on many components.

Or is this about using a 5V i2c component on the same bus as the 3.3V components, with pull-up resistors of 4k7 to the 3.3V ?
Pages: 1 ... 57 58 [59] 60 61 ... 68