Quad channel output on Teensy 3.6

Thats great feedback! Thank you Paul - really appreciate that... I will make amendments...
 
Thanks again. I've made the corrections you've suggested, although I was slightly unsure of these things:

if the decoupling caps for VA should be before or after the ferrite bead.

if the CAT811T is wired correctly.

if PIN1 / CS is setup correctly with two resistors and solderable pad options. Due to my inexperience, I wasn't sure how to represent this on a schematic.

pdf: View attachment 16306
 

Attachments

  • cs42448.jpg
    cs42448.jpg
    76.3 KB · Views: 242
  • teensy.jpg
    teensy.jpg
    66.7 KB · Views: 194
  • input.jpg
    input.jpg
    36 KB · Views: 191
  • output.jpg
    output.jpg
    35.9 KB · Views: 164
Last edited:
Hallo everybody.
I made al the mod on teensy 3.2 to work with 2 audioboard and quad-channel.
I had some issue playing on both board at the same time: i get very fragmented audio on each channel.
I don't get this problem when I play audio file on only one of the teo audio board. Any suggestion about ho to solve this?
Thank you vary much in advance
 
If you make one of these boards, please join the conversation!

I bought three of these boards back when they came available. After sleeping on the shelf for nearly a couple of years, I grabbed one and set out to do my first SMD build in about 5 years. I can solder up a vacuum tube amp board in about 3 hours, but I designed it so I know where all the parts go. This little guy took me three days of squinting through a microscope and soldering my fingers. It's kinda ugly, and not all of the parts are the right size, but it's finished.

I popped a T3.2 on top and loaded up the code I made from the fragment on the OSH park page and the original "guitar' code. I wired the mixed to all 8 output channels so I could test them. After fixing a few typos it worked. This will be part of the fourth music synthesizer I have built with a Teensy as the "brain." I tested with a T3.2, so that there were minimal variables in case things didn't work. The T3.6 will be next. This one will be a 6 voice polyphonic hybrid digital /analog synth with Moog style ladder filters for that fat Moog sound. P2580711_x.jpgP2580612_x.jpgP2580631_x.jpg
 
Hope you'll be able to share more info and maybe even a demo video when it's built?

Sure. The CS42448 board is the output for 6 audio channels created in the audio library. I have had good luck with the digital oscillators that I have been using. They are 1V/oct or MIDI controlled. Trying to make 6 notes of polyphony with three oscillators per note needs 18 VCO's. You can not keep 18 analog VCO's in tune with each other for more than 5 minutes. I also want to make this thing small enough to fit IN an electric guitar.

The CS42448 board and Teensy are needed for the next step, which is tweaking out some ladder filter designs and trying out some new ideas on them. The CS42448 / T3.6 will use the same code I'm using in my current Teensy 3.6 synth. Progress will likely be sporadic since I have taken on a contract engineering job that gets first priority. I will post pictures and details as the project progresses.

The first synth was your audio tutorial on a white breadboard with a bunch of pots wired to it. Number two is a small perfboard still based on and compatible with the tutorial, with 12 pots, 3 push buttons, 3 encoders and 1 V/oct CV / gate inputs added. It can be driven bu a music keyboard. I use the Arturia Keystep since it has 5 pin MIDI, USB MIDI and 1V/OCT I/O.

Number 3 is a big breadboard with 49 pots, 4 encoders, and 1 V/oct CV / gate inputs. It's still running it's Kickstarter edition of the prototype Teensy 3.6.

It is seen here on a Youtube demo video. This was before I got the 1V/oct calibrated well enough for the synth to be played with a keyboard or DAW.

https://www.youtube.com/watch?v=gWf8Ohfw9EU

I'm including a picture or two of the synth being played on a deck overlooking the Atlantic ocean on a vacation trip. I wanted to set it all up in the sand down by the water but the wind was creating a full on sandstorm which would have ruined it......and my eyes.

PC and Synth_1x.jpgPC and Synth_2x.jpgPC and Synth3_x.jpg

Here is a picture of a Moog style ladder filter breadboard made with vacuum tubes.....it won't fit in the guitar, so i'll keep working on the SMD stuff.

LadderTop1_x.jpg
 
hi there,

I had the same issue as mmalex with the CS42448 not working properly, VQ at 1.25V instead of 2.5V and muted outputs.

my fix for it is to set bit 0 (a reserved bit) in the CS42448 FunctionalMode register to 1:

Code:
        // set the magic bit!
        __write(CS42448_Functional_Mode, 0xF4 | 0x01 );

I contacted Cirrus support and they told me it's not possible and the chip should work without that bit set - well as mmalex and me found out that is not true for all chips or setups.

we have this on 3 prototype boards so its also not an one-off soldering error.
 
Making six differential inputs into 8 channel inputs by using single ended inputs

Can we edit this pcb and make in for 8 channel input/ output and can we use AudioInputTDM for 8 channel input to record sound. Thanks a lot I am a fan and really appreciate your work.
:):):):):)

I was observing the data sheet in which it is mentioned that CS42448 can be used as six channel differential input but has given an option in the data sheet to use the last two ANI5+ ANI5- and ANI6+ and ANI6- as single ended inputs. so can i use these single ended to extend the inputs to 8 channels and will I have to make some changes to the teensy code for the input side. Thanks a lot in advance guys.
 
Paul, I'm wondering what do you use to create gerber files? I mean which application (KiCad or something else).

And if there is a chance that you could share the source file of the CS42448 board? I would want to readjust it for T4. And augment a little (I don't need the on-board jacks, just the pads to solder to the prev/next stages, so I could make it even more compact), but it would really be nice to readjust the proven-to-work source rather than to create a new one from scratch.

The same question is about the MIDI board source (the one from https://www.pjrc.com/teensy/td_libs_MIDI.html). Because I would likely want to have both on a single PCB and it would be cool to merge the boards.
 
Paul, I'm wondering what do you use to create gerber files? I mean which application (KiCad or something else).

And if there is a chance that you could share the source file of the CS42448 board? I would want to readjust it for T4. And augment a little (I don't need the on-board jacks, just the pads to solder to the prev/next stages, so I could make it even more compact), but it would really be nice to readjust the proven-to-work source rather than to create a new one from scratch.

The same question is about the MIDI board source (the one from https://www.pjrc.com/teensy/td_libs_MIDI.html). Because I would likely want to have both on a single PCB and it would be cool to merge the boards.

i’ve adapted the cs42448 circuit for teensy 4.0 using kicad here: though it’s not fully tested yet thou.. https://github.com/newdigate/teensy-eurorack
 
Thanks! Though if there is an option I would really prefer the «tested by multiple people» version :). And thank you for opensourcing your thing.
 
QuadChannelOutput on Teensy 4.0

Hi all,

I'm new to this forum so I hope that this question still fits inside this thread. Also new to Teensy, coding and soldering altogether so let me know if I need to up my clear question asking skills.

For my graduation research I want to use the Teensy 4.0 together with two audio shields to send waveforms to 4 seperate VCA's. With this Sparkfun guide I reworked one shield where I:
  • Removed the Caps on both shields
  • Cut traces between pin 8 & pin 7 instead of pin 13 & pin 22 on Teensy 3.2
  • Cut between the center & right pad of I2S pads
  • Wired innerpad of pin 7 to pin 15 instead of innerpad pin 22 to pin 15 on Teensy 3.2
  • Wired innerpad of 8 to pin 17 on the Teensy instead of pin 13 to pad 30 on Teensy 3.2
  • Put a solder blob in between center and left I2S pad

Audioshield1.jpeg Audioshield2.jpeg

Using the QuadChannelOutput.ino example does not seem to work though. playSdWav1.isPlaying() remains false.

Both Shields worked separately(before rework) using WavFilePLayer.ino.
Jumper wiring pin 7 to 15 and pin 8 to 17 makes the second shield work as well.
I also multimetered the I2S connections, they should be fully separated.
So I do not expect it to be a problem in wiring.

Could the problem be pins being called by input_i2squad.cpp and output_i2s.cpp ? I've switched in input_i2squad.cpp in line 64:
HTML:
	CORE_PIN13_CONFIG = PORT_PCR_MUX(4); // pin 13, PTC5, I2S0_RXD0
to
HTML:
	CORE_PIN8_CONFIG = PORT_PCR_MUX(4); // pin 13, PTC5, I2S0_RXD0

I've switched in output_i2squad.cpp in line 64:
HTML:
	CORE_PIN22_CONFIG = PORT_PCR_MUX(6); // pin 22, PTC1, I2S0_TXD0 -> ch1 & ch2
to
HTML:
	CORE_PIN27_CONFIG = PORT_PCR_MUX(6); // pin 22, PTC1, I2S0_TXD0 -> ch1 & ch2
and in lines 337 to 339:
HTML:
CORE_PIN23_CONFIG = PORT_PCR_MUX(6); // pin 23, PTC2, I2S0_TX_FS (LRCLK)
	CORE_PIN9_CONFIG  = PORT_PCR_MUX(6); // pin  9, PTC3, I2S0_TX_BCLK
	CORE_PIN11_CONFIG = PORT_PCR_MUX(6); // pin 11, PTC6, I2S0_MCLK
to
HTML:
CORE_PIN20_CONFIG = PORT_PCR_MUX(6); // pin 23, PTC2, I2S0_TX_FS (LRCLK)
	CORE_PIN21_CONFIG  = PORT_PCR_MUX(6); // pin  9, PTC3, I2S0_TX_BCLK
	CORE_PIN23_CONFIG = PORT_PCR_MUX(6); // pin 11, PTC6, I2S0_MCLK

This doesn't seem to help. Am I missing something? Do you have any next step suggestions for figuring out the problem?

Thanks so much!
 
Sorry, your pictures are exactly as you tested them, i.e. there is ONLY 1 wire between 2nd audio shield and Teensy?

Obviously ALL wires that from Teensy go to Audioboard 1 should also go to Audioboard 2, only the I2S_RX and I2S_TX of audio cards com from different places on Teensy, and maybe CS if you using uSD card.

It is not visible on Picture, I assume you have Audioboard rev D for Teensy4.0
 
Hi WMXZ, thanks for your reply! You are right, they are stacked when I use them. The SD card is read from both sloths so that connection works.

Audioshield3.jpeg

And indeed they are rev D's!
 
Hi WMXZ, thanks for your reply! You are right, they are stacked when I use them. The SD card is read from both sloths so that connection works.

View attachment 19104

And indeed they are rev D's!

without checking sparkfun instructions (and without having it done myself) I would assume

on audio board1,
connect straight:
MCLK A.23 to T4.23
BCLK A.21 to T4.21
LRCK A.20 to T4.20
SDA A.18 to T4.18
SCL A.19 to T4.19
DIN A.7 to T4.7
DOUT A.8 to T4.8

on 2nd audiocard
connect A.7 (DIN) to T4.32 (OUT1B ) (found on bottom)
connect A.8 (DOUT) to T4.6 (OUT1D)

if you do not stack pins 7,8 to 2nd audioboard but use wires, you may not need to cut connections 7,8 on 2nd audioboard.

For I2C address cut Pads on 2nd audioboard (triple pad) and connect where not previously connected.

SW to be used is I2S quad, but I'm not sure if that was ported to T4 and tested. But connection method is for SAI1 using 2 adjacent data ports.
 
Hi WMXZ,

Thanks, the connection on the 1st board are as you said. Though I wonder what your train of thought was on connecting pin A.7 & A.8?

on 2nd audiocard
connect A.7 (DIN) to T4.32 (OUT1B ) (found on bottom)
connect A.8 (DOUT) to T4.6 (OUT1D)

For the T3.2 connections on the 2nd audio shield would be:

connect A.22 (DIN) to A15
connect A.13 (DOUT) to T3.2 pad 30 (SDA1)

So my translation to the T4 was:
connect A.7 (DIN) to A15
connect A.8 (DOUT) to T4 pin 17 (SDA1)

Does it require the digital Audio capabilities?
 
Sorry for the necrobump. Having some trouble getting the cirrus chip to respond. The return value from the enable function is always false. I assume maybe its my soldering. Ive tried twice, once via an iron and after a trip to a store, via hot air for the second board. First board is likely bridged on a pin but the second board looks clean. I ran the hot air at 260C but struggled to find guidance in the data sheet for a temp to reflow at. Before i bork the last chip I got. Does any one have some troubleshooting tips?

I checked a few of the pads and made sure the power was running thru the ferrite bead. The chip was not getting hot, so i checked it with a Flir. Slightly above ambient, but not running warm/hot as mentioned. Maybe for the last board I only add the min parts for comms with the chip and see if it communicates?

Code: https://pastebin.com/hZiBbgjY

Image:IMG_3824.jpg

Designer: Screen Shot 2020-11-11 at 6.30.51 PM.jpg
 
What I do in those cases is to get thin contact probes, and check for continuity along all the paths that should have it (and not among some that shouldn't.)
Then I use those probes, and IDEALLY some test points on the board (if I remembered to put them in) to hook up a scope to make sure that the wires wiggle.
If that works, I break out the logic analyzer and start debugging the protocol.

Can you buy the audio shield from PJRC, and make sure your Teensy and code works OK with that, by comparison?
IIRC, it's fairly reasonable in cost plus shipping, and might help troubleshoot where the error goes.
 
I don't know if you've solved this problem, but I've found with my board I must include:
Code:
cs42448.volume(1);
or the 42448 stays silent. Very unlikely do to the .enable returning false in your case but worth mentioning.

-Todd
 
Back
Top