Show Posts
Pages: 1 ... 13 14 [15]
211  Using Arduino / General Electronics / Re: how to do independent multiple analog read out ? on: June 25, 2012, 06:49:55 am
Well i tried to do a few things

  • i tried to do double reads but only use the second read
  • above with a delay(50) in between switching different analog read pins
  • two resistor in series and place a condensator on top of each for the 5v input
  • combined above and do like 60 readings and take the average
  • If i use a single LDR its seams all a bit more stable. (but i want to compare 2 light sources)
for the two resitors part i didnt have the right resistors en condensators as adviced here
I used two 470 ohm resistor and a elco 4.uf 25v instead (it seams to have a small impact)

However my readings still variate a lot under daylight conditions
what i also notice that while these LDR's are sensitive to light
there is not that much difference to notice when i put something black in front of single a ldr.
Well there is a difference, but its a bit hard to detect bewteen the chaotic swinging non constant readouts
Statistics might perhaps filter the differences out, but i myself have to look hard to see the difference
It not like :
ldr1  ldr2
100 - 800

Just to be sure this is the schematic i use now


Well I guess i need to buy a DMM to check how these LDR's behave, i put it on my shopping list
212  Using Arduino / General Electronics / Re: how to do independent multiple analog read out ? on: June 24, 2012, 05:23:08 pm
However there was no electric light it happened with daylight and the constant swing was very unstable
Now the swing seams a bit more stable, i guess because its darker now here.

I got their values and calculated difference transmited  over serial here
pin2 - pin3
174 - 413   dif = 239
174 - 213   dif = 39
175 - 184   dif = 9
415 - 392   dif = 23
417 - 401   dif = 16
392 - 391   dif = 1
380 - 419   dif = 39
393 - 382   dif = 11
370 - 178   dif = 192
250 - 248   dif = 2
252 - 269   dif = 17
289 - 272   dif = 17
268 - 260   dif = 8
250 - 250   dif = 0
255 - 255   dif = 0
113 - 353   dif = 240

The LDR's goes by a cryptic LDR-03-51 it is a can be found here http://www.dickbest.nl/index.php?_a=viewProd&productId=1400, i bought them just to have some input device, but i couldnt find a datasheet about them, i think dough they are pretty common i've seen them before.
Both LDR's point in the same direction

( its a relief to me that you tell me the diagram isnt wrong btw, i've been thinking a lot why i get these readings, i doubted the diagram).
213  Using Arduino / Sensors / Re: book "getting started with arduino" wrong schematic inside ? on: June 24, 2012, 04:03:55 pm
yes but there is one ground also... so through ground it all gets connected

?

i tried this today

but hat didnt work either, for to me unknown reason the analog readout of 2 and 3 kept in a swing up and down, i wanted an independent readout
214  Using Arduino / General Electronics / Re: how to do independent multiple analog read out ? on: June 24, 2012, 02:44:24 pm
yes
215  Using Arduino / General Electronics / how to do independent multiple analog read out ? on: June 24, 2012, 01:36:11 pm
Today i created a schematic which i've drawn here 

(image uploaded from my phone to dropbox public folder)

The problem my analog readings seams to swing up and down with this,
while the light doesnt change.

I would like to use the arduino as a sensor unit, but ... i'm failing to add more then one sensor
I wouldlike to add more sensors (more then 2)
Obviously my wiring diagram is wrong .. but then how should it be ?

I'm a newbie, i hope you can make a simple drawing too so i can understand it better.

216  Using Arduino / Programming Questions / Re: Serial communication USB using C# (Visual Studio) on: June 23, 2012, 04:19:32 pm
ehm.. serial.print    vs    serial.println("your complete string here");   // will send it as a whole string on a a line and sends cariage return   

 smiley-roll-sweat?
217  Using Arduino / Sensors / Re: book "getting started with arduino" wrong schematic inside ? on: June 23, 2012, 04:04:30 pm
but wouldnt that be like this ?

   5v  --ldr 2 ---analog 1 --|
--|                                 |---1K ohm -- ground
   5v  --ldr 1 ---analog 0 --|


so you get strange combinations of 3 resistors and have bot ldrs connected
i like to get readings of 2 sensors to measure


or maybe i dont get the idea of voltage devider..?
218  Using Arduino / Sensors / Re: Photo Interrupter, high readings, low variation on: June 23, 2012, 03:56:36 pm
ehm i'm a beginner to arduino, but a handy programmer
you like the output to be down, and up once in a while ?

Hm besides that i think you would find this command interesting in Arduino
 duration = pulseIn(pin, HIGH);  // minimal measurement time is about 30  ~ 50 micros = ..?. HZ = ..?. RPM

if would measure the microseconds of how long you have a high signal or the time of a rotation,
wich you might calculate as RPM and return to your computer over serial

another way to solve it might be

trigerval = 960;
val = digitalRead(inPin); //usualy a high value
if (val < trigerval){  dostuff() ;} else{ donothing() ;}


Notice however the speed of your arduino (16 mhz?) and the speed of your code, if your motor goes to fast, you might get strange reading
because the dostuff() takes longer then a cycle of your motor
i once made a program that used a timer delay value based on a LDR and then report it to my computer; in my case the arduino had no problem, however the serial connection of 9600 baud wasnt fast enough to keep up with my program loop and so the com3 connection got lost.
what i mean to say the things you measure should be in within working bounderies or you get strange readings
219  Using Arduino / Sensors / book "getting started with arduino" wrong schematic inside ? on: June 23, 2012, 03:28:47 pm
The book getting started with arduino contains on page 65 a drawing on how to connect an arduino for serial input
I am not deeply into electronics but to me this drawing seams wrong, the reason i conclude that is, the Arduino has 4 anolog inputs
the way it is connected here would not allow to add more analog inputs see :


So what i am thinking is was the wiring sketch to the LDR crossed perhaps ?.
If i want to use 2 LDR's should i then use :

   5v --LDR (2)-----------analog 1
   |                                   
--5v --LDR (1)-----------analog 0
   |
   5v - resistor 1Kohm---- ground

i'm not entirely sure i or why there should be a 1K ohm between 5v and ground, maybe its for protection, i dont know why the book uses one
well maybe someone can enlight me on this on how to connect multiple analog sensors in a schematic
Pages: 1 ... 13 14 [15]