[PROJECT] Digitial Volume/Power Control Board

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hi,

I'd like to start a project where anyone will be able to contribute and give input.

I'm looking to create a cheap, reliable and easy to build IR controlled volume/power control board to be used in DIY Amp.

Here's the feature I'm planning implementing soon:

- IR Control of every parameters
- Digital Volume control using Digital Potentiometer.
- Digital Tone control.
- Push button interface (when not using IR)
- Power control (Relay)

And some more future ideas :

- Motorized Potentiometer control
- LCD display.
- Led Bar display (volume, tone, "VU")


The main µC controller used is a Atmega328-PU.
It's the heart of the Arduino development platform on which this board will be developed.

The IR receiver will be a TSOP 1238 or equivalent (TSOP 1738...)

The Digital potentiometers are DS1807. This chip consist of 2 i2c controlled potentiometers. We will probably use 2 chips. One for volume (left, right) and one for tone (bass, treble)

Here is the first rough schematic.
attachment.php


I'll add the serial interface so anyone can use the Arduino software to contribute.

I've attached the actual code. That's nothing fancy nor neat, but it's a work in progress.
 

Attachments

  • masterboard.txt
    4.7 KB · Views: 136
Little more work done this night...

I've updated the schematic :

An externally hosted image should be here but it was not working when we last tested it.


- Added the FTDI Cable header. Please let me know if my wiring is good, I was confuse with the RXD and TXD line. (And I've grounded the CTS...)
- Added a power supply jumper, just to make sure the FTDI interface would not send 5V to the regulator.
- C3 is a... sigh... "103" (10nf??) capacitor, but I think it could be pretty much anything bellow 1uf.
- By the way, R1 is a 10k pull-up resistor.


I've also got the guts to make the PCB, it wasn't that bad finally I found the placement for both IC which will permit future upgrade (adding another DS1807 in line with the first)

An externally hosted image should be here but it was not working when we last tested it.


Please let me know what you think about the PCB design. The routed line are all 16 mill which works well with UV exposure method + ink jet transparency.

Furthermore, I've cleared a bit the code and now. I'll try to work on the tone control tomorrow or later this week. I think I will not connect the tone control input directly to the volume control and let the user the choice to do so. This will make sure both controls are not Dependant on each other.
 
Check this out if you haven't already:
http://www.ustr.net/infrared/sony.shtml

It has an algorithm for reading the code, but I still prefer the idea of using an interrupt. Something like:

1. Set external interrupt to trigger on any transition (rising edge and falling edge detection).
2. Ignore first falling edge and rising edge (start bit).
3. Next falling edge start a timer (with interrupt) that will increment a variable every so many micro seconds.
4. Next rising edge stop the timer and read the variable. Use the count to determine whether it was a 1 or a 0.
5. Reset everything.

Example timer setup: if you use the internal 8MHz clock with a timer divider of 256, you'll have 21 counts for a 0 and 40 counts for a 1.
 
Updates :

I've played with the schematic and board a little.

- Added Gnd and 5V pads for future external device upgrade
- Added header to every non connected Arduino (Atmega328) pin for future upgrade.
- Rerouted some ground wire and moved some component
- Changed 78l05 to 7805 as it has more power (and that's the only one I have laying around ;) )
- Removed jumper "voltage selector", hope it will still be "ok". Please give me some input on this :)

An externally hosted image should be here but it was not working when we last tested it.


An externally hosted image should be here but it was not working when we last tested it.


I've attached the most recent sketch code.

Let me know if you want the Eagle schematic/pcb files or the "Ardunio" sketch files.
 

Attachments

  • mainboard.txt
    4.1 KB · Views: 86
Updates :

Here's the deal, as I'm trying to add more and more feature, I get stuck with a big messy PCB board.

I'll redesign "everything"!

The main µC board will only have the Atmega328 with minimal part to operate (like a barebone arduino).

I'll add headers for important buses (i2c, serial ...).
Also for every unused pins (Arduino alike).

Every "module" will be on a separated board so if someone don't have tone control, be it, just don't plug the tone control.

I'll try to create the board so they will be like a "client-client" network.

Ex.:

Server-client
Volume control <-- i2c bus <-- MainBoard --> i2c bus --> Tone control


Client-client :
MainBoard --> i2c bus --> Volume control --> Tone control --> other i2c module.

Every i2c enabled module will have "input and ouput" pin for their bus. So there will be less wire mess.

Same will go for other buses.

Wish me luck... as I'll need to mostly start from scratch -_-
 
I'll see if this is necessary.

As of now, all my i2c enabled IC are 5v.

I'm using 5V only for the TSOP1237 as it need minimum 4.5v.

I could power the Atmgea328 with 3.3v and it would still work, but I tough that using 5v across all the board would be easier (7805 instead of Lm317) and also give more "compatibility".

If a future module need 3.3v i2c, I'll place the level shifter on the module board.
 
Arduino :S I tough it was clear... sorry !

I'm using the Arduino 0016 software.

see www.arduino.cc

You first need to flash the boot loader on the Atmega328 and than you can simply upload "sketch" file from a USB to Serial cable (called FDTI Cable in most case!). The serial port is the 6 pin header on my current schematic/PCB design.
 
So I went with the "module" view and reworked my first module :

i2c 2 channel volume control.

Schematic :
An externally hosted image should be here but it was not working when we last tested it.


PCB :
An externally hosted image should be here but it was not working when we last tested it.


So here is the deal :

I'll use 4 pin female/male header for every i2c module. They will always have an input and output, so they'll be inter-connectible. I'll also create "SLI alike" bridge to connect them

This particular module address is 0101000 (written on the PCB). Each module will have a specific address. Some module, like the tone control, will have a solder jumper to choose between 2 addresses (2 identical PCB for 2 different channel... at 2 different address).

As I'm not patient at all (read as, always want to do something) I've made the first module PCB.

An externally hosted image should be here but it was not working when we last tested it.


An externally hosted image should be here but it was not working when we last tested it.


Apart from minor issue near the R_out connector, everything went well... considering the short time I took to print/expose/develop/etch this little sucker...
I've cleaned the contact with acetone trying to keep as much "positive" on the board to keep a nice professional look.

Tomorrow (if time let me) I'll drill the holes and mount the first components (mostly... jumper wire). I'll try to take as much photos as possible.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.