Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Audio Controller


  • Please log in to reply
23 replies to this topic

#1 kenNET

kenNET

    Advanced Member

  • Members
  • PipPipPip
  • 69 posts
  • LocationSweden

Posted 27 August 2012 - 05:40 PM

Hi,

My first project showcase, so be kind ;-)

I found a "digital controlled stereo audio processor" on e-Bay so I just had to control it with my Netduino.

TDA7313 is normally used in car stereo, this model is quite old but since it's DIP28 it fits on a breadboard. There a lots of TDA processors that have more features but most are SMD.

The TDA7313 have 3 stereo inputs, 2 stereo out (front and rear), volume, speakers, bass and treble controls.

It uses I2C, and I found an software emulator class (thanks GHI) so I can use any I/O pin, wish I find very useful.

I have attached a simple example for TDA7313 (.NET 4.2) and the PDF for the IC. Note that TDA7313 needs 9V, it does work on 5V from Netduino but not sure on the performance.


Have fun!
kenNET

Attached Files



#2 remotewizard

remotewizard

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 27 August 2012 - 07:11 PM

Wow! And here I've been slogging through accomplishing the same thing by using a big clunking rotary switch, a relay shield, and a Kits R Us preamp kit (with the 4 linear pots replaced by an AD5206).

I don't know whether to scream or rejoice! In any event, I certainly owe you a beer or three.

Is there a DIP mount version of the TDA7313 that will support more than three multiplexed inputs?

#3 kenNET

kenNET

    Advanced Member

  • Members
  • PipPipPip
  • 69 posts
  • LocationSweden

Posted 27 August 2012 - 07:24 PM

Wow! And here I've been slogging through accomplishing the same thing by using a big clunking rotary switch, a relay shield, and a Kits R Us preamp kit (with the 4 linear pots replaced by an AD5206).

I don't know whether to scream or rejoice! In any event, I certainly owe you a beer or three.

Is there a DIP mount version of the TDA7313 that will support more than three multiplexed inputs?


Thanks!

I was thinking the same paths before, using digital pots in a regular audio circuit.

TDA7439 have 4 inputs and is SDIP30, problem is SDIP don't fit on a breadboard the pins are closer than on a DIP. I have also looked at TDA7719 that one have lots of inputs and nice features, that is TSSOP28, but you could use a breakout board. I have both circuits but have not tested them yet.

/K

#4 remotewizard

remotewizard

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 27 August 2012 - 08:37 PM

The TDA7719 looks pretty cool; I can see that I'll have to work on my surface mount soldering skills. Thanks for the heads-up!

#5 remotewizard

remotewizard

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 27 August 2012 - 10:08 PM

I should have asked earlier: did you base your design on the test circuit in the datasheet? Or did you have to get tricky to maximize the audio quality? Thanks again!

#6 kenNET

kenNET

    Advanced Member

  • Members
  • PipPipPip
  • 69 posts
  • LocationSweden

Posted 28 August 2012 - 06:58 AM

I should have asked earlier: did you base your design on the test circuit in the datasheet? Or did you have to get tricky to maximize the audio quality?

Thanks again!


Hi,

No trix, I just used the "TEST CIRCUIT" on page 2 in the PDF for design. Don't forget to add pull-up resistors for SCL and SDA. I used 2.2 kohm to 3.3V

/K

#7 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 28 August 2012 - 07:26 PM

Hi kenNET, Cool! Do you have a video of this in action, by any chance? Chris

#8 kenNET

kenNET

    Advanced Member

  • Members
  • PipPipPip
  • 69 posts
  • LocationSweden

Posted 29 August 2012 - 12:09 PM

Hi kenNET,

Cool! Do you have a video of this in action, by any chance?

Chris


I can do a video soon, just want to move the project to "Netduino Go" that I got a few days ago.

/Ken

#9 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 29 August 2012 - 03:01 PM

I can do a video soon, just want to move the project to "Netduino Go" that I got a few days ago.

Okay, cool. I can wait :)

Chris

#10 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 14 September 2012 - 11:35 AM

Really cool kenNet,!! I kind of "specialize" in audo applications myself and so I'm extra pleased to see others doing audio stuff with the Netduino. Check out my USB Audio board (link below), it has IR remote functionality that you might find worth using in your application. Looking forward to that video of your stereo... Btw, what are you powering it with? EDIT: I later realized that your chip does not have an amp built in so here's a replacement question instead: Are you using three different amps for front, rear and bass respectively - what amps are they and how do you power them? Btw, the 7719 seems cool - you could have the Netduino sample the analogue level meter output from the chip and then have the Netduino do something cool with that information.

#11 kenNET

kenNET

    Advanced Member

  • Members
  • PipPipPip
  • 69 posts
  • LocationSweden

Posted 14 September 2012 - 01:16 PM

Really cool kenNet,!!


Are you using three different amps for front, rear and bass respectively - what amps are they and how do you power them?

Btw, the 7719 seems cool - you could have the Netduino sample the analogue level meter output from the chip and then have the Netduino do something cool with that information.


Hi,

I haven't much more on this project, I wait for I2C on Netduino Go. It's still in the "lab", just using an old iPod and a radiotuner as inputs and a regular stereo as output, nothing fancy here...

I have the TDA7719, but haven't got it working, the I2C protocol is more complex than on TDA7313.

/Ken

#12 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 14 September 2012 - 03:26 PM

What you need the Go for?, no real need for muscle here I'd say. I use the mini for all my "shit", but then again I love the sport of it if all.. I know I got a tendancy to push things down other people's throats, but how'd like the IR remote idea? It's probably a good lot simpler than you might think. And also, again, got amps? What are they and what you feedin em with?

#13 kenNET

kenNET

    Advanced Member

  • Members
  • PipPipPip
  • 69 posts
  • LocationSweden

Posted 14 September 2012 - 05:34 PM

What you need the Go for?, no real need for muscle here I'd say. I use the mini for all my "shit", but then again I love the sport of it if all..

I know I got a tendancy to push things down other people's throats, but how'd like the IR remote idea? It's probably a good lot simpler than you might think.

And also, again, got amps? What are they and what you feedin em with?



I don't need Go! but I just got one with touch display and more modules, so why not build a nice control interface...

I was thinking of building a audiomixer with an TDA7313 (or 7719) on each channel, but since the I2C address is the same on all TDA chips' I need a multiplexer or one Netduino on each channel. It would be nice to have a "mini-mini" Netduino (just like a Mega328 chip on Arduino).

IR remote is a good idea. Amps haven't got to more than a headphone amp... but the amps that you used looks interesting.

#14 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 15 September 2012 - 12:21 AM

....but since the I2C address is the same on all TDA chips' I need a multiplexer...

Usually similar devices have h/w pins for selecting between two or more I2C addresses and it surprises me to learn that the TDAxxxx does not. A simple trick would be to enable/disable the pull-up of the SCL line on each of the devices respectively - that way you control which chip should listen to data on a common SDA line. I think you could control as much as 4 devices using only two digital pins of the Netduino but I might be mistaken.

...IR remote is a good idea.

Yeah, it adds a great deal of usability to it all. I borrowed the code from this post and IR detectors are almost free:
http://forums.netdui...col-ir-decoder/

Amps haven't got to more than a headphone amp... but the amps that you used looks interesting.

Yes they are very nice but accept I2S input only. However, there are lots of other similar chips that do accept analogue.

#15 remotewizard

remotewizard

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 15 September 2012 - 02:54 PM

The good news is I just received my TDA7313 chips from China (luckily, I ordered two). The bad news is that my circuit doesn't work.

I'm not terribly surprised; it's my first attempt at a toner transfer pcb (using the conveniently located pattern from here). On the odd chance that it isn't my sloppy etchning or terrible soldering, could I ask what values you used for the pullup resistors on SDA and SCL?

#16 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 16 September 2012 - 02:50 AM

I use a 4.7kOhm pull-up resistor on each of the two I2C lines. I'm sure other values would be ok too, but 4k7 works well in my application.

#17 remotewizard

remotewizard

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 17 September 2012 - 12:56 PM

I use a 4.7kOhm pull-up resistor on each of the two I2C lines. I'm sure other values would be ok too, but 4k7 works well in my application.


That's what I used as well (random-chance dumb luck - it's what I had in my junkbox). Sigh.

When I apply power to the board I get the usual powering-on-an-amplifier thump in the output, but that's it. Voltages are all what and where they should be, and the soldering (while really ugly) looks ok.

I'm going to check my code for typos before I start mucking around with the board. Thanks for taking the time to reply.

#18 remotewizard

remotewizard

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 24 September 2012 - 12:59 PM

The code checked out ok, so I rebuilt the circuit on a breadboard (using my spare TDA7313). It worked perfectly! Thanks again, kenNET, for the code library! I'm debating whether I should make another stab at a custom pcb (maybe even trying to roll my own with Eagle), or just move the breadboard implementation over to a proto shield. Do you think mounting this on a shield would make it susceptible to noise from the Netduino?

#19 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 24 September 2012 - 03:45 PM

I know practically nothing about EMC but I guess it would depend on the frequency of the noise generated by the Netduino. If the frequency is far enough from that of audio (20 - 20kHz) it could be that it won't be a problem at all. Otherwise you could probably use a suitable filter to prevent the noise from entering your audio controller. From what I've heard noise is usually introduced via ground.

I believe forum member Magpie has done a fair amount of work within audio so you could always ask him.

#20 remotewizard

remotewizard

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 25 September 2012 - 12:25 PM

Good advice, as always. Thanks!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.