Diving into Microcontrollers?

Started by swinginguitar, April 13, 2011, 11:30:36 AM

Previous topic - Next topic

swinginguitar

Thinking about delving deeper into the world of microcontrollers - just wondering - what are some practical applications of them as it applied to effects?

What would be a good starter chip to learn with? One of the PICs?

jonny

some of the things you can do with micro-controllers are using them as a LFO with tap tempo. Eg  see the tap tempo trem things like that. You can also use them to control the  user interface/functions of loopers, some of the ISD chips for example. I can't really think of many other important uses though.

I'm quite keen to give them a go myself but don't know where to start. There's so many different pics..and different developer boards etc it's so confusing  ???.  I read some books on them as well but didn't like them, so any book recommendations if anyone knows any good ones would be awesome.

blueduck577

One thing I've been looking into lately is providing the clock for a flanger or chorus directly from the mcu.  It gives a degree of control that isn't as easily realized with analog circuits.

Other applications could be anything that involves a variable resistance (phaser, compressor) - using PWM output with a CD4066 and resistors in series/parallel, you can have an easily programmable variable resistor with any value you like  :icon_surprised:

.Mike

You can also use them for envelope detectors for things like auto-wahs.

Someone here was working on that... I'm not sure what came of it.

It's something that is on my long list of things to try... eventually... maybe... we'll see.

Mike
If you're not doing it for yourself, it's not DIY. ;)

My effects site: Just one more build... | My website: America's Debate.

jkokura

What I'd like to know too is what a good starter set that would let me both learn to program one, and give me the interface to program at least an 8pin MCU PIC via USB. Books or an online teaching resource would be good. Any links for that kinda of stuff?

Jacob

blueduck577

#5
If you have no background in hardware or programming, I'd say the best thing to start with is the Arduino.  Tthough it's not a PIC, it'll get you started.  It seems that the DIY community has really embraced the Arduino, with many examples available online.  As far as guitar effects/musical applications go, check out these links to see if it's something you could get into:

http://www.beavisaudio.com/projects/digital/ArduinoPunkConsole/
http://www.youtube.com/watch?v=_X0bL6WS-VY

JKowalski

Quote from: jkokura on April 14, 2011, 01:46:43 AM
What I'd like to know too is what a good starter set that would let me both learn to program one, and give me the interface to program at least an 8pin MCU PIC via USB. Books or an online teaching resource would be good. Any links for that kinda of stuff?

Jacob

If you want to go the PIC route, I recommend buying a PicKit from microchip directly. Many other cheaper programmers are out there but if you are really into uC's you'll want to buy a nicer one later anyways. If you are a student it's only 30 bucks.

That's all you need to get started (well, and some uC's!). Many tutorials exist online for programming PIC's. MPLAB is free code development software provided by microchip for PICs, and is nice to use.

dano12

Concur on the Arduino, super easy to use and program.

Here's a digital filter I did with an Arduino: http://www.beavisaudio.com/projects/DSWF/

Mac Walker

Don't know what your programming experience is, but as far as entry level goes, you can't beat the Picaxe.

http://www.sparkfun.com/products/8308

It is essentially a PIC but with a BASIC assembler pre loaded.  You can learn BASIC in about one evening, $26 for a USB programming cable.  I currently have a MIDI application I'm working with on the 14M, can't beat the $4 price tag.....

swinginguitar

Arduino seems a bit large for a stompbox application....???

derevaun

The main benefit of having the Arduino board so big is that the connections are labeled and the whole system tolerates some electrical goof-ups during the breadboarding stage. It's also sized to accomodate peripheral boards made on ExpressPCB Miniboards.

There are smaller arrangements that would be better for actual production, like the really bare bones board, dorkboard, and ardweeny. All of those allow updating the code while in circuit and have connectors for that purpose. Those also work great on a breadboard, it's just less convenient because the pins aren't as clearly labeled.

You can also lift the Atmel chip from a programmed Arduino and put it naked in your circuit on a standard socket. Then you can get another Arduino-ready chip (about $4.50) for the Arduino board.

Arduinos and Picaxes don't have enough brains to do quality signal processing, but they can handle dynamics-sidechain type stuff OK, and basically turning knobs and flipping switches for you. Programming the Arduino is very easy if you've worked with Javascript, Actionscript, or PHP. Same with Picaxe and BASIC. IMHO the big benefit of Arduino is the large community of people doing stuff with it and sharing their code.

jkokura

So if you wanted to get into stuff like Tap tempo ala the PTAP or Taptation stuff, and you also wanted to get into the programmed preset loopers ala Pedalboard Tamer or N-Audio type stuff, would Arduino or PIC be better to get into?

Jacob

Hides-His-Eyes

PIC. Just don't expect it to be easy. You have to learn about coding, then you have to learn about designing digital circuits, then you have to learn about designing digital circuits that interact with analogue circuits, then you actually have to be able to describe what you want the software to do in an algorithmically valid way, then you have to actually code it, and then, god help you, you have to debug it  :icon_eek:

jkokura

Thanks,

I'm hoping that I can find some good mentors to help with the process. I'll start looking into getting a kit, cause I do want to learn, and I have the time these days.

Jacob

David

Quote from: Hides-His-Eyes on April 16, 2011, 07:06:15 PM
PIC. Just don't expect it to be easy. You have to learn about coding, then you have to learn about designing digital circuits, then you have to learn about designing digital circuits that interact with analogue circuits, then you actually have to be able to describe what you want the software to do in an algorithmically valid way, then you have to actually code it, and then, god help you, you have to debug it  :icon_eek:

I beg to differ.  There is a massive base of code free for the using at www.piclist. (either com or org).
There is also a terrific set of PIC tutorials at www.winpicprog.co.uk.

Also, those tasks have to be done regardless of what processor you choose to use.  It's just a question of whether you do it yourself or whether your processor is in some kind of package that does some of that stuff for you.

Thomeeque

#15
 Hi,

maybe everybody knows, but just for the record (I don't see it mentioned here) - there's a whole Digital & DSP section on this forum, lot of microcontrollers related stuff to be found there and there are people responding :)

Good luck, T.
Do you have a technical question? Please don't send private messages, use the FORUM!

petemoore

  Arduino helped me to compare Mcontrol and analog workarounds.
   The microcontroller parts are all sketchy scenarios to me, although few prototyping experiments worked, it seems obvious that what microcontrollers can do is fairly limitless.
  Personal preference is for analog signal path with a couple exceptions...mostly analog, I like digital delay lines, few other digital sound products.
   Getting an LFO or Envelope detection to respond precisely how you want is tweekable-pretty-good with analog, but MC software of course opens up the options exponentially in an "experimendigital" mind. Thinking of ways to make a MC take over the controls of an analog LFO output or detect Envelopes in 'analog styles' isn't a challenge except in answering the question: which is better ? Defining "Better'' is difficult or easy to define, easy if say low power consumption was by far the #1 priority issue.
  Where analog ability to be ''better'' is where microcontrollers will rule.
   IMO this is in the applications which have yet to be concieved?:
  Outside the typical analog stuff. There are few 'super-switchey' or multi-variant types of analog effect controllers.
   Though much of the capabilities already exist, the way they are applied is often applied by those less musically inclined, hence the applications we are now hearing are sample/remixes. The complexity is such that personal 'art-mural' [ie paste yer clips in window/graph to ''write songs''] is what we are thus far aware of.
  There's a lot more in there...these controllers can control...pretty much anything you can put a knob or switch on. Getting algorythm setup for supercomplex multi-knob/switch controlling via analog is rare/difficult/expensive/ugly and limited, everytime 'another something' is added...so is a board with ~fixed variables. Non-flexibility and inability to be re-configured makes prototyping complex controlling with analog...rare.
   Not so with digital, since increasing the power is a simple matter of adding another LED or sub-mc-board to do the 'other tricks'.
  I see no reason why complexities which would challenge the 'speaker/amp loading' complexities won't soon be realized...see 'fireflies' application and think 'sound-bouncers' instead of the light-algorythm-synchronizing effect.
   There you have it, the treble touched down, the gain before clipping bumped up, the clipping threshold moving around in synchronious to attack sequence..while the assynchronious...[know what I mean ?
  Soon to be appearing at a theatre near you.
 
   
Convention creates following, following creates convention.

swinginguitar

I'm a programmer, so code isn't a problem, I've just never done "hardware" before, so I haven't conceptualized how it works. for example, looking at a tap tempo schematic, how would you vary resistance to conrtol an lfo or delay time from code?

I think my main issue is, I need a resource (like a good book recommendation) that walks you through from the beginning.

egasimus

Quote from: jkokura on April 16, 2011, 06:53:59 PMwould Arduino or PIC be better to get into?
I'd say Arduino, definitely. As far as 8-bit uCs go, Atmel's AVR architecture is superior to PIC IMO.

Quote from: jkokura on April 16, 2011, 06:53:59 PMN-Audio type stuff
Do you perhaps mean the Bulgarian N-Audio (Nikolai Hristov)?

defaced

QuoteI'm a programmer, so code isn't a problem, I've just never done "hardware" before, so I haven't conceptualized how it works. for example, looking at a tap tempo schematic, how would you vary resistance to conrtol an lfo or delay time from code?
ADC.  Analogue to digital conversion.  On the TAPLFO chip, the control pins are configured as analog inputs and the voltage set by the potentiometer is converted to digital by the code in the chip.  This is actually described on the chip's page: http://www.electricdruid.net/index.php?page=projects.taplfo

QuoteThe chip uses the analogue inputs of the PIC for CVs. These are fed to the internal A/D convertor, which samples each input every 150uS or so and converts the voltage to an 8-bit value. In order to avoid using an external D/A convertor for the output, the chip uses the built-in PWM module. The PWM output needs passing through a lowpass filter to convert the pulses back into an analogue output.
-Mike