Hardware recommendations for newbie project

Hi all,

I am new to Arduino. Could you give me hardware recommendations for the following project:

As a hobby, I want to create a controller for my audio preamplifier with 4 digital (spdif) inputs, 6bit ladder volume control, auto power on, display and IR sensor.

See attached picture for a schematic overview of the required inputs and outputs.

Requirements:

  • The Arduino should be operating when the preamplifier is one and when it is in standby/sleep mode, so preferably power consumption should be low.
  • It needs a total of 4 digital/binary inputs and 12 digital/binary outputs
  • On top of that I want a front panel display that can show the used input channel and volume, for example “ch1 -34dB”, so preferably 9 digits or so. It should preferably have color text (orange or red or so) on a black background. One line of text is sufficient.
  • Next to or integrated into the display I want an IR sensor that can be use to control the pre-amplifier with a remote control (input channel, volume control etc.). No mechanical controls (knops) are needed, IR control only.

Questions:

  • Which Arduino board should I use to match with these requirements (4 digital inputs, 12 digital outputs, display, IR sensor and preferably low power)?
  • What hardware do you recommend for the display and the IR sensor?
  • Should I use a separate IR decoding IC or can Arduino cope well with that?/li]

Input/suggestions will be appreciated!

I am new to Arduino.

This is not a newcomers project in any way. In fact I doubt if it is possible at all using an Arduino.

I want to create a controller for my audio preamplifier with 4 digital (spdif) inputs

I doubt if it can run to one let alone four.

Grumpy_Mike:
This is not a newcomers project in any way. In fact I doubt if it is possible at all using an Arduino.
I doubt if it can run to one let alone four.

Hi Grumpy_Mike,

It does not need to "process" the 4 digital inputs, it only needs to control the relay switches that select the input signals. The processing of the signals is done by other electronics (SPDIF receiver, DSP and DA converters), which I already have.

OK but what is the “volume control output pins”?

Should I use a separate IR decoding IC

It depends on what you mean, you should use an IR sensor that gives you the pulses of the remote code, that is it will handle the demodulation of the IR signal.

What hardware do you recommend for the display

An LCD display that has enough letters for your needs which are a bit ill defined at the moment. LCD because you will have less problems with interference than using an LED display.

and the IR sensor

That depends entirely on the remote you want to use. It needs to be a sensor that handles the wavelength of your remote ( their are two common wavelengths used for IR emitters ) and also it has to match the modulation rate of your remote, anything from 28KHz to 42KHz in steps of 2KHz.

Grumpy_Mike:
OK but what is the “volume control output pins”?

The volume control consists of a 6 bit ladder network. This means that I need to control 6 relay switches for that. In fact, each output I’ve drawn on the schematic, except for the display off course, will be controlling a relay switch (via a transistor).

Grumpy_Mike:
It depends on what you mean, you should use an IR sensor that gives you the pulses of the remote code, that is it will handle the demodulation of the IR signal.

I could use an IR sensor that gives pulses of the remote code for the Arduino to interpret/detect them, or I could use for example a Philips or Sony IC that interpets the the IR codes itself. Any concrete recommendation (link?) for a IR sensor to use here?

Grumpy_Mike:
An LCD display that has enough letters for your needs which are a bit ill defined at the moment. LCD because you will have less problems with interference than using an LED display.

Nine characters would be perfect: “ch1 -34dB” on the display would mean that the preamp is using input channel 1 and the volume is set at -34 decibels (range -64dB to 0dB). But less than nine is also possible, I could even fit/design it in 2 characters if needed. Any concrete recommendations?

Grumpy_Mike:
That depends entirely on the remote you want to use. It needs to be a sensor that handles the wavelength of your remote ( their are two common wavelengths used for IR emitters ) and also it has to match the modulation rate of your remote, anything from 28KHz to 42KHz in steps of 2KHz.

I would like to use standard Philips audio amplifier RC codes (or alternatively sony audio amplifier RC codes)

The volume control consists of a 6 bit ladder network.

That is not going to be much good. That gives you only 32 volume levels and being linear there is not going to be much difference between steps at the top end. You are better off using a chip that is designed to do the job.
I2C three band tone control and 4 input channel stereo mixer - TDA7439

OR
PGA2311 Stereo audio volume control
Sound like what you need.

I would like to use standard Philips audio amplifier RC codes

Those are only the codes, you have to know how thes codes are modulated by your remote.

Any concrete recommendations?

Grumpy_Mike:
That is not going to be much good. That gives you only 32 volume levels and being linear there is not going to be much difference between steps at the top end. You are better off using a chip that is designed to do the job.
I2C three band tone control and 4 input channel stereo mixer - TDA7439

OR
PGA2311 Stereo audio volume control
Sound like what you need.

The 6-bit ladder network I use has 2^6 = 64 LOGARITHMIC steps of 1 dB per step, so 64 dB in total (=1400 x attenuation at -63 dB). I've been using that for many years now, works very well.

Grumpy_Mike:
Those are only the codes, you have to know how thes codes are modulated by your remote.

Let me rephrase the question: I would like to use a remote from a Philips amplifier (say Philips 900 series, or Sony ES amplifier from the year ~2000 alternatively). What hardware would be best to make that work on Arduino? The software to be created I will figure out later. Step one is to purchase the correct hardware.

Grumpy_Mike:
Overview | Character LCDs | Adafruit Learning System

Thanks for the link, this is very helpfull! Any concrete sugestion for the Arduino board and the IR sensor to use here?

edohulsebos:
Hi Grumpy_Mike,

It does not need to "process" the 4 digital inputs, it only needs to control the relay switches that select the input signals. The processing of the signals is done by other electronics (SPDIF receiver, DSP and DA converters), which I already have.

As I understand from this you want the Arduino to receive one of the signals, and then pass it unchanged to one of the outputs? Then why four outputs?

Even just passing through this is a lot of data for an Arduino to handle. Even if it can do this, there are likely to be glitches when it has to handle IR inputs or so.

Maybe the more powerful Teensy can help you out, otherwise it's on to the Raspberry Pi level of processing power.

wvmarle:
As I understand from this you want the Arduino to receive one of the signals, and then pass it unchanged to one of the outputs? Then why four outputs?

Even just passing through this is a lot of data for an Arduino to handle. Even if it can do this, there are likely to be glitches when it has to handle IR inputs or so.

Maybe the more powerful Teensy can help you out, otherwise it's on to the Raspberry Pi level of processing power.

No there is no passing through of any audio data. The Arduino only needs to set relay switches for volume control and input selection. The signals themselves will not go into the Arduino. For automatic input channel detection, however, there will be some electronics (opamps etc.) OUTSIDE the Arduino to detect if there is a input signal signal on a particular channel. But this status per channel will be sent to the Arduino as a single bit (true/false) per channel: 1 or true if there currently is a spdif signal on the channel, 0 or false if there is no spdif signal.

Let me rephrase the question: I would like to use a remote from a Philips amplifier (say Philips 900 series, or Sony ES amplifier from the year ~2000 alternatively). What hardware would be best to make that work on Arduino? The software to be created I will figure out later. Step one is to purchase the correct hardware.

Let me rephrase my answer. You can throw as many proprietary names all you like. What yo need to know is the modulation frequency and the IR wavelength. These are things that are no so common knowledge. Certainly the manufacturers will not tell you. Your only chance, if you are incapable of finding this out, is if someone has found it out and posted it on the net. That is what google is for.

Any concrete sugestion for the Arduino board and the IR sensor to use here?

Unless you know the above it is pointless recommending anything because the chances are it will not be compatible.

@wvmarle - I think you might have missed this quote from the OP:-

It does not need to “process” the 4 digital inputs, it only needs to control the relay switches that select the input signals.

Grumpy_Mike:
Let me rephrase my answer. You can throw as many proprietary names all you like. What yo need to know is the modulation frequency and the IR wavelength. These are things that are no so common knowledge. Certainly the manufacturers will not tell you. Your only chance, if you are incapable of finding this out, is if someone has found it out and posted it on the net. That is what google is for.
Unless you know the above it is pointless recommending anything because the chances are it will not be compatible.

Ah, ok. I was under the impression that the used IR wavelengths and carrier frequencies were pretty standardized and well known nowadays, as you can buy these universal remote controls everywhere. But apparently that is not the case? This hints me in the direction of buying a dedicate Philips remote control decoding chip with matching IR sensor and connect this to the Arduino, to save me from a lot of hassle. If I remember well, these chips have a 8 bit (or so) output interface (8 pins) that will than probably use 8 (or so) input channels on the Arduino, right?

Would an Arduino Mega 2560 be sufficient for my application? I can connect the display you suggested earlier on to that right? Probably it is an overkill of io channels, but it is still 'only' ~35 euros.

as you can buy these universal remote controls everywhere.

The universal remotes do not encode, they simply record the raw signal. Also they do not always work.

buying a dedicate Philips remote control decoding chip

The only problem with this is that they don't have one, they use a third party one. Normally they would use a Vishy decoder, but their are lots of them. For example google the TSOP17 series of decoders.

If I remember well, these chips have a 8 bit (or so) output interface (8 pins) that will than probably use 8 (or so) input channels on the Arduino, right?

No they have a single bit output.

Would an Arduino Mega 2560 be sufficient for my application?

It will do, but as you say it is probably overkill. I would stick with a Uno.

If you want to see what is involved see:-

Grumpy_Mike:
The universal remotes do not encode, they simply record the raw signal. Also they do not always work.
The only problem with this is that they don't have one, they use a third party one. Normally they would use a Vishy decoder, but their are lots of them. For example google the TSOP17 series of decoders.
No they have a single bit output.

What about the Philips SAA3049AP: https://lib.chipdip.ru/301/DOC000301618.pdf
I think this is multi bit output, or not? It is an old chip but you can still buy it on ebay for ~3 euro.

Grumpy_Mike:
If you want to see what is involved see:-
Receiving and Decoding IR | Using an Infrared Library on Arduino | Adafruit Learning System

Ah, thanks for the link! I'll have a more detailed look at this.

The Arduino should be operating when the preamplifier is one and when it is in standby/sleep mode, so preferably power consumption should be low.

Is the preamp mains or battery powered? If it’s mains then power consumptions is not that much of a constraint and isn’t worth worrying about. If it is battery, what voltage and capacity and how long does it currently last? How much life are you willing to give up to power your additional circuitry?

Power management is a significant undertaking in and of itself. It’s not worth it for something mains powered. Focus on the important problems, like learning how to manage the controller’s I/O and not introducing extra digital noise into the system, first.

It needs a total of 4 digital/binary inputs and 12 digital/binary outputs

An Uno can easily handle that. The 6 analog inputs can be used as digital, so there’s effectively 18 pins to use (2-13, A0-A5). If you need more I/O and it doesn’t need to be fast, you can use shift registers or port expanders so you don’t have to splurge on something more expensive like a Mega.

On top of that I want a front panel display that can show the used input channel and volume, for example “ch1 -34dB”, so preferably 9 digits or so. It should preferably have color text (orange or red or so) on a black background. One line of text is sufficient.

Adafruit has RGB backlight negative LCD displays. It looks like it uses a lot of pins, but you can get serial backpacks to solder onto the back of them that will let you use SPI, I2C, or UART to control them and save many pins.

Next to or integrated into the display I want an IR sensor that can be use to control the pre-amplifier with a remote control (input channel, volume control etc.). No mechanical controls (knops) are needed, IR control only.

Most IR remotes are probably NEC protocol with 38 kHz carrier frequency. You can easily find 38 kHz IR receivers, and the IR library uses interrupts to decode the serial stream so it’s not that CPU intensive to receive data.

For automatic input channel detection, however, there will be some electronics (opamps etc.) OUTSIDE the Arduino to detect if there is a input signal signal on a particular channel. But this status per channel will be sent to the Arduino as a single bit (true/false) per channel: 1 or true if there currently is a spdif signal on the channel, 0 or false if there is no spdif signal.

I think that’ll be fairly easy. It looks like S/PDIF uses a type of Manchester encoding, so there will be constant transitions on the line when data is flowing. Use a Schmitt Trigger or optocoupler to buffer the signal and use it as the input to a retriggerable one-shot, like a 555 timer. Set the on time equal to the length of a few periods of the digital signal. As long as the signal is active, the incessant switching will cause the one-shot to be continually retriggered and held active. When the signal goes away, the timer is allowed to expire and go back to the inactive level.

Jiggy-Ninja:
Is the preamp mains or battery powered? If it’s mains then power consumptions is not that much of a constraint and isn’t worth worrying about. If it is battery, what voltage and capacity and how long does it currently last? How much life are you willing to give up to power your additional circuitry?

Power management is a significant undertaking in and of itself. It’s not worth it for something mains powered. Focus on the important problems, like learning how to manage the controller’s I/O and not introducing extra digital noise into the system, first.An Uno can easily handle that. The 6 analog inputs can be used as digital, so there’s effectively 18 pins to use (2-13, A0-A5). If you need more I/O and it doesn’t need to be fast, you can use shift registers or port expanders so you don’t have to splurge on something more expensive like a Mega.Adafruit has RGB backlight negative LCD displays. It looks like it uses a lot of pins, but you can get serial backpacks to solder onto the back of them that will let you use SPI, I2C, or UART to control them and save many pins.Most IR remotes are probably NEC protocol with 38 kHz carrier frequency. You can easily find 38 kHz IR receivers, and the IR library uses interrupts to decode the serial stream so it’s not that CPU intensive to receive data.
I think that’ll be fairly easy. It looks like S/PDIF uses a type of Manchester encoding, so there will be constant transitions on the line when data is flowing. Use a Schmitt Trigger or optocoupler to buffer the signal and use it as the input to a retriggerable one-shot, like a 555 timer. Set the on time equal to the length of a few periods of the digital signal. As long as the signal is active, the incessant switching will cause the one-shot to be continually retriggered and held active. When the signal goes away, the timer is allowed to expire and go back to the inactive level.

Thanks a lot for all your input, this is very helpfull! I did’t think of using a 555 timer for this yet, elegant suggestion! S/PDIF indeed has contant transitions on the line.

What about the Philips SAA3049AP: https://lib.chipdip.ru/301/DOC000301618.pdf
I think this is multi bit output, or not? It is an old chip but you can still buy it on ebay for ~3 euro.

Just because their is Phillips semiconductor chip ( now called NXP ) does not mean that the Phillips consumer division used it. I know for a fact that their digital terrestrial set top of the same era did not use Phillips chips in the IR remote.