electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Microcontrollers and Programmable Logic
dspic VCDO
Post new topic   Reply to topic Moderators: State Machine
Page 1 of 1 [6 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
waterbuffalo18



Joined: Oct 10, 2006
Posts: 13
Location: houston, tx

PostPosted: Fri Aug 15, 2008 11:32 am    Post subject: dspic VCDO
Subject description: my new VC-NCO module
Reply with quote  Mark this post and the followings unread

i built a new module a VCDO programmed in a dspic w/16bit ADC. exp conversion is done with a lookup table. 24bit tuning word and a 32bit phase accumulator. it does FM, sync, and triangle output. the normal waveforms are provided with analog waveshapers. i'm especially happy with the sine shaper which uses the OTA with feedback method. it tracks 1v/oct very closely. i also added a linear fine frequency offset added after the expo conversion to set constant beating but i've only built one of these so far. aliasing is not an issue since i sample at 500KHz and have a 2nd order (100khz fc) at the output. really the only issue i have is that it is a power hog. it uses 120mA off the +15v supply. most of that is the dspic since it runs at 120MHz.

http://www.homebuilthardware.com/forums.html/projects/dspicvcdo/

-Ryan

_________________
- ryan williams
http://www.homebuilthardware.com
Back to top
View user's profile Send private message Visit poster's website
okvern



Joined: Feb 05, 2008
Posts: 78
Location: Seattle, Washington
Audio files: 5

PostPosted: Sat Aug 16, 2008 12:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hi Ryan,

That's really cool. Did you do the surface mount soldering yourself? I've only done a tiny bit of that, and it scares the heck out of me every time. It's my shaky old fingers and failing eyesight...

I was also surprised by the price of the chip--under $5 in smaller quantities. I had previously written off the dsPIC line because they seemed to expensive--thanks for making me take another look!

On your web page, you wrote: "The dspic requires 4 clock cycles for the fastest instructions and I don’t think I’m using the dsp instructions enough to use a dspic."

I sort of wondered about that--but, as you say, it seems like a good base project for getting into the dsPIC world.

I see that the DSPIC30F3013 is available in an SDIP package--would you mind if I created a board for that version? (At some point--it's probably not something I'll get to right away.)

Thanks,

Ole
Back to top
View user's profile Send private message
waterbuffalo18



Joined: Oct 10, 2006
Posts: 13
Location: houston, tx

PostPosted: Sat Aug 16, 2008 1:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

hi and thanks,

yes, i solder the surface mount stuff myself. it is something that just requires a little practice and proper technique. i'm a bit shaky myself actually (but not old). I think most people will find the larger smd packages are really easy to handle once you try it a few times. the hard ones are chips like the ADC and smaller. these have 0.65mm spacing between pins. you wont' find that chip in DIP format.

I don't mind if you make your own layout but you'd have to find another ADC to use. even if you wanted to build like it is, i'd reccomend to use a cheaper ADC (LTC1609) but i got the max1132 as samples.

the comment about clocks / instruction. the dspic doesn't have many MIPS per MHZ which is saying the same thing. this is why it clocks at 120MHz. i only needed that speed to get the high sample rates for input and output.

updates: i've had some conversations about power with people from the synth-diy list. if a revision was made, power consumption should be reduced. If not, at least drop the input voltage of the regulator to something like 10V to reduce heat. i'm considering a new processor. the NXP ARM which is much lower power, but this is SMD and tight pitch.

_________________
- ryan williams
http://www.homebuilthardware.com
Back to top
View user's profile Send private message Visit poster's website
State Machine
Janitor
Janitor


Joined: Apr 17, 2006
Posts: 2809
Location: New York
Audio files: 24

PostPosted: Fri Sep 05, 2008 6:55 am    Post subject: Reply with quote  Mark this post and the followings unread

Hi,

Just wondering. With a tune word width of 24 bits, accumulator width of 32 bits, and sample rate of 0.5 MHz. The core, top end, frequency is approximately 1950 HZ. I hear in your sample what appears to me much higher top end. What method are you using to achieve this? I was also thinking that you probably can add AM modulation very easily by utilizing the hardware multiplier in the DSPic and sharing your outboard A/D with an input for AM. Since it seems you are oversampling that chip anyways, you can use it for more than just setting of the desired frequency. Wink

I find that doing experimentation with DCO's, partitioning what function the MCU serves (firmware duties) and what gets implemented in hardware is a critical one. I find, personally, that the MCU best handles the computation/control/data movement end of things while the DCO core hardware is implemented within an FPGA. One can also embed a soft core MCU into the FPGA and use this as the controller and then create multiple DCO instances in the FPGA. These, of course, are my personal preferences based on my own prototypes but do like your approach very much using the DSPic. I have wanted to do that myself and thus am not minimizing your approach at all Very Happy. Anyhow, since the MCU is now not involved in the process of doing the math for the DCO, much higher sample rates are now attainable and thus upper end frequency, not to mention a more flexable DCO that can do agile phase modulation, amplitude modulation, frequency shift keying, etc .... If the FPGA is large enough, you can your implement wavetables right in the FPGA itself, maybe even the expo conversion.

I do like the approach of doing the waveshaping and filtering, etc ... using external analog circuitry. A sort of Hybrid DCO. This, of course, is nothing new. I just like to see for myself how to design such circuits or see how others do this sort of stuff.

Oh, so many ways to skin a cat Wink

Bill
Back to top
View user's profile Send private message Send e-mail
waterbuffalo18



Joined: Oct 10, 2006
Posts: 13
Location: houston, tx

PostPosted: Fri Sep 05, 2008 7:44 am    Post subject: Reply with quote  Mark this post and the followings unread

the tuning word table is 24bit. it only covers 1 octave. the actual calculated tuning word is the table value multiplied by powers of 2 to get the octave. this multiplication result has more bits. i have the frequency limited to something like 2048hz i think.

i'd really like to do something like this on an FPGA but so far, i haven't done much with them. my complaint is that there are no low pin count packages to play with.

_________________
- ryan williams
http://www.homebuilthardware.com
Back to top
View user's profile Send private message Visit poster's website
State Machine
Janitor
Janitor


Joined: Apr 17, 2006
Posts: 2809
Location: New York
Audio files: 24

PostPosted: Fri Sep 05, 2008 8:50 am    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
the tuning word table is 24bit. it only covers 1 octave. the actual calculated tuning word is the table value multiplied by powers of 2 to get the octave. this multiplication result has more bits. i have the frequency limited to something like 2048hz i think.


OK, so the resultant tuning word is at least 1 bit wider than 24 bits. That explains the higher frequency. One extra bit will yield a frequency of 3902 Hz on the high end and you just truncate the max tune word value. Thanks for the explanation.

Quote:
i'd really like to do something like this on an FPGA but so far, i haven't done much with them. my complaint is that there are no low pin count packages to play with.


Right, FPGA's are very I/O intensive as you point out. The good thing is that if you go polyphonic and create several DCO's on the gate array, you can use the extra I/O to bring out each DCO's high order accumulator bits and index wave tables external to the gate array. Then the extra I/O would be welcome in that case.

You could try the Xilinx CPLD CR II line. Low power, up to 512 macrocells, high speed, 3.3V. The starer kits are cheap and you could do the DCO work with those.

It would seem perfectly fine if only one DCO is created, like you have done, and keep it on the DSPic chip and just add an FM and AM capability. Any plans to do that? Very Happy

In reference to the power consumpsion. Maybe it's because I use high efficiency and power density switching power supplies in my racks these days, I don't think that 120 MA is all that bad really. Not good though if one is using a wall wart transformer or a linear PSU that can supply only 0.5A or something for their entire rack. Wink
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic Moderators: State Machine
Page 1 of 1 [6 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Microcontrollers and Programmable Logic
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use