Arduino Turns Off Idle Amplifier
by zmashiah in Circuits > Arduino
21755 Views, 30 Favorites, 0 Comments
Arduino Turns Off Idle Amplifier
What is this?
NovaIdle is monitoring amplifier for idle time (no music played) and turns off the amplifier with IR command It is written and tuned for the Peachtree Nova amplifier that has a tube. I wrote this program as I tend to forget the amplifier on and given the tube has limited ifetime, I am always feeling bad when I see it still on few hours later. Not to mention of course that we can be a bit more green by preserving power.
I published another version of this (for a Kenwood amplifier too)
What You need to build this?
1x Arduino (any type will do)
1x IR LED (950nm Wavelength)
1x 200 Ohm Resistor
Donwnload and install the Arduino IR library (http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html)
Optional Components:
1x Blue LED
1x Yellow LED
1x Green LED
3x 330 Ohm Resistor (anything from 220 to 330 will do)
1x Prototype board to solder and connect the above
1x 3.5mm Earphone Stereo Jack
1x RCA to 3.5mm Stereo cable
1x USB Power supply (or you can feed it from other source)
How it works:
The program is written for Arduino, basically reading left and right signals on Analog inputs (A0 and A1) from a line level out of the Nova (connector 16 on the Peachtree user manual diagram). If no music is detected for some time (constant idleTimeToTurnOff) then the Arduino will send a power-off IR command that will turn the Nova amplifier off. Gladly the Nova has an actual power-off and not only power toggle code.
Sampling the audio in every 2 secods and the idle time is set to 5 minutes (you can change it in the code), enough time to swap CD's or to tell my Sonos which album to play next. The audio sampling is not done in one shot, as we can randomly find the Arduino ADC measuring 0, so we sample 10 consequential on each channel (left and right). The detection uses simple max on all samples.
Technical Notes:
I found it mandatory to use a load resistor on the A0 and A1 since when the Nova amplifier is off, the ADC on the Arduino is reading very random numbers. Using the load resistor to ground (10K Ohm) made the samples when amplifier is off to 0 (good!).
Overall, using Arduino for something as simple as this, is a bit of an overkill I admit, but would you like to solder and program ATTiny13 or something like that without a boot loader, spend hours on the SW deployment and HW side when with few extra dollars you get it easily with the Arduino? I decided to use the Aduino Nano for this purpose, simple small and nice one. The Arduino have enough IO ports still, so I am taking some of the internal state and expose it with LEDs, please see below. These LEDs are optional and connect/assembly only if you like. These are the LEDs that I used:
Pin Meaning LED
------- ----------- -----------------
13 Power (on-board)
12 Playing Green
11 Idle Yellow
10 Amplifier Blue
The Blue LED will light up if the unit will detect the amplifier is on.
The Yellow LED will light up if the unit will not detect any music.
The Green LED will light up if the unit will detect music is playing.
The Power LED will be on by default and blink off on each sample.
The IR LED needs to be 950 nMeter LED. You can find these pretty easily. I am using 2x100 Ohm resistors in series for this LED (200 Ohm) as I want some power when transmitting. This will drive about 18mA through the IR LED which is good and safe. Do note the polarity of the LED (long leg is positive (throough resistor to the Arduino) and short leg to ground.
The Nova does have IR Input jack and IR Output Jack that in theory I could use for this application, however when you plug in the IR Input jack it disconnectes the IR decoder internally so that the remote will stop working and to revive it I would have to pole IR from remote using an IR sensor and send it through the Arduino to the Nova. I think this is way too complicated and not really necessary.
Nova IRC odes as recorded by IRemote library
---------------------------------------------
Off FF6897
Mute FF28D7
USB FF708F
Coax1 FFB04F
Coax2 FF30CF
Opt1 FF50AF
Opt2 FF906F
Aux1 FF10EF
Aux2 FF609F
Aux3 FFA05F
Tube FF20DF
Vol- FF807F
Vol+ FF00FF
Novar IR Codes as reported by Peachtree
---------------------------------------------
Nova
====
NEC uPD6121 protocol
custom code 00FFh
USB 0Eh
COAX1 0Dh
COAX2 0Ch
OPT1 0Ah
OPT2 09h
AUX1 08h
AUX2 06h
AUX3 05h
TUBE 04h
VOL+ 00h
VOL- 01h
MUTE 14h
STBY 16h
STBY_OFF F0h
STBY_ON F1h
MUTE_OFF F2h
MUTE_ON F3h
TUBE_OFF F4h
TUBE_ON F5h
Inspecting the codes, it is clear either Peachtree or the IRemore library are reversing the LSb and MSb of each byte, but who cares :-) I took the STBY_OFF code and fixed it according to how the library actually works.
Last, but not least, I want to thank the Peachtree support for giving me the IR codes and wavelength information and being very prompt in sending replies. Good service always deserve mentioning.