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
Interfacing a microcontroller with a modular
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 1 of 1 [9 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
amos_joseph



Joined: May 09, 2005
Posts: 50
Location: Lincoln, NE

PostPosted: Tue Sep 25, 2007 11:36 am    Post subject: Interfacing a microcontroller with a modular Reply with quote  Mark this post and the followings unread

I've been working on some microcontroller projects for my modular lately. Right now I've got the firmware finished for a module that uses an external MIDI clock to generate triggers at various intervals (32nd, 16th, 8th, quarter, half, and whole notes at the moment). It also has it's own internal BPM clock so it can run on it's own without midi.

My question is: Is it okay to just wire the microcontroller pins directly to an output jack? Should I be using a resistor or maybe a transistor to buffer the output? My breadboarded prototype works fine both straight off the pin or though a 1K resistor. I just want to make sure I'm doing things "right" when I start drawing up the circuit board layout.

I'm pretty good with the digital side of electronics, but the analog side still leaves me scratching my head on occasion.
Back to top
View user's profile Send private message Visit poster's website
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24081
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Tue Sep 25, 2007 12:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

When you connect a synth output to your processor output by accident that might kill the processor. So I'd make some protection against this, probably by isolating the output with a transistor. Just a resistor might work as long as the output is an output but on processor startup it will probably start as an input.
_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
Dave Kendall



Joined: May 26, 2007
Posts: 421
Location: England
Audio files: 3

PostPosted: Tue Sep 25, 2007 2:21 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hi.

I'm looking at a similar problem with a hardware pulse generator/midi decoder that I've been working on. (for *way* too long it seems.. Smile )
I've had OK-ish results with op amps wired as comparators on the output, to give some protection, and at the same time give +10V triggers from a +5V source. I used an LM358 in single supply configuration, but looking at the scope traces on the output, the pulse leading and falling edges are slightly rounded compared to the +5V trigger input. Slew rate?
I'm not *sure* this is a problem, but I suspect that the steeper the lo-to-hi transition of the pulses, the better all round....
Would it be better to go with a transistor output buffer, or maybe there's a faster responding opamp that will be happy in single supply mode?
I've found and tried a couple of circuit snippets with NPN trannies that seem "sharper' than opamp comparators but all of them are inverting, and are prone to the output signal voltage being pulled down by some (un-buffered?) modules.........
I haven't found any non-inverting circuits. PNP instead?? I seem to have drawn a blank here.... Sad

If anyone knows of an good non-inverting transistor buffer circuit that can do upwards level shifting, that's not unduly affected by being connected to modules that can pull the voltage down (the otherwise cool, but as yet input-CV-un-buffered VCF6C does for example...) I'd be very interested.....

cheers,

Dave
Back to top
View user's profile Send private message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24081
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Tue Sep 25, 2007 2:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

Normally I'd invert the signal in the software. When that's not possible (because the software is closed or anything) the only thing I can think of is using two transistors.
_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24081
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Tue Sep 25, 2007 2:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

Re. the output being pulled low by the input of the following circuit, that could maybe be solved by using an output that pulls high instead of low, that is using a high side switch. When that would invert the problem (the input pulling the output high instead), a push-pull configuration with two transistors will be needed, although you can always experiment with lowering the collector resistor in the output.

You could also have a look at non-inverting power drivers with a push-pull output and built in level shifting, I saw TI makes some stuff like that (*1) (probably Maxim and others do so as well).

(*1) Like the UC2708, to be found at : http://www.datasheetcatalog.com/texasinstruments/645/

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
amos_joseph



Joined: May 09, 2005
Posts: 50
Location: Lincoln, NE

PostPosted: Tue Sep 25, 2007 3:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

Blue Hell wrote:
When you connect a synth output to your processor output by accident that might kill the processor.


Would something as simple as a diode do the trick?
Back to top
View user's profile Send private message Visit poster's website
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24081
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Tue Sep 25, 2007 3:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

amos_joseph wrote:
Would something as simple as a diode do the trick?


Guess so Very Happy

You said you could afford to put 1 k in the output, that helps. Make it two diodes one to ground one to Vcc and add some resistance as well after it for current limiting. Or leave the resistor out and trust that all possible outputs you'll connect by accident will have current limiting at the output - it doesn't need to be functional you just want to keep things from blowing up.

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
Dave Kendall



Joined: May 26, 2007
Posts: 421
Location: England
Audio files: 3

PostPosted: Tue Sep 25, 2007 3:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hi Jan.
Quote:
Normally I'd invert the signal in the software.

It's an all-CMOS device, no code used, just wires (yes I know it's mad, but what the hell.... Smile ) so it's re-wire time...I'll try it.

Dave
Back to top
View user's profile Send private message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24081
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Tue Sep 25, 2007 3:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

Dave Kendall wrote:
It's an all-CMOS device, no code used


Oh yes I remember that from the old days Laughing

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 1 of 1 [9 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
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