Show Posts
Pages: 1 ... 40 41 [42] 43 44 ... 68
616  Using Arduino / Programming Questions / Re: Dimming - what equation do you use to make dimming look linear to human eye? on: August 04, 2012, 01:12:12 pm
As far as I know, the human eye has a log10 for light intensity.
I think that's in the formula by x^10.

But there is a lot written about, with a lot of different calculations.
Even in this forum:
http://arduino.cc/forum/index.php?topic=69083.0
I looks to me that at the end, it's all in the eye of the beholder.
617  Using Arduino / Sensors / Re: Help needed with the MPU-6050. on: August 04, 2012, 04:37:41 am
The sketch compiles for a Duemilanove (both ATmega328 and ATmega168), but you have to update to the new Arduino 1.0.1 !

If you are new to I2C, try the i2c_scanner first : http://arduino.cc/playground/Main/I2cScanner
618  Using Arduino / Sensors / Re: Help needed with the MPU-6050. on: August 04, 2012, 03:43:48 am
The 'F()' only places the string in code memory (in flash), instead of RAM.
So if it is not working, just remove it like this: Serial.println("InvenSense MPU-6050");

If there is a problem with my sketch, I want to fix it!
Have you changed something in the sketch ?
Which Arduino board do you use ?
Are you using the newest Arduino. Version 1.0.1 ?
619  Using Arduino / Sensors / Re: Arduino and 433mhz receiver on: August 03, 2012, 06:38:36 am
I don't know, but I ordered that same receiver a few days ago for the same purpose. I also want to know the status of our alarm sensors.
620  Using Arduino / Sensors / Re: Arduino and 433mhz receiver on: August 02, 2012, 04:30:37 pm
There are chips for that with a certain protocol.
I doubt if the Arduino is able to recognize that.
I have looked for it myself, but have not found it yet.
621  Using Arduino / Sensors / Re: TCRT5000 + TLC5940 + Beer Pong on: August 02, 2012, 04:27:29 pm
You moved the sensor also to 12V, that's good. According to the datasheet the TCRT5000 can have 70V at the collector.

Resistor R3 and R4 don't have to be 6k1. They could be 10k or 22k or so.

I'm still not happy with it that the Op Amp is used to drive a rather large current.
At 12V, you could use CMOS logic, like the CD40106, instead of the Op Amp. In that case you would not need R3 and R4.
The CD40106 could drive a P-channel MOSFET for the leds.

622  Using Arduino / Sensors / Re: TCRT5000 + TLC5940 + Beer Pong on: August 02, 2012, 07:15:05 am
The voltage over a blue led is mostly about 2.8 to 3.6 Volt.
If you use 3 blue leds in series, you can't use +5V anymore.
Do you also have +12V ?
With +12V a single PNP transistor to supply current to the leds can't be used anymore. You need two transistors. And if you have two transistors, you could remove the Comparator.
623  Using Arduino / Sensors / Re: TCRT5000 + TLC5940 + Beer Pong on: August 02, 2012, 04:10:54 am
I hope someone else have a good idea how to do this easier.
My idea is to use an ATtiny per cup and with resistors for the leds.

Your explanation is even more confusing for me.
3 leds per TLC input -> output ?
Cathode to sensor -> anode ?
http://en.wikipedia.org/wiki/Light-emitting_diode
Perhaps adding a PNP transistor (and a resistor to the base) after the comparator will be enough to make it work. Although I still don't understand what you want the result to be.
624  Using Arduino / Sensors / Re: TCRT5000 + TLC5940 + Beer Pong on: August 02, 2012, 02:06:42 am
The TLC5940 has a BLANK input, to switch off the leds. That should be used to switch the leds on and off.

Allthough the LM324N can output about 40mA, it is not ment to do that.
It is also a Op Amp, and you need a comparator instead of a Op Amp.
If you need to drive current, I think you better use a comparator with transistors. Or use only 1 or 2 transistors, without comparator.

But if you use the BLANK input, just a comparator (or even the LM324N) is okay.

The TCRT5000 can have 60mA for the led (IF), but the normal forward current for the the led of the TCRT5000 is 10mA. The forward voltage drop is 1.1V at 10mA. So (5V - 1.1V) / 10mA = 390 Ohm.
With the 100 Ohm in the schematic, the IF current for the TCRT5000 led is about 39mA, so that's okay.
625  Using Arduino / Sensors / Re: MPU 6050 Breakout board [HELP] on: August 01, 2012, 05:18:01 pm
To test it, you could use delays of 500ms.
Without the delays the servo gets the jitter, and the jitter is positioning it between 0 and 180.

Use my libraries? I don't know.
You need this guide, but that's still too complicated for me : http://arduino.cc/forum/index.php/topic,58048.0.html

You could reduce the sensitivity. In my sketch with writing to a register of the sensor, or with the functions of the Jeff Rowberg library.

You are not the only one that wondered about the raw values, so I added my own measurements from my sketch to the page about the MPU-6050: http://arduino.cc/playground/Main/MPU-6050 (in the "Measurements" section).
626  Using Arduino / Sensors / Re: MPU 6050 Breakout board [HELP] on: August 01, 2012, 01:26:57 pm
The raw values of my sketch look good.
The raw values do change, that's why some filtering or averaging is always needed.
So I guess that Jeff Rowbergs values are also good.

The gyro drifts, the accellerator jitters, it's all normal. Remember they are 16-bits values, a change of 50 is very little.

But the Jeff Rowberg library needs an interrupt.
The FIFO of the sensor is only read by the Arduino if the sensor signals an interrupt to the Arduino.
I think that the library uses INT0, pin 2.
http://arduino.cc/it/Hacking/PinMapping168
So you have to connect the 'INT' of the sensor breakout board to pin 2 of the Arduino.

So nothing is wrong, you are getting there.
627  Using Arduino / Sensors / Re: HELP: tri axis Accelerometer KXPB5 to arduino pin on: August 01, 2012, 11:58:07 am
According to the datasheet, also S0, S1, Aux_in, PD, ST should be tied to ground if they are not used.

You could tilt the sensor 90 degrees to the right, to the left, forward, backward and upside down. Do the values change ?
628  Using Arduino / Sensors / Re: MPU 6050 Breakout board [HELP] on: August 01, 2012, 11:55:16 am
Can you show a number of values ?
The sensor is 16-bit and very sensitive. If I put it on the table, the computer on my table causes vibrations (which I don't feel) that makes the values noisy/jitter. If I place the sensor on concreet, the values still do that, but not as much.
629  Using Arduino / Sensors / Re: HELP: tri axis Accelerometer KXPB5 to arduino pin on: August 01, 2012, 07:00:25 am
Did you look at the links. And did you read the datasheet of the sensor ?
I can read the datatsheet for you, and write what's in there, but you have to read it yourself.

There are two versions :
 - KXPB5-2050  (with analog outputs)
 - KXPB5-2353  (with digital interface SPI)

If the photo in your first post is the breakout board you have, you have the version with the analog outputs.
This pins are shown in Table 4 of the datasheet.
VDD = 3.3V  (the sensor is made for 3.3V but also 5V is allowed)
GND = GND
Vmux : this is a outputs, don't connect it.
S0, S1, Aux_in, PD, ST : connect to ground.
X_output, Y_output, Z_output : connecto to three analog inputs of the Arduino, like A0, A1, A2.



Next time, if you want to buy a sensor, check out these sites:
 - http://www.sparkfun.com/
 - http://adafruit.com/
630  Using Arduino / Sensors / Re: Led light sensor help... on: August 01, 2012, 04:24:47 am
There is no advantage of a digital input over an analog input.
But it is possible, and I used my analog inputs for other things.

To know the time, an interrupt intput could be used or the pulseIn function : http://arduino.cc/en/Reference/pulseIn
But I did a loop with to test if the input changed.
It turned out that my led needed somewhere between 4ms (very light) and 1200ms (very dark) to get rid of the charge.
Pages: 1 ... 40 41 [42] 43 44 ... 68