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

Thread: General guidance for audio project needed !

  1. #1
    Member
    Join Date
    Mar 2019
    Location
    Bordeaux / France
    Posts
    47

    General guidance for audio project needed !

    Hi people ! I need general guidance for my first project using a Teensy 3.6

    The project is about building a guitar/synth stompbox (kinda electric guitar effect pedal)

    Components involved are :

    - Teensy 3.6
    - Audio board
    - An I2C LCD display
    - 4 KY-040 rotary encoders (like this one)
    - 6 push buttons
    - 6 monochrome leds
    - And of course audio IN and OUT jacks 6.35 (but that does not count as components)

    As a newbie in electronics (coding is fine) I have several beliefs, some if not all might be wrong

    - Stick with 3.3v components everywhere - Mixing 5v and 3.3v components is more complex, newbies will fry components or MCU
    - If using the 3.3v out from the Teensy I must double check that all the components don't draw over 250 mA. If going above I might have over heat and problems
    - No matter if I use the two 3.3v out, the limit is global : 250 mA
    - If my components needs more than 250 mA I must use an external power supply, then it means using a 3.3v breadboard power supply like this one witch can provide up to 500 mA
    - It's okay if the breadboard power supply is plugged in a 1A or 2A or XA power adapter, more Ampere is fine
    - If I use a breadboard power supply I must be SURE to have cut the 5V pads as stated here : https://www.pjrc.com/teensy/external_power.html - Otherwise I will fry my expensive Mac Book USB port
    - LCD I2C 3.3V display needs external pullups (I need to Google for this)
    - KY-040 rotary encoders do not need anything else, they can be plugged right away into the Teensy
    - Push buttons don't care about voltage
    - Leds does, a 5v led on 3.3v voltage will not be bright, or even will not light up
    - Leds need resistors (I need to Google for this)
    - Resistors draw current, must be taken in account for PA power
    - Using long wires when prototyping might be a cause of "noise", solutions exists involving resistors to reduce the noise (I need to Google for this)

    - When prototype is ok on breadboard I will switch to a soldered protoboard version (I don't want to have a custom printed PCB) and this will be fine.
    - Veroboards suck (I'm really not sure about this one !)

    - And don't rely on really cheap components : on Amazon one KY-040 can go from 2$ to 6$ - Don't buy the cheapest (but don't buy the golden plated ones too)

    Please, any advice on these points from people with skills will help me a lot !

    Thanks in advance !

  2. #2
    Member
    Join Date
    Mar 2019
    Location
    Bordeaux / France
    Posts
    47
    So, I scratched my head and did my very first schematic...

    - internal pull ups are used for push buttons
    - I would like to begin with the audio board being soldered on a header then used on the breadboard even if I know that I must keep the wires short
    - on first experiments I'll not use the breadboard power supply if all the components don't draw more than 250ma (which I don't know for now)

    I started coding with a 5v I2C LCD running on 3.3v, one push button and one encoder, doing a loop : MAC -> Teensy USB AUDIO IN -> my App + audio library -> Teensy USB AUDIO OUT -> MAC -> Behringer XR18 -> Monitors
    Works pretty well ! With the help of serial monitor I can prototype quite everything

    But before going further I would appreciate advices about the simple circuit I plan to protoboard

    Click image for larger version. 

Name:	TeenBox2_schem.jpg 
Views:	13 
Size:	75.8 KB 
ID:	16410

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,927
    Looks like you might have the I2S TX & RX swapped.

    Teensy receives I2S on pin 13, and it transmits I2S on pin 22.

  4. #4
    Member
    Join Date
    Mar 2019
    Location
    Bordeaux / France
    Posts
    47
    Ok thanks Paul ! I misunderstood your schematic here https://forum.pjrc.com/threads/25679...pter-schematic

    I thought RX on one side should go to TX on the other. In fact it's TX <-> TX and RX <-> RX

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,927
    The signals shown on the audio shield page are the Teensy pin functions.

    It's SGTL5000 I2S_DATA_OUT to Teensy RX, and SGTL5000 I2S_DATA_IN to Teensy TX.

    The audio shield absolutely does work when connected directly above or below (so the pins line up) on Teensy 3.2, 3.5 and 3.6. Usually a few inches of wires are fine, especially if you route the ground wire close to the signals or use a construction method with ground plane.

  6. #6
    Member
    Join Date
    Mar 2019
    Location
    Bordeaux / France
    Posts
    47
    Thanks Paul for clarifying !

    Ok, so because I got a Teensy with header (which is a good idea for a beginner) I was thinking that when I'll be ready to solder the audio board I would have to buy another teensy 3.6 without headers, then :
    - on the Teensy solder "traversing" header with male on the bottom (to the breadboard) and female on top of the teensy
    - same for audio board
    - plug the audio board on top of the teensy

    In fact, if I understand you well I could even put the audio board below my actual teensy
    - solder "traversing" headers on the 2x14 pins of the audio board (male bottom, female top) so I can plug the teensy on top of the audio board
    - then use an unsoldered header for the nine remaining teensy pins because of the height for the audio board

    More or less what you did https://forum.pjrc.com/attachment.ph...9&d=1494421880
    The only difference being that the "long" pins will be replaced by a header male bottom female top without desoldering anything

    First solution is better (teensy pinouts are accessible from the top of the audio board) but requires more soldering and buying another teensy
    Second solution requires less soldering but I'll have no access to the teensy pinouts from the top of the teensy, but it's ok for breadboarding

Posting Permissions

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