Subj : Play audio from a serial port To : AKAcastor From : Bob Worm Date : Fri May 10 2024 14:01:16 Re: Play audio from a serial port By: AKAcastor to Bob Worm on Thu May 09 2024 11:06:48 Hi, AKAcastor. I have returned from my work travels and put the incredibly complicated 2 component circuit together - great success! So, essentially if I fire all zeros at it then (pre-filter) my oscilloscope measures 11.5kHz. I suspect it's just counting transitions, though, so it's probably being a bit literal. The low pass does a good job on that, like 370mV p2p left out of the 3.5V leaving the UART. I didn't have a 0.02uF capacitor so I used a 0.022, according to an online calculator that means the low pass comes out to 2.7 kHz instead of 2.95 kHz. It have a pair of .01uF here so I could try that, but it worked well enough that I didn't bother. I'm sure someone far more into the maths and engineering than me could do some sums and figure out if the analogue circuit is attenuating that as if it's 11.5kHz or 57.6kHz... I dunno :) And so... the output was quite "hot" as described on the blog, about 3V p2p with audio. I hadn't thought about it before but obviously it also has a bias of about 1.5V. I didn't fancy feeding that into anything so I stuck a potentiometer after the output and a capacitor in series to block the DC. Result: Surprisingly decent audio, actually. Nothing you'd want to listen to for leisure but, yeah - broadly similar to what's shown in the video on the blog. Possibly it would sound better if it were played through speakers and re-recorded to smooth out some of the rough edges (as in the video). Fun oddity: with my oscilloscope sat post-filter I noticed that it would trigger and display a waveform when sending audio but not when I just sat there mashing the keyboard in the terminal. Space would sometimes trigger it and the arrow keys always did... It turns out because it idles high, you need either a lot of data (arrow keys send 3 characters back to back) or a very "zero-dense" character, such as space (which only has one bit set), to drain enough out of the filter capacitor for the 'scope to notice the voltage drop :) I'm going to put together a cheeky YouTube video showing all of this but I need to source some different audio, as I think that LMNC track is available to buy and I don't have permission to use it... BobW --- SBBSecho 3.20-Linux * Origin: >>> Magnum BBS <<< - bbs.magnum.uk.net (21:1/205) .