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

Thread: "pocket operator" style teensy effects board - design review

  1. #1
    Junior Member
    Join Date
    Jan 2020
    Posts
    17

    "pocket operator" style teensy effects board - design review

    Hello Teensy Audio people!

    I met Paul briefly at the Hackaday supercon and he kindly gave me a teensy4 from his swag bag. I've been enjoying making live techno with the Pocket Operators and what is missing is memory and cpu intensive effects.
    So I thought I'd make something in the same style with a long delay and reverb.

    I have a nice working demo with the audio shield and a PyQT serial controller so I can change parameters from the PC. The fun part is automating the knob twiddles (a bit like the punch in fx on the POs)!

    Now that I've got a pretty solid idea of how many knobs and buttons I need I've started working on a PCB that will replace the audio shield and add the knobs, buttons and leds.

    Here's where I'm at so far:

    https://github.com/mattvenn/teensy-audio-fx

    I'm just about to order boards, and I'm going for 4 layer to try to reduce audio interference from all the digital stuff, so things a bit more pricey than usual. If anyone has time or inclination to take a look at the schematic I'd appreciate it.

    I have copied the schematic of the audio shield and pretty sure I've got it wired up right. I've left off the SD card but kept the flash/ram.
    I'm using the TLC5947 for the LEDs and the 4067 multiplexer for the knobs.
    I'm hoping I can use SPI to load the LED data, but I can always bitbang it.

    One question I have is: Is it possible to add the flash chip and combine it with the ram on the teensy to get even longer delays? Otherwise, it's probably not much point in keeping the flash/ram footprint on the board.

    Thanks for any thoughts,

    Matt

  2. #2
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    100
    I have had a look at your schematics and the pin assignments look fine (you've avoided the TX/RX assignment error on the published T4 Audio Board schematic).


    Having had a quick look at your Kicad layouts and the circuit
    - decouple the SGTL5000 Mic (pin 15, unused input) to audio ground via a suitable capacitance (0.1u should be enough).

    - you need to pay more attention to the ground planes. Separating the digital from audio grounds is important, as it is circulation currents that are the demon of mixed mode design, rather than simply low impedance, and full ground plane coverage. Think about only having a single point where the audio (SGTL audio, J1, J2) component grounds joins the digital ground.

    - while the SGTL is fairly robust, some input and output protection is worthwhile - a small resistance, say 1k, in series with the input decoupling caps can limit some of the nasties, and reverse-biased diode protection to the rails is even better.

    - a 100k resistor to ground on the input jack side will reduce audio pops (2.2u capacitor discharging) when connecting input devices.

    Also, watch out for multi-layer ceramics other than for electrical noise decoupling, they tend to exhibit piezo effects - both microphonic and speaker. C0Gs (NP0s) are OK, though bigger in footprint - being multilayer polymer.

    These are all minor improvements - your basic design and execution look good!

  3. #3
    Senior Member
    Join Date
    Nov 2017
    Location
    Belgium
    Posts
    215
    Quote Originally Posted by mattvenn View Post
    I have copied the schematic of the audio shield and pretty sure I've got it wired up right.
    If you blindly copied the revD schematic without checking the SGTL5000 datasheets, pretty sure you've got it wrong.

    Checked your schematic.pdf file.
    The connections of your I2S datalines need to be swapped.

    Correct wiring:
    Code:
    T4 pin7 OUT1A  ->  SGTL5000 pin26 I2S_DIN
    T4 pin8 IN1    <-  SGTL5000 pin25 I2S_DOUT
    Click image for larger version. 

Name:	SGTL5000_pinout.png 
Views:	7 
Size:	101.7 KB 
ID:	18641

  4. #4
    Junior Member
    Join Date
    Oct 2019
    Posts
    4
    Wow, this is super cool! I'm curious how you are handling the power? Are you going to go with the liPO solution the beats shield did, or going with AAA batteries like the POs? I like your interface layout, its cool to have pile of pocket knobs.

  5. #5
    Junior Member
    Join Date
    Jan 2020
    Posts
    17
    Quote Originally Posted by palmerr View Post
    I have had a look at your schematics and the pin assignments look fine (you've avoided the TX/RX assignment error on the published T4 Audio Board schematic).
    Looks like I didn't!

    Quote Originally Posted by palmerr View Post
    Having had a quick look at your Kicad layouts and the circuit
    - decouple the SGTL5000 Mic (pin 15, unused input) to audio ground via a suitable capacitance (0.1u should be enough).
    I've done this, but not sure why, if I'm going to keep the mic input off all the time. Is it to prevent noise being picked up on the unconnected pin?

    Quote Originally Posted by palmerr View Post
    - you need to pay more attention to the ground planes. Separating the digital from audio grounds is important, as it is circulation currents that are the demon of mixed mode design, rather than simply low impedance, and full ground plane coverage. Think about only having a single point where the audio (SGTL audio, J1, J2) component grounds joins the digital ground.
    OK, this is interesting point. I've read Electromagnetic Compatibility Engineering recently by Henry Ott. His recommendation for mixed mode stuff is not separating ground planes as it introduces more problems than it solves. He recommends big, uninterrupted planes with low inductance and the signal return paths will keep to themselves.

    Having said that, the analogue audio input path crosses over the pot mux address pins, so maybe I can fix that.

    I also had a quick look at what would happen with moving the audio stuff higher up the board.

    Click image for larger version. 

Name:	Screenshot from 2020-01-04 19-58-07.jpg 
Views:	16 
Size:	98.6 KB 
ID:	18647

    Quote Originally Posted by palmerr View Post
    - while the SGTL is fairly robust, some input and output protection is worthwhile - a small resistance, say 1k, in series with the input decoupling caps can limit some of the nasties, and reverse-biased diode protection to the rails is even better.
    I put a 1k series input R for vcc (did you see there's already an inductor separating the analogue and digital supplies?) I've not done this before, always just used inductors.

    Quote Originally Posted by palmerr View Post
    - a 100k resistor to ground on the input jack side will reduce audio pops (2.2u capacitor discharging) when connecting input devices.
    In front of the caps? Datasheet says line input impedance is 29k at 1khz.

    Quote Originally Posted by palmerr View Post
    Also, watch out for multi-layer ceramics other than for electrical noise decoupling, they tend to exhibit piezo effects - both microphonic and speaker. C0Gs (NP0s) are OK, though bigger in footprint - being multilayer polymer.
    So this would just apply for C8 and C9 on the line input?

    Thanks for the feedback, appreciated!

  6. #6
    Junior Member
    Join Date
    Jan 2020
    Posts
    17
    Quote Originally Posted by jbrodsky View Post
    Wow, this is super cool! I'm curious how you are handling the power? Are you going to go with the liPO solution the beats shield did, or going with AAA batteries like the POs? I like your interface layout, its cool to have pile of pocket knobs.
    I was thinking about lipo. I ended up scrapping the lipo because I wanted to keep it simple and I'm generally using other USB powered stuff in my setup anyway.

  7. #7
    Junior Member
    Join Date
    Jan 2020
    Posts
    17
    Quote Originally Posted by neurofun View Post
    If you blindly copied the revD schematic without checking the SGTL5000 datasheets, pretty sure you've got it wrong.

    Checked your schematic.pdf file.
    The connections of your I2S datalines need to be swapped.

    Correct wiring:
    Code:
    T4 pin7 OUT1A  ->  SGTL5000 pin26 I2S_DIN
    T4 pin8 IN1    <-  SGTL5000 pin25 I2S_DOUT
    Click image for larger version. 

Name:	SGTL5000_pinout.png 
Views:	7 
Size:	101.7 KB 
ID:	18641
    Good spot thanks! It was due to a symbol error on the SGTL5000. I didn't check the symbol, which has tx and rx assigned to the wrong pins.
    I've fixed this and also renamed them to I2S_IN and I2S_OUT.

    Updated schematic is here: https://github.com/mattvenn/teensy-a.../schematic.pdf

    Thanks a lot for taking a look, saved me a board respin!

  8. #8
    Junior Member
    Join Date
    Jan 2020
    Posts
    17
    I had a go with the improved component locations, and it was not only easier to route but I think it's improved the grounding.
    It's in this branch: https://github.com/mattvenn/teensy-a...ree/new-layout

  9. #9
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    100
    Quote Originally Posted by mattvenn View Post
    Looks like I didn't!
    Yep, looks like someone else with sharper eyes picked up an issue I got wrong.
    Quote Originally Posted by mattvenn View Post
    I've done this, but not sure why, if I'm going to keep the mic input off all the time. Is it to prevent noise being picked up on the unconnected pin?
    Yes, unconnected inputs can create problems that are hard to track.

    Quote Originally Posted by mattvenn View Post
    OK, this is interesting point. I've read Electromagnetic Compatibility Engineering recently by Henry Ott. His recommendation for mixed mode stuff is not separating ground planes as it introduces more problems than it solves. He recommends big, uninterrupted planes with low inductance and the signal return paths will keep to themselves.

    Having said that, the analogue audio input path crosses over the pot mux address pins, so maybe I can fix that.

    I also had a quick look at what would happen with moving the audio stuff higher up the board.
    Yes, there are multiple schools of thought on how to treat the issue, and you've hit an important point - if the return path for a digital signal has to traverse low-level audio, it can create problems. Most folks, including Mr Ott I suspect, look at circulating current paths, as a key issue to diagnose. As you have most of the digital at the bottom, and most of the analogue at the top, issues are minimised.


    Click image for larger version. 

Name:	Screenshot from 2020-01-04 19-58-07.jpg 
Views:	16 
Size:	98.6 KB 
ID:	18647

    Quote Originally Posted by mattvenn View Post

    I put a 1k series input R for vcc (did you see there's already an inductor separating the analogue and digital supplies?) I've not done this before, always just used inductors.

    In front of the caps? Datasheet says line input impedance is 29k at 1khz.

    So this would just apply for C8 and C9 on the line input?
    I'm not sure I like the series R in the power circuit, at even moderate loads this will cause significant voltage drop.

    We're talking about two separate issues - yes to the inductor separating analogue and digital supplies. Input protection on the audio inputs was what I was referring to (both a grounding resistor on the outside of the caps, and possibly reverse biased diodes to VCC/GND if nasty things are likely to be connected to the inputs). When an input device is connected to the floating end of a capacitor it effectively grounds it. While it was unconnected, the capacitor will slowly discharge - to VCC/2 in this case. When the plug is inserted, the floating end is grounded, and causes a pop. So yes, 100k to ground on the outer (jack) side of the decoupling cap.

    Inputs are the most important, but the outputs will suffer the same issue for whatever's connected to them.
    Quote Originally Posted by mattvenn View Post

    Thanks for the feedback, appreciated!
    What goes around, comes around, Matt. Next week someone else will critiquing my work, with the hope of a better final product!
    Last edited by palmerr; 01-05-2020 at 03:49 AM.

  10. #10
    Junior Member
    Join Date
    Jan 2020
    Posts
    17
    Quote Originally Posted by palmerr View Post

    I'm not sure I like the series R in the power circuit, at even moderate loads this will cause significant voltage drop.
    Click image for larger version. 

Name:	Screenshot from 2020-01-05 20-59-46.png 
Views:	3 
Size:	19.3 KB 
ID:	18654

    Ah I misunderstood, when you said in series with decoupling caps I understood power rail. I've put the grounding resistors in.

    Thanks,
    Matt
    Last edited by mattvenn; 01-05-2020 at 07:00 PM.

  11. #11
    Junior Member
    Join Date
    Jan 2020
    Posts
    17
    Ordered!

    Click image for larger version. 

Name:	Screenshot from 2020-01-11 18-38-48.png 
Views:	13 
Size:	445.9 KB 
ID:	18709

    Will post back with whether it works or not!

  12. #12
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    100
    We'll be keen to see how it goes!

  13. #13
    Junior Member
    Join Date
    Jan 2020
    Posts
    17
    Got the board assembled, managed to put the ADC mux chip in wrong way but wasn't too hard to fix.

    Audio chip comes up and responds to i2c setup.

    I2s clocks look good, but no i2s data, so no audio. I've double checked the data lines for correct assignment, they are not shorted, and are connected to the sgtl5000 chip.

    Any ideas of where to start looking? This is my first i2s experience.

  14. #14
    Junior Member
    Join Date
    Jan 2020
    Posts
    17
    Update: I changed the sgtl initialisation code to change the audio routing, now line in goes direct to headphones and skips the digital section.

    https://github.com/PaulStoffregen/Au...l5000.cpp#L540

    From 0x0036 to 0x0076, which just flips bit 6 from 0 to 1.

    And now I can hear the input. So at least I know the analogue side of things is working.

    2nd update. lrclk and sclk are wrong on my sgtl5000 symbol! This probably explains it. I can't rewire it today but will check it tomorrow.
    Last edited by mattvenn; 02-09-2020 at 02:38 PM.

  15. #15
    Junior Member
    Join Date
    Jan 2020
    Posts
    17
    swapping lrclk and sclk fixed it!

  16. #16
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    100
    Excellent!

    Now you have the electronics working the fun can really begin.

  17. #17
    awesome project! since you are coming from pocket operators, do you want to keep their sync system of a pulse on the split audio signal? or maybe add an extra 3.5mm sync jack or maybe even optocoupled 3.5mm midi? would make it an easy interface between POs and proper midi too. then again you do have the teensy usb for midi interfacing. it could immediately become a more universal teensy-PO, where people could also throw eg. a little synth module up and play notes via midi. or, next product, a teensy-PO with 16 buttons instead of knobs.

    but yeah. i'd build or buy one of your effects board for sure, great replacement for eg. a FV1 module
    Last edited by weasel; 02-12-2020 at 11:20 AM.

  18. #18
    Junior Member
    Join Date
    Jan 2020
    Posts
    17
    I have a work in progress sync input that works from the POs. Right now the effects automation is locked to 120.
    Next thing to add!

  19. #19
    Junior Member
    Join Date
    Jan 2020
    Posts
    17
    Click image for larger version. 

Name:	IMG_20200212_124423.jpg 
Views:	20 
Size:	112.4 KB 
ID:	19045
    It's already a lot of fun. I don't think I've ever had such playable effects.

    I have posted a video about the design here: https://www.youtube.com/watch?v=fyk4Z21knqk

    Will be recording the next one on the schematic design and pcb layout soon.

  20. #20
    hey if you have an ios device, check out the KOALA sampler app. the way its slidders lets you control 16 effects is super dope and intuitive! especially the latch/snap function.

  21. #21
    Junior Member
    Join Date
    Jan 2020
    Posts
    17
    part 2 of the vid - this time on board design and layout.
    https://www.youtube.com/watch?v=zHr6EKKnGfY

Posting Permissions

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