Microcontroller Projects

Do-it-yourself pedal building

Moderator: Ghost Hip

Forum rules
The DIY forum is for personal projects (things that are not for sale, not in production), info sharing, peer to peer assistance. No backdoor spamming (DIY posts that are actually advertisements for your business). No clones of in-production pedals. If you have concerns or questions, feel free to PM admin. Thanks so much!
User avatar
Moustache_Bash
FAMOUS
FAMOUS
Posts: 1722
Joined: Mon Apr 04, 2011 3:03 pm
Location: Pacific Northwest

Microcontroller Projects

Post by Moustache_Bash »

So, I just completed a class on microcontrollers (we used the PicKit, and MPLab) and I still don't know how to really utilize it. Like, I understand the functions/instructions/how it works (sort of, otherwise I wouldn't be posting this) but I don't really know how to apply it to the stuff I'm interested (making sounds, and stuff) in.

Do you guys know of a website that has some projects that I could build/program so that I can get more experience to better understand and utilize the PIC?
User avatar
Mike
committed
committed
Posts: 467
Joined: Wed Jun 30, 2010 6:43 pm
Location: Savannah, GA
Contact:

Re: Microcontroller Projects

Post by Mike »

Electric Druid has several PIC projects you can check out. They're geared more for synth use, but they are based on PICs.

He's got the TAPLFO (used in tons of tap tempo tremolos), VCLFO, VC Digital Oscillator, VCADSR, etc.

Mike
My diy pedal blog: Just one more build...
User avatar
Moustache_Bash
FAMOUS
FAMOUS
Posts: 1722
Joined: Mon Apr 04, 2011 3:03 pm
Location: Pacific Northwest

Re: Microcontroller Projects

Post by Moustache_Bash »

Perfect. Thanks, Mike!
User avatar
eatyourguitar
IAMILFFAMOUS
IAMILFFAMOUS
Posts: 3127
Joined: Sun Oct 03, 2010 12:37 pm
Location: USA, RI

Re: Microcontroller Projects

Post by eatyourguitar »

there is an open source version of the electric druid ttlfo someone posted on muffs. electric druid just has a bin file that is already compiled.
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF
User avatar
Mike
committed
committed
Posts: 467
Joined: Wed Jun 30, 2010 6:43 pm
Location: Savannah, GA
Contact:

Re: Microcontroller Projects

Post by Mike »

Tom definitely has made the code available. It was community-developed, at least to a certain extent. It is open source, but for non-commercial use without permission.

http://www.electricdruid.net/index.php? ... cts.taplfo

Scroll to More Details:
-Tap Tempo LFO PIC 16F684 ASM code
-Assembled HEX code from above file


Edit: BTW, I also have copies of several 8-pin versions that have features removed. I am not sure if I am allowed to straight-out distribute them, but if anyone needs me, PM me and I can get them to you.
My diy pedal blog: Just one more build...
User avatar
eatyourguitar
IAMILFFAMOUS
IAMILFFAMOUS
Posts: 3127
Joined: Sun Oct 03, 2010 12:37 pm
Location: USA, RI

Re: Microcontroller Projects

Post by eatyourguitar »

oh interesting. this guy owned one and started coding again from scratch cause he was not happy with the synth module he purchased. I just assumed there was a reason for not using Eelectric druids code at all to start with.

http://www.muffwiggler.com/forum/viewtopic.php?t=72022
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF
User avatar
D-Rainger
experienced
experienced
Posts: 510
Joined: Fri Mar 25, 2011 8:15 am
Location: London
Contact:

Re: Microcontroller Projects

Post by D-Rainger »

I've tried some electric druid stuff, and it needed some rewriting. Microcontrollers seem to be some kind of secret society dedicated to stopping newcomers entering!
User avatar
Moustache_Bash
FAMOUS
FAMOUS
Posts: 1722
Joined: Mon Apr 04, 2011 3:03 pm
Location: Pacific Northwest

Re: Microcontroller Projects

Post by Moustache_Bash »

D-Rainger wrote:I've tried some electric druid stuff, and it needed some rewriting. Microcontrollers seem to be some kind of secret society dedicated to stopping newcomers entering!


Yeah, I figured it would probably need some tweaking for the software/hardware that I'm using. ASM doesn't always translate exactly even if people be using the same program (could be using different versions of the program or programmer, etc.). But, that's actually what interests me in trying these projects because then I'll have to actually understand the instructions of the code to be able to troubleshoot it.


Also, could someone kind of explain what the VCDO (voltage controlled digital oscillator) is? I don't know much about synth stuff. Is it like a modular synth thing that won't make sound on it own, but if you plug a keyboard into the one of the VC ins it can be used to effect the sound of the keyboard going in?

Sorry, I don't think I'm articulating myself that well. Is it basically a gnarly effects box for VC instruments?



And looking at the website for my first project, I'm thinking I'll try taking the tap tempo LFO to a Pitch Pirate. Seems pretty doable, yeah? And since the TT tremolo is pretty popular in the DIY world, I'm sure I can find a bunch of discussions on forums if I run into problems.
User avatar
Mike
committed
committed
Posts: 467
Joined: Wed Jun 30, 2010 6:43 pm
Location: Savannah, GA
Contact:

Re: Microcontroller Projects

Post by Mike »

Moustache_Bash wrote:And looking at the website for my first project, I'm thinking I'll try taking the tap tempo LFO to a Pitch Pirate. Seems pretty doable, yeah? And since the TT tremolo is pretty popular in the DIY world, I'm sure I can find a bunch of discussions on forums if I run into problems.

Yeah, looking at the schematic, it is totally doable. Remove the IC LFO, replace with something else. As long as it drives an LED, it'll work.

If you're looking at the TTT schematic, you can omit the 2n3904 if you don't plan on driving much current through the LED. When I put together what ended up becoming the TTT, I added that transistor as a current source to protect the PIC from trying to source too much current (20mA max). Now that I know a bit more, I know that in most cases, it is totally unnecessary.

If you have any questions on the VCLFO or TapLFO, I kind of know a lot about them, at least in terms of implementation. I designed (hah!) the supporting circuitry for what ended up being the TTT. I was the first person to use it in a guitar effect. :)

Also, the other versions that I have from during the development of the TapLFO are:

Code: Select all

 · PIC12F683 Tap Tempo LFO (v.A) - An 8-pin tap tempo LFO chip originally created by Electric Druid and modified into a smaller format. This version has a speed CV and a waveform CV.

· PIC12F683 Tap Tempo LFO (v.B) - An 8-pin tap tempo LFO chip originally created by Electric Druid and modified into a smaller format. This version has a multiplier CV and a waveform CV.

· PIC12F683 Tap Tempo Controller - An 8-pin tap tempo chip derived from a code originally created by Electric Druid. Offers a clock output syncronized to a tap input with multiplier and manual speed controls.

· PIC16F684 Tap Tempo LFO (With Waveform Select) - Electric Druid's 14-pin TAPLFO chip with an additional feature included on the previously unused pin. A negative going pulse on pin 8 cycles to the next waveform.

· PIC16F684 Tap Tempo LFO (With Wave Distort) - Electric Druid's 14-pin TAPLFO chip, the Pulse Width CV replaced with the earlier VCLFO chip's Wave Distort feature. Adjusting the Wave Distort CV adjusts the duty cycle of all waveforms on the chip.


And last, if you come up with something cool, please consider sharing your results freely and openly. If I hadn't shared my results with the VCLFO, Tom might not have come to DIYSB to get the feedback that shaped the TAPLFO into what it is (it didn't have wave distort!). Taylor might have used a different LFO for his Tap Tempo Tremolo. Who knows if an easy tap tempo LFO would even be in the DIY realm yet! One cool project can inspire a lot more cool projects.

Mike
My diy pedal blog: Just one more build...
mysteriousj
committed
committed
Posts: 455
Joined: Sun Mar 06, 2011 9:44 pm
Location: NZ

Re: Microcontroller Projects

Post by mysteriousj »

Moustache_Bash wrote:Also, could someone kind of explain what the VCDO (voltage controlled digital oscillator) is? I don't know much about synth stuff. Is it like a modular synth thing that won't make sound on it own, but if you plug a keyboard into the one of the VC ins it can be used to effect the sound of the keyboard going in?

Sorry, I don't think I'm articulating myself that well. Is it basically a gnarly effects box for VC instruments?



In a synth the VCDO is the oscillator which creates the actual sound you hear. Basically you send it a voltage and it will ouput a frequency - some might have multiple waveshapes others fixed to a certain shape. In some old school synths you'd have a bank of 'X' of them (so you can play X different notes at a time) they would basically all act as a slave to a master which tells them what note to play by supplying them the corresponding voltage.
User avatar
eatyourguitar
IAMILFFAMOUS
IAMILFFAMOUS
Posts: 3127
Joined: Sun Oct 03, 2010 12:37 pm
Location: USA, RI

Re: Microcontroller Projects

Post by eatyourguitar »

the tuning stability of any DCO or VCDO was a big selling point in the 80's. lots of synth makers were in a rush to switch over to new oscillator designs that would not need constant calibration or be subject to temperature drift. they were not aware that an elitist group of analog purists would emerge circa 1990's so they thought is was purely a win win situation and they did not look back. these are still great fun anyway since almost all of them have the same recycled analog low pass filters of their not so distant counterparts. when you filter a 8bit or 12bit waveform you pretty much filter out the aliasing with it making the result very close to what you would hear from a filtered analog VCO. as mysteriousj pointed out, this may also be a reason for increased polyphony (or increased polyphony at the same retail price). retail was war. do you still own any computers with windows 95? yeah thats why those analog synths were being thrown in the garbage. :cry:
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF
User avatar
multi_s
IAMILF
IAMILF
Posts: 2098
Joined: Mon Feb 15, 2010 9:00 pm

Re: Microcontroller Projects

Post by multi_s »

eatyourguitar wrote: when you filter a 8bit or 12bit waveform you pretty much filter out the aliasing with it making the result very close to what you would hear from a filtered analog VCO.



i don't think you mean aliasing. filtering out aliasing, once it has occurred, is rather difficult. further, i dont see why you would have this problem with a digital vco since it is presumably not sampling anything. if the wavetable its pumping out is a real sample, sampled poorly, then ya maybe there is aliasing in that sample but no simple analog filter on the output is going to help that.

perhaps you mean something like: filtering the output of a dac can help suppress harmonics and other artifacts introduced by its method of signal reconstruction (zero order hold/first order hold/upsampling/pwm carrier frequncy etc).
User avatar
eatyourguitar
IAMILFFAMOUS
IAMILFFAMOUS
Posts: 3127
Joined: Sun Oct 03, 2010 12:37 pm
Location: USA, RI

Re: Microcontroller Projects

Post by eatyourguitar »

from wikipedia
In signal processing and related disciplines, aliasing refers to an effect that causes different signals to become indistinguishable (or aliases of one another) when sampled. It also refers to the distortion or artifact that results when the signal reconstructed from samples is different from the original continuous signal.
Aliasing can occur in signals sampled in time, for instance digital audio, and is referred to as temporal aliasing. Aliasing can also occur in spatially sampled signals, for instance digital images. Aliasing in spatially sampled signals is called spatial aliasing.


so I actually think aliasing is the right word by the alternate definition of the word. if you prefer the term artifacts, we can just call it artifacts. that works for me.
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF
User avatar
multi_s
IAMILF
IAMILF
Posts: 2098
Joined: Mon Feb 15, 2010 9:00 pm

Re: Microcontroller Projects

Post by multi_s »

despite this wikipedia article, i still would say it's not the right word in this context. (: (opinion)

for example, is quantization noise aliasing? simply calling all noise in reconstruction aliasing is a pretty poor choice imho.

the wiki article states:

"Aliasing can be caused either by the sampling stage or the reconstruction stage; these may be distinguished by calling sampling aliasing prealiasing and reconstruction aliasing postaliasing.[1]"

reference [1] is not that great as defense for a few reasons if you actually look at it, and also seems to be mostly about to image processing. (as well as, with very few exceptions, only references image processing papers/texts).

first in figure 2 they present a figure showing undersampling and the classic idea of aliasing. then they go on to say, and here is likely the quote which led to your wiki quote , "Even if the replicated spectra do not overlap, aliasing can result from poor reconstruction , as illustrated in Figure 3. When aliasing is a consequence of undersampling (or lack of prefiltering), it is referred to as prealiasing, and when it results from poor reconstruction, it is called postaliasing." (no reference given for post-aliasing term)

The situation presented in figure 3, is so easily avoided in audio, you would have to be a bit ignorant to end up there. (ie spreading the distances between the replicated spectrums through up sampling so that even if the reconstruction filter is wider than expected, it only gives at most one copy of the spectrum).

I think if you looked into better references on signal processing you would not see this term used as frequently in audio reconstruction, most likely because what is causing remaining 'artifacts' is obvious and can be attributed to some other mechanism, rather than sweeping it all into 'aliasing'. further searches on google seem to bring up mostly image processing links when you type 'post aliasing'.

edited due to rantiness. (:
User avatar
Moustache_Bash
FAMOUS
FAMOUS
Posts: 1722
Joined: Mon Apr 04, 2011 3:03 pm
Location: Pacific Northwest

Re: Microcontroller Projects

Post by Moustache_Bash »

Thanks, guys. I really appreciate all your knowledge with me! :hug:

On page 5, http://www.electricdruid.net/datasheets ... asheet.pdf , could I use this circuit to control the waveform for this circuit?
Image

I was thinking the sync-in of the TTLFO would be on pin 1 in series before the potentiometer, then the LFO output would go to the potentiometer. Or am I not understanding how the TTLFO is to be implemented?
Post Reply