I’ve hooked up the As3935 to a nano per the sparkfun tutorial and am using the provided example sketch (basic lightning detector SPI)…I have the noise and disturber rejection uncommented and I see a steady stream of “Noise” over the serial monitor. The odd thing is it is happening at a very regular interval of ~1sec. I’ve added a pullup resistor to the CS line (just in case) but I’m not sure what could be causing this issue.
I have a feeling it is not noise from the environment but rather something with the hardware. However I’ve also tried using the detector with a arduino duemilanove/UNO and I see the same behavior. Any thoughts?
thanks
Hello Roberto.
You shouldn’t need anything on the CS line, so I’d remove that resistor.
Do you have the INT pin connected to pin 4 your Arduino? The Nano is a 5 volt board. Are you using a logic level shifter between the AS3935 and your Arduino? Which example sketch are you running?
There’s a possibility it could be noise coming from an electronic or electrical device nearby. Have you tried relocating to another place to see if that helps?
Ah, for some reason I was assuming the nano was running on 3v3 logic. I added a logic level shifter and that seems to have fixed the issue; now running the example script shows the chip initializing and not getting flooded with ‘noise’. Now I just need another lightning storm to verify this is working!
Is it likely that I damaged the chip? I only supplied 3v3 to VCC so I would assume it’s okay. Also, does the INT pin need to run through the logic level converter as well? I’ve run out of pins with all the SPI connections.
Thank you very much for your help.
Is it likely that I damaged the chip?
That's a possibility since you would have been feeding 5 volt logic to a chip that's only designed for 3.3 volt logic. Sometimes you get lucky and nothing breaks though.
Also, does the INT pin need to run through the logic level converter as well?
No, INT is an output from the AS3935 and will be 3.3 volts or ground. A 5 volt system will still see that as a 0 or 1 so no need to level shift.