Automatic Volume Control using IR LED

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
paulc1
 
Posts: 41
Joined: Sat Sep 24, 2011 10:30 pm

Automatic Volume Control using IR LED

Post by paulc1 »

Out of frustration over TV stations and advertisers's intrusive actions raising volume during commercials, and inspired by Adafruit's tutorial on IR Detectors, I built a mouse trap with a Mic and an IR sending LED that could be set to a HI/LO level beyond which the gadget would send an IR code to either lower or higher volume if those limits were exceeded.

Attached are a couple of shots of the gadget.

It consists of a mic feeding an amplifier with adjustable gain and sensitivity ,with the output to an analog input of an Atmega328 programmed to send a pre-set HI/LO IR codes if exceeded.to an IR LED.

A 4Quad comparator compares the signal level with a voltage divider of 4 resistors adjusted to a logarithmic Db levels,and the output to 4 led's as volume bar.

The Two pots are for gain control and LCD backlight. A regulated 7805 power supply and indicator light are shown at the bottom right and a 6pin ISP was wired at top right to be able to reprogram the chip. A pin 13 red led by the IR LED shows IR activity

Let me know what you think of it.

Cheers
Attachments
Volume in range
Volume in range
IMG_0382.jpg (1006.92 KiB) Viewed 2557 times
Vol HI Lower IR Being sent
Vol HI Lower IR Being sent
IMG_0385.jpg (1022.12 KiB) Viewed 2557 times

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Automatic Volume Control using IR LED

Post by adafruit_support_bill »

Nice project! If you can get some clearer shots of it we might feature it in the blog. More light usually helps. Try near a window - or even outside in the daytime.

User avatar
paulc1
 
Posts: 41
Joined: Sat Sep 24, 2011 10:30 pm

Re: Automatic Volume Control using IR LED

Post by paulc1 »

Tried to reduce size keeping resolution. Is there a way to attache the jpeg file only so recepient could then open it in his browser? Hope this works, else will try your other suggestions.

Thanks

PBC

PS: Added another shot showing the PCB without the LCD. Note the LCD and SPI headers on top row
Attachments
Volume 450 above 325 set point -Sending IR DN
Volume 450 above 325 set point -Sending IR DN
IMG_0385.jpg (40.06 KiB) Viewed 2515 times
LCD removed showing LCD and ISP headers
LCD removed showing LCD and ISP headers
IMG_0386.jpg (54.23 KiB) Viewed 2515 times
Volume OK therefore SET
Volume OK therefore SET
IMG_0382.jpg (39.65 KiB) Viewed 2515 times

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Automatic Volume Control using IR LED

Post by adafruit_support_bill »

The resolution is fine - just a bit out-of-focus. If you back up past your camera's minimum focus distance, we can always crop out the background.

User avatar
paulc1
 
Posts: 41
Joined: Sat Sep 24, 2011 10:30 pm

Re: Automatic Volume Control using IR LED

Post by paulc1 »

Attached are best I could do with my iPhone camera. I could borrow better camera if necessary.

Thank you.

PBC
Attachments
IMG_0400.jpg
IMG_0400.jpg (38.76 KiB) Viewed 2482 times
IMG_0401.jpg
IMG_0401.jpg (39.79 KiB) Viewed 2482 times
IMG_0397.jpg
IMG_0397.jpg (35.1 KiB) Viewed 2482 times

User avatar
paulc1
 
Posts: 41
Joined: Sat Sep 24, 2011 10:30 pm

Re: Automatic Volume Control using IR LED

Post by paulc1 »

I was reading about "TV Be Gone"(TVBG), and a few thoughts came to mind about a match with my design above.

Your incorporating the code of a universal remote in TVBG caught my attention since my own gadget is burdened by the need to grab ,program and send code to potentially each of 5 sets at home, and eventually if the gadget is commercially marketed , the IR coding might potentially present a problem to the common, uninitiated and non technically minded crowd.

Questions:

1- Can TVBG chip be programmed with code for the ON AND OFF functions of the universe of TV's it covers, instead of just the OFF function, by the addition of another button ?

2- Is it possible to provide a chip to control VOLUME UP/DN instead of just POWER ON/OFF?

My thought then would be to incorporate TVBG in my design(with your permission of course) and triggering it with my sketch, depending on pre-settable volume levels instead of with the push buttons. ( The chip would need to have both the UP and DOWN set of codes and its sketch somehow be accessible to be triggered from my sketch)

Looking forward to your comments.

Thanks

PBC

User avatar
paulc1
 
Posts: 41
Joined: Sat Sep 24, 2011 10:30 pm

Re: Automatic Volume Control using IR LED

Post by paulc1 »

Wrestling with my gadget in this and the TVBG forum I finally resolved the frustrations I had in grabbing and re-transmitting code in some of my TV's,using the IR LED Tutorial.

It turned out that the code transmission success is a function of both the pulse code, obviously, but equally important, the Carrier frequency.

The conventional carrier frequency used in the literature is 38Khz and the 10/3 on off periods producing that frequency.

Two of my TV's at home , a Sony and an RCA were particulary not responding.After hours of trials and research I came across SB Projects site http://sbprojects.com/knowledge/ir/rca.php stating that Sony Protocl typically uses 40Khz carrier for their remotes and surprisingly RCA Protocol use 56 Khz !

Adjusting my periods to reflect those frequencies resolved my problem.

This necessitated modifying the coding of the sketch with a location switch to accomodate the two different locations and carrier frequencies.

A two way switch, reading the state of two pins on the chip, was my easiest way out but more locations could probably be handled with a rotary switch or such. Working on it, as well as the addition of two buttons for Vol UP and Vol Dn override buttons using interrupts .

Attchached are more recent shots of my gadget taken with a higher resolution camera. these will come in two posts since onl 3 attachments are allowed per post.

Hope this helps
Attachments
3.jpg
3.jpg (115.38 KiB) Viewed 2310 times
2.jpg
2.jpg (116.73 KiB) Viewed 2310 times
1.jpg
1.jpg (110.26 KiB) Viewed 2310 times

User avatar
paulc1
 
Posts: 41
Joined: Sat Sep 24, 2011 10:30 pm

Re: Automatic Volume Control using IR LED

Post by paulc1 »

More PICs
Attachments
6.jpg
6.jpg (147.34 KiB) Viewed 2310 times
5.jpg
5.jpg (157.13 KiB) Viewed 2310 times
4.jpg
4.jpg (108.07 KiB) Viewed 2310 times

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Automatic Volume Control using IR LED

Post by adafruit_support_bill »

Nice work! Thanks for the photos :D

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”