As one can imagine, the media, especially our good friends at Mybroadband are all on the bandwagon about IoT (Internet of Things). Well, I take a pretty dim view at this reinvention of the wheel, but now is the time to put the career liars aka journalists in their place about this stuff.
What is all the hype about?
LOLWUT, we've had little things on the internet as far back as 2001, when cellular modem modules became easily available and GPRS was in place. Just don't educate the journalists on that one OK, they don't like their bubble to be burst. But let's move on shall we...
First we saw Zigbee in 2005, which was supposed to be something along these lines.It was also hyped to the extreme, but turned out to be not so cool after all with its proprietary and complicated stack and demands on RF design expertise (it operates in the 2.4GHz band, smack bang in the middle of the Wi-Fi bands).
SigFox? More like SigFox us yor monise and we might allow you to play... Merci beaucoup!
Fast forward to 2011, and we have these French twits, SigFox, who developed their own proprietary protocol using the ISM bands (which, as it is, are already crowded in South Africa with every man and his dog and their remote controllers for security gates and alarms) and they then relay these small packets to a cellular network. Clever idea that, to piggyback on the machine of the greedy money hungry cellular networks.
However, as it would turn out, its not that simple. I recently took on a client who had a good product idea to use this network, and guess what, we were met with a roadblock. SigFox wanted money, pretty much the same setup that the USB Implementer's Forum run, where you need to pay money for a Vendor ID- that magical hexadecimal number that allows your spot in the sun on the USB bus. So yeah, what MyBroadband won't tell you is the following facts:
It is as easy as chips to do this using off-the-shelf parts, a few good ISM band radios from TI or Silicon Labs, and a nice base station with a good modem using a private APN, as has been done for a long time by the alarm system companies.
I am in the wrong business I tell you.. I should also make money off the general stupidity of the general public.
So I have been hard at work trying to get my headphone amplifier finished. One of the design ideas was to send the digital audio in pass-through fashion via the CPU. However the fact that the STM32F072RBT8 cannot generate the exact sampling rates (there is a percent of error) I decided to make it "listen" to the I2S bus instead. This is done in order that I can do stuff, like a level display, or a spectrogram. It also puts to rest, any possible accusations from audiophiles that I am "fiddling" with the audio and there cannot be any jitter whatsoever.
It was not difficult to get the digital audio up and running, however, few appreciate how much work it is for a CPU to do processing on audio. I am presently reading in all 24 bits at 48kHz sampling rate, and right off the bat we are seeing the CPU take strain.
Therefore, there is only one thing to be done, DMA (direct-memory-access) to the rescue. That means, chucking all we receive, into a circular buffer, and processing that at leisure, i.e. computing the FFT for the spectrogram and the dBm for level (VU) display. The DMA has all the necessary logic to hold off the ARM CPU and all that shit that makes my brain hurt trying to think about it. More about my success (or failure) with that in an upcoming blog post.
With DMA it would be then possible to pass-through all the audio, but alas, the STM32F072 cannot generate accurate master clocks (the percentage error is rather high at 192kHz). While I am sure this will not be seen/heard except with insanely expensive Audio Precision test gear, I do not want to even entertain the idea of that- don't want to provide the fuel for audiophile debates which in turn would condemn this project before it even gets a chance in the market.
Interesting times during debugging
Without fancy (aka fucking expensive) test equipment, I needed to get creative to test the interfaces. And I did that, using rudimentary tools. The three applications I used (in conjunction with my PC sound card's OPTICAL OUTPUT) were as follows:
Then, I opened it for editing in WinHEX, and was greeted by the familiar wav file formatting. Using the reference given here I found where the audio samples began and ended hence, the places where I could do stuff.
Using the feature in WinHEX I marked the start and end positions of the audio data, then used the tool provided in the application to fill each sample with 0x61BA03. This is a unique-enough number to be spotted at a glance in the debugger.
Then, the next step was to use something to play that back, preferably in a loop for debugging. I tried a few programs and found they all did something to the audio i.e. dithering or filtering. I then tried VLC and found that it output the file "as-is", well nearly anyway.
I was perplexed because I was still seeing dithering with VLC, then I remembered I set up my STM32F072 to receive 24-bit audio, and when I checked my output setting, it was set to 16-bit mode- DAMN!
After setting it to 24-bit 48kHz, I got the exact data in the .wav file, being streamed into the microcontroller. YAY! This also proves to the snake-oil consumers (aka audiophiles) that VLC is suitable as a reference media player, its properly designed and whatever is in the .wav file is sent to the D/A converters verbatim! I proved it.
So, this opens up an interesting idea or concept. It proves that .wav files can be used to transmit arbitrary data. I found out later that this is indeed how ONKYO do firmware upgrades on their AV receivers. They give the repair shops a CD or .wav file to play back with a regular CD player or VLC on a laptop, and boom- the new firmware is installed that way including updates to DRM and HDCP keys.
So what to do now about the HDM01
Well, as mentioned, we're going to DMA our way into a solution, and then simply sample the data at a slow rate. This is why DSP chips, are still the first choice for signal processing and why A/V receivers have a DSP, typically an Analog SHARC or Blackfin, in conjunction with a master microprocessor.
The design work on the Alpha-X HDM01 is progressing well. This past weekend I did the necessary to get the digital audio path up and running. Even though many books and other educational resources tend to steer clear of this subject, its really not that difficult or mysterious.
The screenshot below is what it looks like when audio is played back, with a sample rate of 48kHz at 24 bits. Indeed even my humble oscilloscope (25MHz) is fast enough to capture this in real time. The upper trace is LRCK, and the lower trace is the PCM data, all 24 bits of it.
The above was captured during playback of this album (track 1):
A note for the audiophiles reading this blog post:
The LRCK is measured by the 'scope as 47.98kHz. This is NOT an accurate measurement, the Rigol oscilloscope never excelled at frequency measurement hence why we use a dedicated frequency counter. So there is no argument here for "jitter". At any rate, this system uses oversampling, we cannot reasonably expect to install non-oversampling D/A converters in this system, because a) there is no space, and b) that would raise the cost of this system into the stratosphere, and c) such devices are not really offered anymore due to cost and low demand (Surprise- semiconductor companies are businesses too, complete with suits and corporate greed!)
A note about jitter in digital audio:
In digital audio, jitter refers to the deviation of the clock source from the ideal, or nominal rate. In the early days of digital audio this was a fuck-up! Jitter meant the D/A converter began to do "stuff" it wasn't supposed to, leading to quantization noise and other "artifacts" that one might have experience with when cueing or mucking about with heavily compressed MPEG sources.
In systems such as these, especially in 2017, the best D/A converters in the world are of the Sigma-Delta modulated type, which is, by virtue of its inherent design, largely unaffected by jitter. The sampling rate is insanely high, rendering any harmonics and intermodulation products virtually non-existent in the audio band. Indeed, the low-pass filter required for the D/A converter chip is a simple pi-filter. No need to go the whole hog with Butterworth or Chebyshev, raising the cost because of the need of expensive WIMA capacitors and E96 series resistors.
Also, we have now got the benefit of some 30+ years of DIR (digital interface receiver) design behind us, meaning we have clever electronics that can tolerate an insane amount of distortion in the digital audio path and automagically a beautifully stable and jitter-free clock is obtained.
It is my belief that many audiophiles are wasting a lot of their money pursuing snake oil with fancy gold plated S/PDIF cables and other contrived items. In this exercise I have managed to obtain the sound I wanted, that often-elusive studio quality, on a budget, and on a fucking breadboard! The difference is that I know what I am doing!
This is perhaps the best reason why I enjoy anime so much. Sure, in the past, it was like to a varying degree that they did stuff like am about to describe, but I was watching Tenshi No 3P! yesterday, and right from the opening scenes, this caught my eye:
Just on the face of it, that there, looks too damn real, so within one Google search we find the real McCoy
A pretty neat piece of kit folks, a Steinberg UR22. Congratulations Steinberg Media, you've been featured in anime.
Review can be found here: www.soundonsound.com/reviews/steinberg-ur22
It interfaces directly to Cubase, which is of course, the software package used by one of the characters in this anime too :)
The following is posted as "news" but its short and sweet, because the journalists haven't got a FUCKING clue what it means. All they care about is making $$$.
Link to Article
So they write a bit of waffle, to get the Chicken Littles running around "Whoooah the sky is falling" you know, the true journalistic style.
Details of how PsSetLoadImageNotifyRoutine is meant to work, and how the bug alters it, are available on the enSilo blog.
That's because Kevin Spamcaster, and friends, doesn't even know how to write one single line of code, yet they are allowed to publish shit every day about stuff they have NO AUTHORITY on! Trusted in tech? No, trusted in CLICK-BAIT and PEDDLING SHIT!
So today I got a nice little mailer in my inbox from Crunchyroll, and they're pretty much raving about a new anime called tsuredure children. So I went to check it out. If you like the high school romance genre, its pretty nice, but I like one aspect of it very much, its visually expressive and the art is awesome.
Now normally I just watch one episode of an anime and decide if I like it or not, well so far I am already 3 episodes in so its holding my interest :)
This article is the first in a series of hard-hitting writings about the sad state of affairs that is the supply chain of electronic components in South Africa, and what their role is in holding this country even further back.
Firstly I would like to state that I really couldn't give a fuck less about they think of me before, or after this piece, but I feel its about time the bullshit gets the exposure it needs. The whole industry is more or less unchanged from the Apartheid years, dominated by people with agendas, and plenty of unethical behaviour behind the scenes. Its largely a kickback driven business, I am not entirely sure of the inner workings but judging by the kinds of vehicles these glorified salespeople drive, they sure make a FUCKLOAD more tom than even the best software developers I know.
Make no mistake, this lot will discuss you behind your back, spread rumours about you, snitch to your former employers about where you are working now, and make it as difficult as fuck to get another job in the industry. This was one of the key reasons why I got out of the industry to begin with, and changed careers to the somewhat liberal world of IT and software development.
Before I get into the meat of this article, I wish to point out that these suppliers are typically the suppliers that deal with the trade, they are not the same as the local Communica, Yebo Electronics, or Mantech, and this is very important, because the smaller suppliers, typically those that deal with the general public have service levels orders of magnitude better than this lot.
Recently I have had the need, to deal with this industry again, because I have been required to do some electronic design for my employer, to solve some problems with the terminals. I also deal with them from time to time because I do develop stuff at home- I am after all part and parcel of the maker scene.
The bottom line is that if you check any one or more of the following boxes, they really just wish you would fuck off and stop wasting their time:-
Exposed: HI-Q Electronics
This is one of the newer companies established somewhere along the line, not nearly as big as the two big beasts (Arrow and Avnet) but nonetheless a supplier. The unfortunate issue here is that they are franchised for Renesas, and for the two projects I am developing (HDM01 and TOXC28) I need an e-volume chip. So I thought I'd hit them up and ask for info, and by that I mean, a datasheet or two, and possibly the procurement of a sample or two.
It has taken me a week basically to get anywhere with these people. Firstly their much-advertised e-mail address firstname.lastname@example.org is so overloaded with FUCKING SPAM probably that any e-mail sent there bounces back.
So I proceed to call the Cape Town office and I am told that a certain Ettienne is the guy in charge of the Renesas product line. So I get given the e-mail address. No response. So I decided to call them again this time the Gauteng office. I was put through the FAE for Renesas, Callie is his name, and I must admit when he heard about the application he was less than enthusiastic. I then was put through to a certain Jody and he took down my request info, and I followed that up with an e-mail. Cool, or so I thought, until I get an e-mail in the dead of night where they are discussing me in Afrikaans and obviously copied me in by mistake. The term "eish" was used, which for my overseas readers translates roughly to throwing your hands in the air and saying "I don't know what the fuck to do with this"
So, HI-Q is the second entrant on my personal blacklist of suppliers who will never see my business again. Avnet South Africa has held the top spot for a while now, especially since Des Hefer made the mistake to forward correspondence I sent to the company to my former employers, which anyway you look at it, is unethical and illegal.
So let's see:
That is how he rolls! Sonikku ga omocha ja nai desu!