Logic Analyzer Kingst LA1002 question

Hi all,

i have a very simple question,

i just bought the above mentioned logic analyzer, and i had hoped it would have been so simple to view if a digital pin receives a HIGH or a LOW signal.

i just came to the conclusion that i will take more than that to view this.
i was at first aming to read a photocell NPN NO, this type gives a LOW when the beam is broken, and stay's HIGH when there is no obstruction between the beam and the reflector.

nothing worked for me,

this LA comes with some fancy free software, with loads of protocols that can be read, but i did not find what i needed.

is it in any way possible to monitor photocells (or a digital input pin - HIGH or LOW) with logic analyzer?

i connected te GND of the photocell (and later on the GND of the arduino UNO R3) to the GND connection of the LA1002.
then i connected the signalwire of the photocell to channel0 of the LA (no pulses to be vieuwed :frowning: )
i then did the same with the arduino pin (Pin 7) to channel0 and GND to GND

what could i possibly have done wrong?

Thanks in advance,
Yves

Firstly, congratulations on buying a logic analyser, if everyone did that we'd have half as many questions here.

If you have a digital signal in the correct voltage range you can read it with an LA, that's their whole purpose in life.

Maybe your LA is faulty, run the blink sketch and verify that it works by looking at the signal on pin 13.

Also, do you have a pullup resistor on the output of the sensor, it sounds like it's an open collector and if so it will need one.

The point about a logic analyser is that it needs to be triggered before it can capture data. It sounds like you are not setting the trigger conditions correctly.

Hi,

i just tested with a pull-up of 10K, and set the trigger value to 50%

LA1002 with NPN NO sensor.png

and i got a signal !!! :slight_smile:

now trying to do the same with the UNO output (with a pull-down i suppose? - 1K)

Grtz,
Yves

Hi,

now tested with the UNO to send a HIGH to the MEGA
Uno R3 to LA1002.png

/*
* Basic code for the first UNO(1)
* date : 15/08/2016
*/
volatile unsigned long timeStamp = 0;

void setup() {
//  Serial.begin(250000);
  pinMode(2, INPUT_PULLUP);
  attachInterrupt(0, pollS1, FALLING);
  pinMode(8, OUTPUT);
  digitalWrite(8,LOW);

}

void loop()
{
}

void pollS1() // ISR to send a signal to the MEGA 1 - this MEGA will start a light sequence
{
  if ( micros() > timeStamp)
  {
  digitalWrite(8,HIGH);
//  Serial.println("signal!");
  timeStamp = micros() + 1000;
  digitalWrite(8,LOW);
  }
}

the ISR took 7.5 µsec to execute

but strange, the pulse from the UNO was earlier than the pulse from the sensor ???

sensor + UNO R3.png
how is this possible???

Grtz,
Yves

how is this possible

Well it clearly is not possible, so maybe the display has time scrolling from right to left, I have seen that on some instruments.

Hi Grumpy_Mike,

switched both channels tonight, and the outcome is the same...
then tested multiple beam breaks, and the display is from left to right in the timeline... :slight_smile:

could it be because of the resistors?? I don't think so, but i'm not sure of that in fact...

there was a time gap of approx. 19 millis between the signal from the sensor itself and the high state of the outputpin of the UNO....

Grtz,
Yves

10ms is on the right side of the screen and 90ms is on the left side.

.

LarryD:
10ms is on the right side of the screen and 90ms is on the left side.

That is in effect what I said.