Link training / ear protection for badge link
- Truncate descriptions
We need something to negotiate baud rates, and also start that negotiation with something that doesn't hurt any ears or headphones or midi in case the wrong thing is connected to line out. (Audio is usually +/- ~0.5v, our UART is 3.3v, it can be loud)
@moon2 suggested:
one feature that we could add to this bus bandwidth test is to start with a signal that a) is relatively harmless in case somebody does have headphones plugged in and b) can be handled by most cables if the receiving badge is configured properly. if this transmission fails the "handshake" is aborted completely.
disregarding power handling of headphones, a good candidate would be a "pwm ramp up" with a base freq of maybe 200-1000kHz that starts at a pulse width of 0% and increases it up to 100% over the course of a few seconds. this way, there shouldn't be any DC pop on the headphones and the mass of the membrane should provide enough filtering, but ultimately we'll arrive at steady bandwidth-independent 3.3V that could be echoed in similar fashion by the other badge.
The idea above could apply to badge-to-badge communication over UART
For midi devices there's no baud rate to negotiate (only 31250) and the device on the other side won't echo anything (might respond to midi sysex identity), but we should still ensure no ears are hurt if headphones are connected.
The current version of the code only has one layer of protection against this: if nothing is connected on line out, it refuses to enable badge link on that jack. That's so that you don't forget it's in that mode and later connect headphones. (We can make that symmetric with #16 (closed) but it's not very important)
- Show labels
- Show closed items