Go Back   Home > Forums > Blogs

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Old

Simple DSP Crossover implemented using PIC32MX450

Posted 17th March 2014 at 10:49 AM by googlyone
Updated 17th March 2014 at 10:58 AM by googlyone (incomplete)

It must be close to 12 months ago that I saw the PIC32MX450. I was convinced that a chip that included two I2S audio interfaces, and ran at 100MHz implementing 32bit arithmetic in pretty snappy time would surely be able to do some fun audio stuff.

I started with getting a board designed, and porting the code that I use to control my Analog Devices audio DSP. Then I generated the code to implement a direct digital synthesiser. These worked fine.

Over the last couple of weeks I have completed the "core code" for a digital crossover all implemented in the PIC32 itself.

The basic implementation is:
- An analogue to digital converter
- The PIC
- A digital to analogue converter
(Oh and an interface PCB done on veroboard to route the MCLK and power to the A/D and D/As. I am kind of tempted to re-spin the PIC32 board to do this for me...)

The PIC drives the I2S interface as master, generating...
diyAudio Member
Posted in Uncategorized
Views 235 Comments 2 googlyone is offline
Old

Code for dual channel DDS...

Posted 25th January 2014 at 01:37 PM by googlyone
Updated 26th January 2014 at 05:34 AM by googlyone (Incomplete)

I was asked if I would share the code for the audio DDS I was playing with.

It is here...

Ver0.1.zip

I think this is all the files you need.

To show just how lazy I am, the main function is the file titled "dig_cross.c" - as that was the main function I edited as the base of this code. There is also a file "ad1940.c" which contains a bunch of the SPI stuff. This is yet another illustration of my bone idle-ness - as this module is probably a decade old. It is used, but has nothing to do with an AD1940 IC....

No apologies

There is a bunch of comments in this, but some general overview comments are:
- About 95% of the source code is about:
- Running the user interface
- Generating the display (rather utilitarian implementation)
- Reading from the EEPROM, and doing limit checks on data
- Writing to EEPROM

...
diyAudio Member
Posted in Uncategorized
Views 199 Comments 0 googlyone is offline
Old

Low Distortion DDS based dual channel audio synthesiser

Posted 24th December 2013 at 01:40 AM by googlyone

Well now I am on holidays over XMAS I got the time to really put in a solid chunk of time on the DDS based synthesiser.

Previous blog entries describe the PIC32MX based core to this. The thing works like a charm...

To get decent precision on the sinewave I have implemented an interpolation on a high precision Sinewave lookup table.
- The DDS references into a 12 bit "long", 24 bit "amplitude" precision sinewave LUT.
- Of itself this gives mediocre spurs, which in a DDS are heavily dependent on the frequency, but seem to result in 85-90dBc spurs. There is a fair hash of these without treatment.
- By adding a linear interpolation between samples in the Sinewave Lookup table, the spurs come out as shown below...

Click image for larger version

Name:	1KHz Sinewave FFT.png
Views:	125
Size:	153.6 KB
ID:	1199

- The interpolation is actually quite simple in concept:
- The top 12 bits of the DDS Phase Accumulator looks up the "Sine Sample"
...
Attached Thumbnails
Click image for larger version

Name:	1-2KHz sweep FFT.png
Views:	50
Size:	112.8 KB
ID:	1200  
diyAudio Member
Posted in Uncategorized
Views 428 Comments 9 googlyone is offline
Old

PIC32MX450F256 as DDS core driving CS4398 DAC

Posted 18th December 2013 at 09:35 AM by googlyone
Updated 18th December 2013 at 09:38 AM by googlyone

Over the last couple of months I have been playing with a PIC32MX450F256H as the DDS core, and using one of the many DAC boards I built for my DSP based crossover as the D/A element.

It has taken a while to get up and running - mainly due to me actually having commitments other than a hobby... (Bugger)

That said, getting this thing up and running also required me to get my head around the microchip XC32 compiler, and the configuration bits in the PIC32MX.

On the compiler, the most serious issue is the schemozzle they call documentation. I imagine if all you wanted to do was simple I/O and stuff you might be OK. As soon as you want to dig into the more detailed registers, the high level library documentation is borderline useless, and spread over a number of directories and the Microchip website. Very frustrating.

The other challenges I had were:
- To set up the PIC I2S interface such that there was no jitter on the LRCLK...
diyAudio Member
Posted in Uncategorized
Views 276 Comments 0 googlyone is offline
Old

PIC Microcontroller as a potential DSP / DDS Element

Posted 3rd November 2013 at 02:29 AM by googlyone
Updated 3rd November 2013 at 02:31 AM by googlyone

I noted that the new PIC32 series micro controllers include I2S along with the SPI interface. Well at least a few in the range do. This got me to thinking:
- A 32 bit micro using a fairly efficient RISC architecture
- With I2S in and out
- That runs at 80MHz.

I chose the PIC32MX450F256H.

Surely to god I can do something fun with this. But what?

Ultimately I will try chucking some IIR filters in here to see how they go (there is heaps of processing time available). But in the first instance I want to do a DDS. Reason being that I have more active crossovers than I have speakers (and that is saying something! - ask my long suffering wife!).

One thing that I have been on the look out for is a decent DDS synthesister for audio band that has really low distortion. My current Audio synthesiser uses the AD9952 DDS chip. OK, this runs at 400MHz, but it does use a 14bit DAC, and can be run right down into the...
Attached Thumbnails
Click image for larger version

Name:	IMG_0632.jpg
Views:	322
Size:	846.0 KB
ID:	1158  
diyAudio Member
Posted in Uncategorized
Views 571 Comments 2 googlyone is offline
Old

More on Doping Speakers

Posted 25th May 2013 at 10:25 AM by googlyone

I got a question or two on doping of speaker surrounds.

Here is the thing: If you buy an OEM cone kit it will either come with a pre-doped surround, or be provided with the doping material and instructions.

I have reconed a lot of drivers and until recently either used OEM kits or kits from providers who have looked after this for me.

A good example of a provider that gave doping compound was BEYMA. The instructions etc for this were idiot proof, and the material nicely packed in the kit.

To apply this I used a stiff "cleaning brush" as you would but from your local hardware store - a steel handle about 100mm (4") long crimped onto stiff bristles. Worked a treat.

The beyma doping material looked and smelt for the world like really thick PVA glue. The difference was that when dry it did not go that hard, and remained almost but not quite tacky.

The before shot is:
Click image for larger version

Name:	Undoped_Small.jpg
Views:	193
Size:	398.6 KB
ID:	1078...
Attached Thumbnails
Click image for larger version

Name:	doped_small.jpg
Views:	176
Size:	297.4 KB
ID:	1076   Click image for larger version

Name:	Doped Surround_small.jpg
Views:	166
Size:	336.5 KB
ID:	1077  
diyAudio Member
Posted in Uncategorized
Views 509 Comments 0 googlyone is offline
Old

Doping of cloth surrounds on recone of subwoofer

Posted 14th May 2013 at 12:32 PM by googlyone

Well, you learn something every day. I suppose if you don't manage to learn as you go, then you probably stuff things up every day!!!

About 12 months ago I came across some RCF L18/551 eighteen inch subwoofer baskets. I reconed them using aftermarket parts, the process went OK but I was kind of bemused by the untreated cloth surrounds.

I was busy, and had no immediate plans so the drivers were shelved for a rainy day.

The Thielie and Small parameters were "OK" but not exact as OEM. I measured these using the addded mass method, an important fact for later. As an aside, they would do well enough as subs, but their Fs was a bit higher than I would have hoped.

Fast forward to last week, I loaded one into a 220 litre box tuned to 34Hz, and measured the impedance.

Bugger me if the resonance showed one massive peak at pretty much the driver Fs, and a tiny lump out at 80Hz. Huh?

I swapped drivers...
Attached Thumbnails
Click image for larger version

Name:	surround_small.jpg
Views:	301
Size:	408.2 KB
ID:	1061  
diyAudio Member
Posted in Uncategorized
Views 527 Comments 1 googlyone is offline
Old

Another Ikea Bowl Speaker

Posted 3rd February 2013 at 11:04 AM by googlyone

I stumbled on the people making speakers from the Ikea bowls. It kind of inspired me as the speakers were truly different and bizarre, but at the same time something completely different.

So I had to make some.

I fumbled around in the cupboard and came up with three choices of woofers that would do OK in a small enclosure - and after a few measurements and stuff settled on a pair of old Vifa M13SG-09-16 drivers. These were pretty well suited to an enclosure of a bit over 8 litres.

This drove me to the larger bowl, a 28cm one.

This is how they came out...

Click image for larger version

Name:	Speakers_Stands.jpg
Views:	1250
Size:	150.8 KB
ID:	872

To fit the driver I simply routed a rebate - and then cut the inside out.

Click image for larger version

Name:	Bowl_Router.jpg
Views:	789
Size:	103.2 KB
ID:	864

The material of the bowl was quite thin once I had finished routing things - so I cut out a circle of ply and glued it to the inside of the bowl. I had to go out for the evening at that point so I simply...
Attached Thumbnails
Click image for larger version

Name:	Bowl_Outside.jpg
Views:	414
Size:	122.0 KB
ID:	863   Click image for larger version

Name:	Hanging_Test.jpg
Views:	952
Size:	98.9 KB
ID:	865   Click image for larger version

Name:	Ikea_bowl_rebated.jpg
Views:	301
Size:	137.1 KB
ID:	866   Click image for larger version

Name:	Pulse_Response.jpg
Views:	240
Size:	107.3 KB
ID:	867   Click image for larger version

Name:	Reinforcing.jpg
Views:	230
Size:	97.0 KB
ID:	868  

Click image for larger version

Name:	reinforcing_Inside.jpg
Views:	359
Size:	115.3 KB
ID:	869   Click image for larger version

Name:	Speaker_Stand.jpg
Views:	792
Size:	107.5 KB
ID:	870   Click image for larger version

Name:	Speaker_Stand_Close.jpg
Views:	509
Size:	149.2 KB
ID:	871  
diyAudio Member
Posted in Uncategorized
Views 1739 Comments 1 googlyone is offline
Old

Upload of design documentation for ADAU1442

Posted 20th November 2012 at 11:55 AM by googlyone
Updated 20th November 2012 at 12:02 PM by googlyone

I have had a few people ask for the CAD files and software for the ADAU1442 DSP. I have tried uploading the whole lot as a series of ZIP files - I hope this works OK.

There are a few things that warrant comment, and if you try to untangle this lot, I am sure a few questions to me. Feel free to ask away...

Comments:
- The sigmastudio file is simply there to generate the code for the DSP. All the actual values for filters etc are calculated by the microcontroller under user control.

- SigmaStdio generates a bunch of export files, my software uses the *.h files, both to load the DSP code, and also to get the addresses in the ADAU1442 of registers for biquad coefficients etc. The microcontroller code pretty well loads these in straight, but there is a tiny bit of tidying up the sigma generated files first...

- The microcontroller is a PIC18F4560 (from memory) the CAD file has a PIC18F5420 in the schematic - these are pin...
Attached Files
File Type: zip ADAU1442_Program.zip (53.4 KB, 244 views)
File Type: zip Dig_Cross_V32.zip (2.78 MB, 261 views)
File Type: zip Controller_Rotary_18F4620_5.zip (508.7 KB, 198 views)
File Type: zip Ver2-00 Baseline Working.zip (435.8 KB, 206 views)
File Type: pdf SPDIF+Rx.pdf (72.8 KB, 329 views)
File Type: pdf Power+Supplies.pdf (86.3 KB, 314 views)
File Type: pdf DSP.pdf (118.5 KB, 367 views)
File Type: pdf Control_IF.pdf (75.2 KB, 325 views)
File Type: pdf ADC.pdf (88.0 KB, 310 views)
File Type: pdf DAC.pdf (86.6 KB, 322 views)
diyAudio Member
Posted in Uncategorized
Views 884 Comments 2 googlyone is offline
Old

Finally packaged up "new" ADAU1442 DSP

Posted 2nd September 2012 at 08:11 AM by googlyone
Updated 15th September 2012 at 08:10 AM by googlyone

Wow - it has taken me months to finally get around to packaging up my latest DSP. With work, travel and holidays I have a huge bag of excuses, but I guess the actual reason is that my old DSP using the Analog Devices AD1940 actually works just fine.

The results are I think pretty neat:

Click image for larger version

Name:	ADAU1442_small_front.jpg
Views:	548
Size:	231.8 KB
ID:	737

The case was made from leftover bits from the last set I built - the sides are simply timber with a groove routed for the top and bottom panels to sit in, and the front and rear panels screw into the timber sides. It makes a change from the multitude of "all metal" cases that litter my workroom and playroom.

The implementation here has one analogue to digital converter and four digital to analogue converter cards.

These can be seen here:

Click image for larger version

Name:	DAC_Section.jpg
Views:	413
Size:	289.1 KB
ID:	739

Where the ADC is the first vertically mounted bard on the left with the slightly scruffy IDC cable. The four DACS...
Attached Thumbnails
Click image for larger version

Name:	ADAU14442_small1.jpg
Views:	339
Size:	873.5 KB
ID:	738  
Attached Files
diyAudio Member
Posted in Uncategorized
Views 1297 Comments 1 googlyone is offline
Hide this!Advertise here!

New To Site? Need Help?

All times are GMT. The time now is 10:26 PM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2