Anyone have I2S or SPDIF output currently working on a 3.9 board and OS 7? Having trouble

Hey folks, building a proffie based 2 button prop that will not be using the onboard speaker out at all, I have a separate amp with a 3.5mm input jack, looking to use either a small I2S DAC ( PCM5102A) or a standalone little 5v SPDIF dac block to convert. I have both in my shop but can’t seem to get viable signal to either. All components have been cross tested with other hardware, and the proffie runs fine through the onboard speaker out. We tried the appropriate I2S/SPDIF enable defines in the config (separately, not simultaneous) to no avail. We’re following the V3 pinout diagram from (ie data 3, data 4, free 1 for I2S)… I know the pinouts were different for the V2 boards. One quick question I had (as a non coder so forgive me), when I look at the dac.h file in the Proffie OS 7.0 code, I see reference to the AUX pin being used for data for both I2S and SPDIF, as opposed to Data 3 as on the current pinout diagram. Is it possible I’m using the wrong pins and they switched back to using AUX for some reason without the diagram being updated? If anyone successfully has either digital audio output working on a V3 and could give us insight or share code, we’d be super grateful!


I can can do some testing to make sure it hasn’t succumbed to bit rot at some point. (I’m not sure anybody has used this functionality, and things that are never used sometimes stop working…) In the meantime, please post your config file and I’ll take a look at that and rule out simple errors.

That’s for V2 boards.

Hello, I work with CapnInedible, and here is the config file we are currently using!

#include "proffieboard_v3_config.h"
#define NUM_BLADES 1
#define NUM_BUTTONS 2
#define VOLUME 100
const unsigned int maxLedsPerStrip = 144;
#define ENABLE_WS2811
#define ENABLE_SD
#define ENABLE_I2S_OUT
#define LINE_OUT_VOLUME 2000

Preset presets[] = {
   { "TeensySF", "tracks/venus.wav",
    StyleNormalPtr<CYAN, WHITE, 300, 800>(), "cyan"},
   { "SmthJedi", "tracks/mars.wav",
    StylePtr<InOutSparkTip<EASYBLADE(BLUE, WHITE), 300, 800> >(), "blue"},
   { "SmthGrey", "tracks/mercury.wav",
    StyleFirePtr<RED, YELLOW>(), "fire"},
   { "SmthFuzz", "tracks/uranus.wav",
    StyleNormalPtr<RED, WHITE, 300, 800>(), "red"},
   { "RgueCmdr", "tracks/venus.wav",
    StyleFirePtr<BLUE, CYAN>(), "blue fire"},
   { "TthCrstl", "tracks/mars.wav",
    StylePtr<InOutHelper<EASYBLADE(OnSpark<GREEN>, WHITE), 300, 800> >(), "green"},
   { "TeensySF", "tracks/mercury.wav",
    StyleNormalPtr<WHITE, RED, 300, 800, RED>(), "white"},
   { "SmthJedi", "tracks/uranus.wav",
    StyleNormalPtr<AudioFlicker<YELLOW, WHITE>, BLUE, 300, 800>(), "yellow"},
   { "SmthGrey", "tracks/venus.wav",
    StylePtr<InOutSparkTip<EASYBLADE(MAGENTA, WHITE), 300, 800> >(), "magenta"},
   { "SmthFuzz", "tracks/mars.wav",
    StyleNormalPtr<Gradient<RED, BLUE>, Gradient<CYAN, YELLOW>, 300, 800>(), "gradient"},
   { "RgueCmdr", "tracks/mercury.wav",
    StyleRainbowPtr<300, 800>(), "rainbow"},
   { "TthCrstl", "tracks/uranus.wav",
    StyleStrobePtr<WHITE, Rainbow, 15, 300, 800>(), "strobe"},
   { "TeensySF", "tracks/venus.wav",
    &style_pov, "POV"},
   { "SmthJedi", "tracks/mars.wav",
    &style_charging, "Battery\nLevel"}
BladeConfig blades[] = {
 { 0, WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(), CONFIGARRAY(presets) },

Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
Button AuxButton(BUTTON_AUX, auxPin, "aux");

#include "../props/saber_shtok_buttons.h"

Your config file looks reasonable to me.
I haven’t tested your config file yet, but I did do a test with SPDIF out which my test setup, which isn’t that different.

I use one of these:

I wire GND ↔ GND, Vin ↔ Data3, Vcc ↔ 3.3v, and then I plug the optical output into my receiver and it works.

As a bonus, you can see it working, because the red light at the end of the toslink cable will turn on when sound is playing and off when nothing is playing.

Now, I used ProffieOS from github, experimental version of the arduino-proffieboard plugin and my own config file, so there is a possibility that some difference between your setup and mine would still not make it work for you. That said, I don’t remember making any that would be likely to affect this code.

What does your wiring look like?

PS: I’ve never listened to the “smoothfuzz” font.wav in it’s full glory on a receiver before, holy moly.

Note that if you want to skip the optical step, then you need some components to adapt the output to the right voltage levels. S/PDIF over copper is supposed to be 0.5 volts peak-to-peak, but Data3 gives you 3.3v volts peak-to-peak.

I have a diagram for a circuit posted elsewhere on this forum, but it’s completely untested and I would recommend using optical if at all possible.

As for I2S, I can test that the board generates an I2S signal, but I don’t know for sure if it will be compatible with PCM5102A or not. (I don’t have one of those.)

Ok, we were definitely attempting SPDIF over copper because I didn’t have an optical generator like that on hand. So that voltage variance may be the issue. I’ll try to grab one of those. I2S would be ideal for us to cut down on components, as ultimately we’re just trying to get audio from the proffie to the 3.5mm line level input on our amp in the easiest way possible. I’ll retry the 5102A, as I found the prior thread where lefty_37 was using one for a Thor’s Hammer build and apparently needed to use the bck instead of sck pad

Also, not sure on the etiquette on these things, but is it allowed to inquire on the forum about just commissioning someone with the correct know how to create and test a custom prop file and associated config for us? We’re rushing to get a chainsaw prop prototype done this month, and while there’s a bunch of proffie saber functionality that’s perfect (multiple sound fonts, triggered rev sound via lockup and drag function, swing sounds, neopixel blade/chassis effects), there’s also a bunch of gesture control, battle mode etc that we’d be best off disabling. I know you don’t allow buying/selling of products on the site, so I didn’t know if that included requests for custom dev services. (Been out of the scene so long, the last board I put in was an Igniter 2. lol)

In to see how this plays out because @CapnInedible and @Armorer-Nauur “This is the way.”? MandoBusiness?? :smiley: *Welcome to TheCrucible!

I mean, the easiest way to get a line-out is to just hook it up the speaker out pads, something like:


The SP+/SP- is 10v peak-to-peak, and if my math is right, something like this would bring it down to ~0.5 volts.

SPDIF should also work though. I’m not sure why it wouldn’t.
Have you tried using a digital analyzer to see what signals you’re getting out?

Absolutely, inquire away. :slight_smile:
Asking for help, paid or not, is always allowed.