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

Thread: Prop Shield, Low Cost and Teensy 4.1

  1. #1
    Member dimitre's Avatar
    Join Date
    Aug 2016
    Location
    São Paulo
    Posts
    95

    Prop Shield, Low Cost and Teensy 4.1

    Prop Shield, Low Cost and Teensy 4.1, are they compatible?
    I'm willing to use as an audio amplifier for a project, and read audio from 4.1 SD
    does it work?
    Thanks

  2. #2
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    791
    Teensy 4.1 does not have a DAC pin so it can't output an analog signal to the PropShield for amplification.

    The audio input pin on the PropShield:
    Click image for larger version. 

Name:	Capture.PNG 
Views:	4 
Size:	190.1 KB 
ID:	28060

    Teensy 4.1: instead of a DAC output like on Teensy 3.2, the pin is an on/off input on Teensy 4.1.

    Name:  Capture2.PNG
Views: 97
Size:  33.3 KB

    Paul

  3. #3
    Member dimitre's Avatar
    Join Date
    Aug 2016
    Location
    São Paulo
    Posts
    95
    Thank you!
    I think pjrc site could be updated to mention that.
    I'm working on a simple project that needs amplified sound output and SDCard, any ideas?

  4. #4
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    8,236

  5. #5
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    4,189
    Mjs513 posted an article I did a few years ago. I haven't done much in the last few years due to covid lockdowns and my own health issues, and such.

    But some other things that might be useful. If you aren't using SPI (in particular, pins 10 and 12) using MQS and MQL for stereo or just one of them for mono would be a simple possibility. In this case, you wouldn't want the prop shield, but just a speaker and amplifier. Particularly for mono sound, Adafruit has this nice little combination speaker and amplifier. They are sold out right now, but it looks like digikey has a few:


    You can also have separate amplifiers and speakers.


    As the article posted mentioned, there are external I2S devices that can be used. Some are mono and include amplifiers, some are stereo, and you have to include amplifiers.


    If your goal is just to play recorded sounds from a SD card, then rather than using the SD card on the Teensy, you could just use something like the dfplayer that has a SD card drive and it takes commands via serial port of which song to play (note, if memory serves, the names have to fit a given naming scheme, and it only supports up to 32GB microSD cards):


    There is a version of the dfplayer that has static memory instead of a SD card:


    If you go onto fleabay, there are many knock off versions of the dfplayer. I tend to prefer getting the real dfplayer rather than the knock-off. FWIW, I bought one a clone version of the dfplayer pro, but it only worked with its own Windows app (i.e. when hooked up to USB it didn't act like a removable disk drive), and IIRC, the app was in Chinese only.

    PJRC has a cheaper audio board that has PCBs for both the Teensy 3.2/3.5/3.6 and Teensy 4.0/4.1. I don't have experience with this other than buying some but not yet soldering them together. Like the normal audio shield, you would either add amplifiers for the speakers or use the headphone output. If you use the headphone output, there are various low cost speakers out there that plug in a 3.5mm headphone jack and provide stereo sound. Some of these are called hamburger or bomb speakers, based on what they look like:


    There is of course the normal audio shield. Be sure to get revision D for the Teensy 4.0/4.1:


    If you have the setup for it, you can also do S/PDIF input and output using pins 15 and 14.

    If the Teensy is always going to be hooked to the computer, another option is to do USB audio output.

    If the goal is just to play a limited set of songs that aren't going to change, you could consider converting these to const char [] buffers, and just keeping them in flash. That way you wouldn't need to use a SD card, and you could drop down to a Teensy 4.0. With the Teensy 4.1, using PSRAM to hold files is a possibility (assuming you are up for doing the soldering for PSRAM). There is a method to use the unused flash memory for a file system, but I don't know much about it.

    In terms of cheap speakers that plug into the headphone jack, here are a few that I saw on fleabay:
    Last edited by MichaelMeissner; 04-10-2022 at 03:38 PM.

  6. #6
    Member dimitre's Avatar
    Join Date
    Aug 2016
    Location
    São Paulo
    Posts
    95
    Thank you for the super detailed answer. I didnt know about the PJRC audio board.
    I'll try to see if the SD/mp3 player can solve the project. I love the fact this board does everything audio from the SD to the speaker, so I can concentrate just in "DJing" via serial.
    I'll be definetly using this if I don't need to "crossfade" anything.

    the project will be a number of modules which play bird singing depending of the solar incidence (day, night, evening) using maybe LDRs.

    Hope your health improve! Take care
    And thanks for your dedication on this forum

  7. #7
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    4,189
    Quote Originally Posted by dimitre View Post
    Thank you for the super detailed answer. I didnt know about the PJRC audio board.
    I assumed you knew about the audio shield, and you couldn't use it either due to cost or it interfered with something on your board.

    Be sure to watch (and rewatch) this video on the audio adapter. Note, this was written for the original audio adapter and the Teensy 3.2. Between the Teensy 3.2/3.5/3.6 and Teensy 4.0/4.1, the pinouts have changed. Unfortunately, many of the examples haven't been changed, so you will need to consult the audio adapter page to map pinouts between the Teensy 3.x series and the Teensy 4.x series. Also with recent versions of Teensydunio, the SD library can now handle SDXC micro-sd cards (i.e. 64 gigabytes and larger):


    Quote Originally Posted by dimitre View Post
    I'll try to see if the SD/mp3 player can solve the project. I love the fact this board does everything audio from the SD to the speaker, so I can concentrate just in "DJing" via serial.
    I'll be definetly using this if I don't need to "crossfade" anything.
    Be sure to check out what Teensy can do, it might be able to do cross fading also.

    Quote Originally Posted by dimitre View Post
    the project will be a number of modules which play bird singing depending of the solar incidence (day, night, evening) using maybe LDRs.

    Hope your health improve! Take care
    And thanks for your dedication on this forum
    Not knowing the application, it sounds like you want to have one or two beefy modules, and then have all of the different recorded sounds as different files on the SD card.

    Thanks. Things are getting a little better for me.

Posting Permissions

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