Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Adafruit airlift

  1. #1
    Junior Member
    Join Date
    Jul 2019
    Posts
    11

    Adafruit airlift

    Hei guys.
    Has any of you managed to use an airlift module with a teensy 3.6?
    Cant get it to work for the life of me.

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,297

    Cool

    Quote Originally Posted by pauleffect View Post
    Hei guys.
    Has any of you managed to use an airlift module with a teensy 3.6?
    Cant get it to work for the life of me.
    I haven't used it, but I noticed in looking at the product page, I see it says 'over 8Mhz SPI'. I would try and limit the SPI bus speed to 8Mhz to see if that helps. I've have some OLED displays that the Teensy 3.5 and 3.6 can send too much SPI data and overwhelm the devices with data much faster than the device can accept.

    Similarly there are devices that take some time to power on. On an AVR system, the system is so slow that the device is normally ready when the code finishes initialization and runs the setup code. But the Teensy 3.5/3.6/4.0 (and even 3.2) are so much faster than the AVR processor, that it might make sense to have a 3 second or so delay in setup.

    Another thing to try comes from https://www.pjrc.com/better-spi-bus-design-in-3-steps/, and that is to put a pull-up resistor between your CS pin and 3.3v. In addition, make sure your connections are solid. With my problematical OLED displays, I had originally had to put the SPI bus speed down to 11Mhz in order to eliminate most of the on-screen corruption. But when I ditched the breadboard and went to a soldered protoboard, replaced the jumper wires with newer wires, and added a 2.2K pull-up resistor, suddenly I could now run two displays at 19Mhz.

    Some Adafruit software doesn't have #ifdef's for Teensy, and if it doesn't have the Teensy #ifdefs, it may default to software emulation of SPI. Make sure you are using hardware SPI on the 3.6 (MOSI on pin 11, MISO on pin 12, SCLK on pin 13) and you are using the SPI Wire interface. For testing, make sure there aren't other SPI devices attached.

    If the software has Teensy optimizations, you may need to have CS (and D/C for devices that have it, but airlift doesn't seem to have D/C) on one of the 'fast' CS pins (9, 10, 15, 20, and 21). Note, if you are using multiple SPI devices there are restrictions in using multiple pins:
    • Pin 2 and pin 10 can't be used for SPI at the same time;
    • Pin 6 and pin 9 can't be used for SPI at the same time;
    • Pin 20 and pin 23 can't be used for SPI at the same time; (and)
    • Pin 21 and pin 22 can't be used for SPI at the same time.

  3. #3
    Junior Member
    Join Date
    Jul 2019
    Posts
    11
    Thats very interesting, thank you for the reply.
    I did think about the if's and i eliminated them cometely. i defined the ss to pin 10, and the other ones according to the table in the teensy spi doc table (11, 12, 13).
    However, all I get is a "no wifi module detected". Going to try and limit the spi to 8mhz.

  4. #4
    Junior Member
    Join Date
    Jul 2019
    Posts
    11
    after some mingleing, it was pointed out to me that adafruits airlift needs 5v and that the teensy 3.6 is not 5v tolerant.
    it may be the case that it simply wont work out of the box with a teensy.

  5. #5
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,297

    Cool

    Quote Originally Posted by pauleffect View Post
    after some mingleing, it was pointed out to me that adafruits airlift needs 5v and that the teensy 3.6 is not 5v tolerant.
    it may be the case that it simply wont work out of the box with a teensy.
    Possibly you are mis-wiring the board (which is where posting a picture showing the complete wiring can help, and posting your test program, i.e. rule 1 in these forums). Remember most of us are not mind readers, and we have no idea how you have wired up the board or what program you are using.

    If you soldered pins or headers to the board, there is always the possibility that you either did not make a proper connection or you connected two pins by accident.

    The guide does say that you need to connect VIN (i.e. 5v) to power the board. But the Adafruit product page specifically says "You can use 3V or 5V Arduino", so vin is 5v, but the data pins should be ok.

    It also may mean since you mention you must use USB power, that perhaps your USB source is not providing enough power. The wifi boards can consume a lot of power (and in particular I remember there is a big spike at the beginning that consumes a lot of power). This is where having a USB voltage/ammeter can help so you can see the power usage. It also may make sense to try a different USB power source that can provide more power.

    Quoting from the pinout page:

    Classic SPI Pins:
    • SCK - SPI Clock from your microcontroller, level shifted so can be 3-5V logic
    • MISO - SPI Data from the AirLift to the microcontroller, this is 3.3V logic out, can be read by 3-5V logic. This is tri-stated when not selected, so you can share the SPI bus with other devices.
    • MOSI- SPI Data to the AirLift from the microcontroller, level shifted so can be 3-5V logic
    • CS - SPI Chip Select from the microcontroller to start sending commands to the AirLift, level shifted so can be 3-5V logic

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •