AS3935 lightning detector logic level

I just purchased the latest revision of this board and was reading the documentation and it says the logic level must be 3.3 V.

Just want to confirm if I am using a red board qwiic I have to solder the jumper pads on the back of the red board to use 3.3 logic?

And if I am trying to use this with the Uno or mega I would have to purchase a logical level converter?

Thanks

That is correct, it has a logic level of 3.3V. If you were to use a 5V uno, yes you would need a logic level converter:

https://www.sparkfun.com/products/12009.

Hope that helps.

If you’re using a [RedBoard Qwiic you can modify the board to use 3.3 volt I/O without using a logic level converter by cutting a trace and then adding a solder jumper to two pads. The picture below shows what you need to do.

15123-SparkFun_RedBoard_Qwiic-04.jpg

We have a [tutorial that might be helpful to look at if you’ve never modified a solder jumper before.](How to Work with Jumper Pads and PCB Traces - SparkFun Learn)](SparkFun RedBoard Qwiic - DEV-15123 - SparkFun Electronics)

Thanks Chris !

Hi Chris

everything is working fine with a redboard with the mods you suggested to change the logic level. I ended up using the Example2_More_Lightning_Features_SPI.ino which was very accurate when we had some thunderstorms here it alerted each lightning strike.

I really need to use this with a mega r3 board with 5v levels. was looking at level shifters: SparkFun Logic Level Converter - Bi-Directional BOB-12009, but they only seem to handle 4 wires and this board has 5, MOSI MISO, SCK, CS, INT ? do I have to buy two of those logic boards to handle 5 wires ?

Does the INT wire have to be level shifted ?

The INT is only one-direction; output of AS3935, input to Mega. You certainly should not need the bi-directional converter. You could probably hook it up directly (the Mega should accept 3.3V logic levels ok). Or you could place a series resistor in between the two to limit any potential current surge at power-on.

Are you saying I can skip the converter for all the lines or just INT. the doc said besides the input voltage of 3.3v, the lines also had to be 3.3v. It was a pretty expensive board at $25 so I do not want to damage it, thanks

If you are connecting the Lightning Detector to a 5V microcontroller like the Mega, you absolutely need to level shift the SPI lines and the INT line because it is active HIGH. The SparkFun breakout was designed to only use 3.3V input and logic levels. You’ll want to use a level shifter like [this or if you want to switch at high speeds, the [TXB0104 Breakout will work as well.](https://www.sparkfun.com/products/11771)](https://www.sparkfun.com/products/12009)

Hi Mark

I saw that converter but it only does 4 lines and I think I need 5 ? Would I have to use two of those boards ?

Thanks

Hi Jim.

While it’s a really good idea to level shift all 5 lines, (with two logic level shifters) you can get away without shifting signals that are outputs of the AS3935 and only inputs for the Arduino.

MISO and INT are both AS3935 outputs and as long as you don’t have another 5 volt SPI device on the same bus, or a 5 volt board that has an INT pin on it, you could connect both pins directly to the Arduino. Just be absolutely sure nothing in your code ever drives either of those pins high on the Arduino side and you can skip the logic level shifter for those pins.

15441-SparkFun_Lightning_Detector_-AS3935-02.jpg

Thanks for explaining that Chris, that helps a lot !

Like I offered before: “The INT is only one-direction; output of AS3935, input to Mega. You certainly should not need the bi-directional converter.

I meant that only for the INT output. I thought that would be clearly understood, but I guess I could’ve been super explicit.

And the following was also accurate: “Or you could place a series resistor in between the two to limit any potential current surge at power-on.

But I could’ve, again, be more explicit and noted this only applied to the INT output.