Closed Jostar1024 closed 7 years ago
Hi @Jostar1024 : What version of the library are you using? What version of Python are you using? And which Pi is that? Looks like a Pi2?
Also, if you could draw out the wiring diagram, that would help. This error is almost always due to a bad connection, which can be hard to debug at times.
Do you have the USB-SPI connector by any chance?
Hi,
If I fully understand the instruction, here is how I wire.
I don't have the USB-SPI... Would you tell me how that can help ?
Well I've made every effort to try to wire it correctly... Is it possible that SPI is not working because of the version of the Linux Kernel ?
I've read it at :I2C, SPI, I2S, LIRC, PPS, stopped working? Read this. But the solution mentioned in the article above doesn't work for me...
Did you check the voltage level of each connection? Especially power. The voltage levels at the GPIO pins should be near 0V or 3.3V. Have you tried SPI loopback test?
On 17 Nov 2016 15:50, "Jostar1024" notifications@github.com wrote:
Hi,
- Version of library : py-opc(1.1.0)
- Version of python : 2.7.9
- In fact I've tried at both Pi2 and Pi3. In the photo I connect the sensor with the Pi3.
If I fully understand the instruction, here is how I wire. [image: 123049408169900613] https://cloud.githubusercontent.com/assets/13313192/20395805/6835e7ec-ace4-11e6-8eeb-e3c428cea4b2.jpg
I don't have the USB-SPI... Would you tell me how that can help ?
Well I've made every effort to try to wire it correctly... Is it possible that SPI is not working because of the version of the Linux Kernel ?
I've read it at :I2C, SPI, I2S, LIRC, PPS, stopped working? Read this. https://www.raspberrypi.org/forums/viewtopic.php?t=97314 But the solution mentioned in the article above doesn't work for me...
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dhhagan/py-opc/issues/38#issuecomment-261283499, or mute the thread https://github.com/notifications/unsubscribe-auth/AIB3VbA4r3C1XrXdWdbo9eintApCMBFBks5q_HejgaJpZM4K1DV4 .
I've checked the voltage level. CS0 3.3V the others are around 1V... I am using a separate power(5V, 1000mA) for the sensor. Yes I've tried the SPI loopback test, which give me the 00 00 00 ....
I see you are separately powering the OPC using a 5V/1A adapter. In my experience, even slight voltage offsets between OPC ground and RPi ground will result in garbled SPI communications. Try powering the OPC directly from the GPIO rail (5V/G) and ensure you have a quality power adapter (5V @ 1.5 to 2A).
@Jostar1024 hello how can you solved this problem?
@Jostar1024 Did you ever solve this issue?
I didn't really solve the issue and I used the USB port instead. The time and resources were limited and I'm not working on it anymore.
I am using the Alphasense OPC-N2 on the raspberry pi 2, but it give me this Startup Error
how can I fix it ?
This is how the sensor is connected.![dsc_0008](https://cloud.githubusercontent.com/assets/13313192/20383394/dda91f7e-acaf-11e6-9a2b-aa8992583e40.JPG)