Skip to content

A BBC stereo Peak Programme Meter with an i2s input.

License

Notifications You must be signed in to change notification settings

ea7kir/i2s-PPM-Display

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An i2s Stereo PPM Display

Stereo PPM

A Peak Programme Meter (PPM) displays audio levels on a logarithmic scale numbered 1 to 7. It responds fast to peaks and returns slowly. The attack and return ballists allow an experienced operator to produce a consistent volume levels accros varrying material.

MS mode (ie Mid/Side) can be selected with an external toggle switch.

It is not a True Peak Meter, VU Meter or a modern Loudness Meter. However, it has been in use for decades and is highly respected by many profession audio enginers. Invented by the BBC and evolved to the current specification emulated here. It is identical in everyway to the EBU and SABC meters, except for the scale markings. A VU meter is slow to respond to peaks and does not have a logrithmic scale. A True Peak Meter reponds to very short peaks, but does not measure volume. A Loudness Meter does what if says on the tin, but could be overkill for DATV.

NOTE: The above is a simplified summary to what is a very complicated subject.

Current Status

All development takes place on the main branch, so it might be better to douwnload the latest release.

The firmware is fully working and the ballists are close to the IEC 60268-10 Type IIa specification. Of cource, there is room for improvement.

The firmware works in MASTER mode at 48kHz when connected to a AudioPhonics Stereo ADC Board WM8782. Other ADCs and USB or HDMI to i2s adapters may also work, provided they operate in SLAVE mode at 48kHz.

Hardware

LilyGo T-Display-S3R8 version H569 or H577 with 1.9 inch ST7789 LCD Display. Models H569/H577 do not have a touch screen and this is important. The touch screen versions will not work!

Link: LilyGo T-Display-S3R8

Any "Standard/Philips" i2s input device, such as a TOSLINK, S/PDIF or Analogue to i2s convertor operating in SLAVE mode at 48kHz 16bit.

Example: AudioPhonics Stereo ADC Board WM8782

External toggle switch to enable MS mode.

Pin Connections

The i2s specification omits to provide a standard for the bus names.

The AudioPhonics solder pads are labeled B, LR, D and CLK, as follows:

        alias           also known as
B       Bit clock       BCK, SCK, BCLK, etc.
LR      Word clock      WS, LRCLK, FS, etc.
D       Serial data     DATA, SD, SDATA, SDIN, SDOUT, DACDAT, ADCDAT, etc.
CLK     Master clock    MCK, etc. 

If using the AudioPhonics Board, connect as follows:

AudioPhonics pad B   to T-Display-S3R8 pin 12
AudioPhonics pad LR  to T-Display-S3R8 pin 11
AudioPhonics pad D   to T-Display-S3R8 pin 10
AudioPhonics pad CLK to T-Display-S3R8 pin 3

The AudioPhonics Board can be powered for the T-Display-S3R8 as follows:

AudioPhonics pad GND  to T-Display-S3R8 pin G
AudioPhonics pad +5V  to T-Display-S3R8 pin +5

Set the AudioPhonics DIP switches and jumpers as follows:

DIP switches, left to right:
-  0  -  -

Jumper, top to bottom:
left
right
left

The T-Display-S3R8 must be powered via the Type-C USB socket. A normal USB data cable for firmware flashing, or a power only cable for normal use. Attepts to feed power in via any other means is not reccomended.

Connect a toogle switch between GPIO Pin 1 and GND to enable MS mode.

Installing

Use VSCode with the PlatformIO extension.

Edit file: 
    .pio/libdeps/lilyg0-t-display-s3/TFT_eSPI/User_Setup_Sketch.h

Comment out line:
    #include <User_Setup.h>

Uncomment line:
    #include <User_Setups/Setup206_LilyGo_T_Display_S3.h>

And according to Bodmer Issue #2608

Edit file:
    .pio/libdeps/lilyg0-t-display-s3/TFT_eSPI/User_Setups/Setup206_LilyGo_T_Display_S3.h

Add line:
    #define TFT_CS 6

These edits are essential, and remember to re-make these alterations after running a "Clean All" command.

Calibration

Adjust the analog input level so that PPM 4 lines up with a -18dB Full Scale 1kHz Sinewave source.

Note: The AudioPhonics ADC specifies the maximum input to be 1V RMS (2.8284Vpp), so a simple adjustable gain stage or attenuator will almost certainly be required.

If the I2S signal is coming directly from a digital source, no adjustment should be neccessary. For example, an HDMI box with an I2S output. Note: S/PDIF and TOSLINK both carry I2S.

PPM Specification

IEC 60268-10 Type IIa (more info in the docs folder)

Scale marks: 1, 2, 3, 4, 5, 6, 7

                           PPM
Scale     1     2     3     4     5     6     7
Marks  |  |     |     |     |     |     |     |  |
dB FS    -30   -26   -22   -18   -14   -10   -6
dB steps     4     4     4     4     4     4

Usefull range: 24db between Mark 1 and Mark 7

Mark 4: corresponds to -18dB FS sinewave

Integration times:

Response to isolated bursts of sine wave whose steady state amplitude deflects to Mark 6.

100ms of 5kHz    0.0   ±0.5dB   (ie appox Mark 6)
 10ms of 5kHz   -2.5   ±0.5dB
  5ms of 5kHz   -4.0   ±0.75dB  (ie appox Mark 4)
1.5ms of 5kHz   -9.0   ±1.0dB
0.5ms of 10kHz -17.0   ±2.0dB

Return time: 24 dB in 2.8 ±0.3 seconds (from Mark 7 to Mark 1)

MS mode conforms to the -6dB standard.

License

Copyright (c) 2023 Michael Naylor EA7KIR (https://michaelnaylor.es)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

About

A BBC stereo Peak Programme Meter with an i2s input.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages