|
Command "Write Light Gate Threshold" doesn't work 1 Year, 5 Months ago
|
Karma: 0
|
|
Hi everybody,
I'm using the ZMOTION Detection Module ZEPIR0AAS02MODG and trying to get a communication with a microcontroller via serial interface mode. I tried to send several commands, the sensor seems to reply correctly with the required value or with an ACK.
However, when I send the command "Write Light Gate Threshold" ('L', 0x4C), the sensor looks to get crazy, sending a bunch of useless values over the serial line. (I checked with an oscilloscope, the values are really sent out of the sensor.)
Here's exactly what happens:
- My controller sends 0x4C
- Sensor replys with the current light threshold (so far OK)
- Sensor sends another frame with the current light threshold! (doesn't match the datasheet)
- Sensor sends dozens of 0x00 'NUL'
- My controller sends regardless the input value to set the threshold
- Sensors sends a few 0x00 more and finally outputs an 'ACK'
- After sending the final 'ACK', the sensor doesn't send anything on the serial line any more. But if the sensor doesn't get the input value of the threshold, it keeps sending these 0x00 forever!
These 0x00 can be quite annoying. Of course, a workaround would be possible. But I want to figure out what happens here... This happens only with this command, all the others I tried work fine.
Has anyone ever experienced this?
Any idea would be appreciated. Thanks for your help!
Corentin
|
|
|
|
|
|
|
Re:Command "Write Light Gate Threshold" doesn't work 1 Year, 4 Months ago
|
Karma: 0
|
|
Hi Corentin!
this is not exactly the reply to your question. But i m also facing the same problem with L command.
It is not behaving as per the documentation.
Your query is there on the forum for over a month and NO replies posted so far. Have u got any work around or using the same default value of L=100.
Regards,
sac
|
|
sac
(User)
Fresh Boarder
Posts: 3
|
|
|
|
|
Re:Command "Write Light Gate Threshold" doesn't work 1 Year, 4 Months ago
|
Karma: 0
|
|
Hi sac,
I forwarded the message to the Zilog support. They fould the problem and fixed it in the latest firmware revision (5a).
You should find this new revision on the Zilog's website...
Regards,
Corentin
|
|
|
|
|
|
|
Re:Command "Write Light Gate Threshold" doesn't work 1 Year, 4 Months ago
|
Karma: 0
|
|
Thanks a lot Coretin for your input.
Can i ask a question?
Please correct me if i'm wrong. this is about setting and using the LG threshold of the ZMOTION module.
Setting its value at 55 (lets say) in SIM would mean that the device will NOT detect motion if "Current LG Input level" (which can be obtained by "b" command) is less than 55?
Thats my understanding!
Am i correct?
Regards,
sac
|
|
sac
(User)
Fresh Boarder
Posts: 3
|
|
|
|
|
Re:Command "Write Light Gate Threshold" doesn't work 1 Year, 4 Months ago
|
Karma: 0
|
|
Exactly!
From PS0284:
• GND to 1.0 V = MD does not activate when motion is detected
• 1.0 V to VDD = MD is activated when motion is detected
The range is 0 to 255, with 0 indicating maximum ambient light
and, 255 indicating minimum ambient light.
It's actually a bit confusing. If I could choose, I would do the opposite i.e. 0 = minimum ambient light. That would allow using light-to-voltage converters like the TSL250.
Unfortulately, I haven't been able to find any "inverted" light-to-voltage converter...
Regards,
Corentin
|
|
|
|
|
|
|
Re:Command "Write Light Gate Threshold" doesn't work 1 Year, 4 Months ago
|
Karma: 0
|
|
Grateful Corentin!!!
Best wishes,
sac
|
|
sac
(User)
Fresh Boarder
Posts: 3
|
|
|
|
|