electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
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 
Live streaming at radio.electro-music.com

  host / artist show at your time

poster

Please visit the chat
 Forum index » DIY Hardware and Software » Arduino
Another MIDI-to-CV interface
Post new topic   Reply to topic
Page 2 of 2 [34 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Goto page: Previous 1, 2
Author Message
drakfluga



Joined: May 09, 2012
Posts: 49
Location: Gothenburg SE

PostPosted: Sun Nov 13, 2016 5:42 am    Post subject: Reply with quote  Mark this post and the followings unread

gdavis wrote:
I did some more searching and came across the CD4504B hex voltage level shifter. Seems like a winner to me if you can give up 2 gates or add another IC Wink


That looks like a good option! I also found the CD40109, although it's a quad, but seems like we had the same idea. Smile

Looks like the price will be a bit higher compared to the opamp+resistors solution, but even with two of those on the board the component count will drop considerably. Doesn't look like they need any passive components, except for the output impedance resistors and filter caps on the supply rails.

Oh, and I'll need another opamp for the 10V supply, but even then it's so much simpler. Smile

Quote:
The trade off that needs to be taken into consideration is noise. The higher you go, the more susceptible it will be to noise. This will be much more noticeable on CV's compared to gates. Anything in the 10k to 200k (very rough) ballpark should be fine.


I'll leave the CV resistors for now, initial testing has showed very stable CV levels and good tracking with no discernable noise. Might do some testing in the future with higher value resistors and see how high I can go and still get a good CV output.

Thanks again! Your knowledge and tips have been invaluable. I'm learning a lot by doing this and my confidence is improving. Hopefully I'm not making any huge mistakes in my thought process this time. Very Happy

Cheers!
Back to top
View user's profile Send private message
drakfluga



Joined: May 09, 2012
Posts: 49
Location: Gothenburg SE

PostPosted: Sun Nov 13, 2016 9:35 am    Post subject: Reply with quote  Mark this post and the followings unread

So here's my circuit right now, based on the 4504. I guess I should put a few filter caps on the IC supplies, but other than that?

I went with higher feedback resistor values since I'm assuming I don't need to be too concerned with noise on the gates like you said.

I also assume I can tie the negative supply pin on the opamp to GND, I'm not using -15V anywhere else on this board so it'd be nice not to have to worry about it at all.


Screenshot 2016-11-13 17.27.09.png
 Description:
MIDI2CV gate output
 Filesize:  28.29 KB
 Viewed:  239 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

Screenshot 2016-11-13 17.27.09.png


Back to top
View user's profile Send private message
gdavis



Joined: Feb 27, 2013
Posts: 359
Location: San Diego
Audio files: 1

PostPosted: Sun Nov 13, 2016 4:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

drakfluga wrote:
So here's my circuit right now, based on the 4504. I guess I should put a few filter caps on the IC supplies, but other than that?

I went with higher feedback resistor values since I'm assuming I don't need to be too concerned with noise on the gates like you said.

I also assume I can tie the negative supply pin on the opamp to GND, I'm not using -15V anywhere else on this board so it'd be nice not to have to worry about it at all.

Wait, you don't have -15V? Not even for the CV outputs? TL074?

Opamps can't drive quite to the power supply rails. This isn't a problem with the 10V since it's far enough away from +15 and GND, but your CV wouldn't get all the way to 0V. I did a quick test with a TL074 voltage follower supplied with +5V and GND and got down to just under 1.5V before it freaked out and went above 4V (may have become unstable).

There are rail-to-rail opamps that will get closer to the rails but still not quite all the way.

I'm a little wary of using an opamp as a power supply, though to be honest this is getting a little beyond my level of understanding. For just the one level shifter it might be ok. I just threw a 78l10 on V+. Cheap, small, easy.

You didn't connect the select pin. This should be connected to GND for CMOS input mode. The TI data sheet contradicts itself but other data sheets agree with this so hopefully it's correct.

And ya, don't forget the power decoupling caps.

_________________
My synth build blog: http://gndsynth.blogspot.com/
Back to top
View user's profile Send private message
drakfluga



Joined: May 09, 2012
Posts: 49
Location: Gothenburg SE

PostPosted: Mon Nov 14, 2016 10:23 am    Post subject: Reply with quote  Mark this post and the followings unread

gdavis wrote:
Wait, you don't have -15V? Not even for the CV outputs? TL074?

Opamps can't drive quite to the power supply rails. This isn't a problem with the 10V since it's far enough away from +15 and GND, but your CV wouldn't get all the way to 0V. I did a quick test with a TL074 voltage follower supplied with +5V and GND and got down to just under 1.5V before it freaked out and went above 4V (may have become unstable).

There are rail-to-rail opamps that will get closer to the rails but still not quite all the way.

I'm a little wary of using an opamp as a power supply, though to be honest this is getting a little beyond my level of understanding. For just the one level shifter it might be ok. I just threw a 78l10 on V+. Cheap, small, easy.

You didn't connect the select pin. This should be connected to GND for CMOS input mode. The TI data sheet contradicts itself but other data sheets agree with this so hopefully it's correct.

And ya, don't forget the power decoupling caps.


I see! No, I've got -15V on the board and I did have it connected to the CV opamp, but I wondered if I could replace it with GND if I didn't need to go negative on the output. I remember reading about this now, and I was hesitant to do it, but couldn't really remember what the reason was. Thanks for the explanation. Smile

I'll go with the TL071 for the level shifter supply, I don't think it's an issue as the load isn't going to be that bad? 78L10 could of course work too, but I have the opamps at home already so might as well go with what I've got. I don't think it would make a difference in the case of the gates.

Thanks for the heads-up about the SELECT pin, just an oversight. Smile

Another thing that I've been thinking about: I've got an SPI header on the board for programming the uC, but I'm not sure if it needs additional circuitry. I would like to be able to hook up the programmer without messing with jumpers or switches.

Cheers!
Back to top
View user's profile Send private message
gdavis



Joined: Feb 27, 2013
Posts: 359
Location: San Diego
Audio files: 1

PostPosted: Mon Nov 14, 2016 12:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

When the uC is being programmed, it's IO's are tristated. Other devices on the SPI bus may respond erratically to the SPI data since the slave select or other control pins will be floating. To address this, a simple 10k pull up or pull down resistor as necessary to disable the SPI devices is all you need. For example, if a SPI device has an active low slave select, put a pull up on it at it will be inactive during uC programming.

In general you also need to make sure there no contention on the SPI signals (no other devices driving SCLK, MISO and MOSI) but in your case I think the above should be all you need.

_________________
My synth build blog: http://gndsynth.blogspot.com/
Back to top
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 834
Location: Netherlands
Audio files: 27

PostPosted: Wed Nov 23, 2016 12:48 am    Post subject: Reply with quote  Mark this post and the followings unread

maybe a stupid question and may have read over it, but why use a software serial port for midi receive? Shocked


midi_rx.JPG
 Description:
 Filesize:  14.21 KB
 Viewed:  3444 Time(s)

midi_rx.JPG


Back to top
View user's profile Send private message Visit poster's website
drakfluga



Joined: May 09, 2012
Posts: 49
Location: Gothenburg SE

PostPosted: Sat Mar 10, 2018 10:09 am    Post subject: Reply with quote  Mark this post and the followings unread

So I've been tinkering with this piece of hardware for the past year, and I redesigned the whole gate circuit around the CD4504B as gdavis suggested. I'm very happy with the result! I'm using one of the ATmega ports for gates, each I/O line is taken to the level shifter, shifted to 10V and buffered, then out across a 1k resistor to the output jack. I have two gate outputs (GATE and CLK) on the current version but may add more. Using MIDI clock commands for the CLK has however not worked very well as MIDI clock seems to be extremely unreliable. :/ Not sure how to solve that yet.

I'm in the process of implementing note history and glide, and plan to add a knob for glide once I have it functioning in software.

A question: glide behaviour can be done in several different ways. What are people's expectations of a glide? Linear (varying with delta between notes), logarithmic (varying with delta between frequencies) or constant-time (every glide takes the same amount of time no matter how far apart the notes are)?

I naively implemented frequency-domain glide (logarithmic) and it doesn't feel natural at all, so I will try linear next. Maybe it should be possible to switch between linear and constant time. A toggle is easily added. Smile

Grumble wrote:
maybe a stupid question and may have read over it, but why use a software serial port for midi receive? Shocked


A very good question, the answer is I was an idiot and the latest version of my interface uses hardware serial. Wink I also added an ISP header for programming the chip directly on the board, as I previously used the serial port for programming. I've since dropped most Arduino legacy code and am using mostly AVR stuff.
Back to top
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 834
Location: Netherlands
Audio files: 27

PostPosted: Sun Mar 11, 2018 3:56 am    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
I've since dropped most Arduino legacy code and am using mostly AVR stuff.

I too are using the Atmel Studio for programming the arduino's, so I can tell whats going on and not have to follow some strict Arduino IDE rules.
Mostly I must say, because at this moment I am working on a module that uses an OLED screen and I use an arduino library to control it. Had to do some tinkering, but it works now!
So it's great the way Atmel studio is able to work with the Arduino IDE if you want it to!

_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
Grumble



Joined: Nov 23, 2015
Posts: 834
Location: Netherlands
Audio files: 27

PostPosted: Sun Mar 11, 2018 4:11 am    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
A question: glide behaviour can be done in several different ways. What are people's expectations of a glide? Linear (varying with delta between notes), logarithmic (varying with delta between frequencies) or constant-time (every glide takes the same amount of time no matter how far apart the notes are)?


Exponential seems to be the way to go, it also is the easiest to construct in hardware, basically a resistor and a capacitor can do the trick.

_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic
Page 2 of 2 [34 Posts]
View unread posts
View new posts in the last week
Goto page: Previous 1, 2
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Arduino
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
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


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