Show Posts
Pages: 1 [2]
16  Using Arduino / Project Guidance / Re: Feasibility analysis for check with ccd line sensor on: November 07, 2011, 01:58:27 pm
Quote
This will not be possible, cause the speed of the parts may change over the time, and it will not be possible to move the sensor mecanically at every speed change.
I am not sure you understood this point as that response makes no sense. I am not suggesting any mechanical movement of the sensors, I was suggesting a method of reading in two bits simultaneous. This uses only software.

Hi Mike,

sorry for this mismatch, this is the result if one (I) is doing several thing at the same time. Shame on me.  smiley-sad smiley-red

My answer was relatet to a sentence from Chris from the previous post
Quote
If you mean simultaneously, probably not with an arduino.  However, 2msec is not a lot of time to wait.  If the parts are moving, placing the two sensors at an offset could do the trick.

Sorry for this.

Regarding your proposal I will check more in detail, cause it's indeed a possibility to compare both signals.

Once again sorry for the mismatch and thanks for your comments.
17  Using Arduino / Project Guidance / Re: Feasibility analysis for check with ccd line sensor on: November 07, 2011, 02:55:14 am
Thanks for your comments.

Means that there are still some problems challenges.


Quote
Quote
a)   Are there CCD (or CMOS) line sensors on the market which are giving a 1bit output per data element? I need only digital output (material present or not, black or white). This will eliminate the need of A/D converter, which will help for speed.
Not that I know of.  The barcode sensors are not color, but they are greyscale, giving
an analog reading for each pixel.  It's easy enough to convert to bits in software, but like you said, the A/D conversion is a bottleneck.  It might be possible to use a fast external A/D converter - I haven't looked into that.  Or maybe some kind of comparator.

Ok, this means I have to go deaper in A/D converter or comparator. But it seems that there are some very fast A/D converter available.


Quote
Quote
c)   what is the speed of
      a.   serial transmission of these sensors to the µ-Controller
      b.   time of acquisition of the complete line
a) about 1 Mhz.
b) a couple of milliseconds

Quote
d)   what kind of µ-Controller will I need to realize this. I presume that the Arduino is not the right one. Or?
With an arduino is it barely possible, due to clock speed.  Something with a (much) faster clock would probably be easier.  I don't know what to recommend.

Quote
e)   Is it possible to read the two line sensors at the same time? This is necessary as the parts cannot be stopped during the control.
If you mean simultaneously, probably not with an arduino.  However, 2msec is not a lot of time to wait.  If the parts are moving, placing the two sensors at an offset could do the trick.

This would be a tough project to implement on an arduino.

So, looks like I have to wait for the Arduino Due, or perhaps switch to another µ-controller. Will first establish the outline of the data acquisition before going further on this point.


Quote
Quote
what kind of µ-Controller will I need to realize this. I presume that the Arduino is not the right one.
Well with 2048 pixels then you don't have enough memory, bit if you convert this to a bit before you store it you can store all the data. I have use sensors like this on the old BBC micro and that uses a processor of the same sort of power as the arduino.

Interessting point. This will divide by 8 the data. Thanks for this hint.


Quote
Quote
Is it possible to read the two line sensors at the same time?
If you have a voltage comparator on the output of the sensors you can read two bit in at a time by using the port manipulation method, but there should be no need to.
 

This will not be possible, cause the speed of the parts may change over the time, and it will not be possible to move the sensor mecanically at every speed change.


Thanks a lot for your input. Will go ahead with my analysis (for the time being on a theoretical basis), but hopefully one day there will be a realisation on it.

Cheers.
18  Using Arduino / Project Guidance / Feasibility analysis for check with ccd line sensor on: November 04, 2011, 07:47:08 am
Hi all,

I'm actually thinking about a project (very early status), which I want to realize:

Target :
check whether  a repetitive geometry in a endless metallic strip (stamped) is equal between two geometries.

Today's status :
Two photosensors with digital output fixed in a defined distance are looking on a part. The distance between both photosensors is exactly the pitch of the geometry, means that both photosensors should see always the same (digitally 0 or 1).
The part is in movement with a maximum speed of 15,3 m / min (= 254 mm / sec).
With the photosensors I control one point (two points if I add another pair of photosensors) within the geometry.
Check is done with Arduino, very simple logical comparison of the two signals from the photosensors, with a given tolerance (time during which a difference is allowed). One check cycle takes appr. 10 µ sec, means at maximum speed I have a resolution in the range of 0.002-0.003 mm.

Project:
Instead of using photosensors (and with this control only 1 point of the part) I have now the idea to use 2 ccd (or CMOS?) line sensors to check one line (40 mm max) with 2048 points(?)  at once. For sure with this the logical comparison becomes much more complicate (tolerance has to be not only in X-axis (sense of material flow), but also in Y-axis (over the width of the line sensor) and also the acquisition of the data from the sensors will take much more time (serial transmission between sensor and µ-Controller).
If we say that we want to check a range of 40 mm, and the sensor has 2048 (??) Elements, I will get an accuracy of 0.02 mm, which seems enough for the time being.
If we want to have the same accuracy (to be discussed) also in x-direction, means that we have to do a check every 79 µ sec.
Questions:
a)   Are there CCD (or CMOS) line sensors on the market which are giving a 1bit output per data element? I need only digital output (material present or not, black or white). This will eliminate the need of A/D converter, which will help for speed.
b)   How many elements do these sensors have? Is my assumption of 2048 realistic?
c)   what is the speed of 
      a.   serial transmission of these sensors to the µ-Controller
      b.   time of acquisition of the complete line
d)   what kind of µ-Controller will I need to realize this. I presume that the Arduino is not the right one. Or?
e)   Is it possible to read the two line sensors at the same time? This is necessary as the parts cannot be stopped during the control.

I know this is a huge project, for sure far beyond my actual capability in electronics, but if the feasibility is assured I can go ahead with help of some professionals.

Thanks for your comments

Jens
19  International / Français / Re: Acheter attiny45/85 a paris ou online ? on: October 13, 2011, 04:03:30 am
Je viens de trouver www.futurlec.com.

Attiny45 pour US$ 1.90 + US$ 4.00 pour la livraison.

Je ne les jamais tester, mais ils me semblent assez intéressantes, aussi pour d'autre composants.


20  International / Deutsch / Re: Brauche Hilfe bei Bitweise rechnen on: March 25, 2011, 04:06:54 am
Moin,

so, ich habe jetzt mal nen schnellen Vergleich gemacht, und wenn auch der Unterschied beeindruckend ist, die wirkliche Überraschung ist die absolute Geschwindigket.

Folgende Konfiguration:

Arduino UNO.

Test Programm 1:
Code:
#define SENSOR1 2
#define SENSOR2 3

long starttime;

void setup(){
 Serial.begin(9600);
}

void loop(){
  starttime = millis();
  for (int i=0 ; i < 10000 ; i++){
    if (digitalRead(SENSOR1) != digitalRead(SENSOR2)) {
//      Hier kommt später ne Verzögerung rein, um zu prüfen, ob die Ports auch nach x Microsekunden noch unterschiedlich sind
      if (digitalRead(SENSOR1) != digitalRead(SENSOR2)) {
//        Aktion wenn auch nach x Microsekunden unterschiedliche Signale vorliegen
      }
    }
  }
  Serial.println(millis() - starttime);
}



Test Programm 2:
Code:
long starttime;

void setup(){
 Serial.begin(9600);
}

void loop(){
  starttime = millis();
  for (int i=0 ; i < 10000 ; i++){
    port = PIND;
    if (bitRead(port,2) != bitRead(port,3)) {
//      Hier kommt später ne Verzögerung rein, um zu prüfen, ob die Ports auch nach x Microsekunden noch unterschiedlich sind
      port = PIND;
      if (bitRead(port,2) != bitRead(port,3)) {
//        Aktion wenn auch nach x Microsekunden unterschiedliche Signale vorliegen
      }
    }
  }
  Serial.println(millis() - starttime);
}

Ergebnis:

Die 10000 Durchläufe schafft das erste Programm (digitalRead) in 171 Millisekunden (= 17 Mikrosekunden / Durchlauf), während das zweite Programm (PIND) die 10000 Durchläufe in nur 24 Millisekunden (2.4 Mikrosekunden / Durchlauf) schafft.

BEEINDRUCKEND!

P.S. Die 17 Mikrosekunden im ersten Programm entsprechen übrigens den 0.004 Millisekunden, die MaFu vorher genannt hat: In meinen Versuch sind 4 DigitalRead für eine Schleife nötig, d.h. der einzelne DigitalRead benötigt tatsächlich 4 Mikrosekunden.
Da im zweiten Beispiel nur zwei Auslese Befehle nötig sind, heisst dies, dass die PIND Konstellation ca um den Faktor 4 schneller ist als DigitalRead (und nicht Faktor 20 wie ich irgendwo gelesen habe).

Auf jeden Fall steht fest: Bei diesen Geschwindigkeiten  brauch ich mir diesbezüglich keine Sorgen machen, und Hardwarelösungen sind auch nicht nötig.

Alles in allem: Arduino rocks!  Cheers.
21  International / Deutsch / Re: Brauche Hilfe bei Bitweise rechnen on: March 23, 2011, 04:43:35 am
Hallo MaFu,

danke für die Info. Komme leider erst am Wochenende dazu, meine Versuche zu machen, aber werde auch mal ein paar Versuche fahren, in denen ich die Schleife ein paar tausendmal durchlaufen lasse und die Zeit messe.

Werde berichten, wenn Werte vorliegen (vor allem der Vergleich zwischen digitalRead und PINB).

Bis denn.

Jens

PS: Deine Projekte sind Klasse.

22  International / Deutsch / Re: Brauche Hilfe bei Bitweise rechnen on: March 22, 2011, 11:54:33 am
Hi,

danke für den Tip, aber leider geht es nicht mit nem Gatter, da ich eine (einstellbare) Toleranz haben muss, d.h. eine gewisse Zeit (einige mikrosekunden, muss einstellbar und variabel sein) darf ein Unterschied vorhanden sein, bevor entweder wieder gleiches Signal vorliegt, oder ein Signal gegeben wird.

Trotzdem danke.
23  International / Deutsch / Brauche Hilfe bei Bitweise rechnen on: March 22, 2011, 07:41:47 am
Moin,

fange gerade an mit dem Arduino rumzuspielen (und bin begeistert).

Für ein Projekt möchte ich nun sehr schnell zwei digitale Eingänge einlesen und nur prüfen, ob die beiden Signale gleich sind (beide HIGH oder beide LOW, sonst Signal) (Einlesen und Auswerten sollte weniger als 0.1 Millisekunden in Anspruch nehmen).

Habe gesucht und gefunden, dass der Befehl PINB das Einlesen um den Faktor 20 (?) schneller macht.
Mein Problem: Wie kann ich jetzt einfach (und schnell) prüfen, ob die zwei Ports (=Bits) gleich sind? Dies ist doch bestimmt über einen bitweisen Vergleich machbar oder? (meine Güte ist der Physik Leistungskurs lange her ...... )

Danke für Hilfe.

Gruß aus Frankreich

Jens
Pages: 1 [2]