Simple level converter

modular

#1

Im a newbie at electronics but getting interested in messing with some hardware, based around independently powered 5v circuits. messing with things like hardware oscillators.

my questions really is how to control these from axo and convert between axoloti 3.3v and the 5v levels , in a simple (=few components) way , also baring in mind, I might have multiple axos connected to the same 5v circuit.

(the discussion on Eurorack seem to be quite complex, and possibly overkill for my simple circuits)

Ive done some research and wonder if the following is viable, what the issues are etc

a) axo analog/digital -> 5v circuit
grounding - I assume I connect axo GND to circuit GND, if im using multiple axo to the same circuit , then connect all their GNDs to its GND.

i) direct connection, is safe but I only get 0-3.3v
(do I connect a diode (normal type?, size?) in line, to protect if I accidentally connect the circuits +5v to it )
ii) level converter - https://www.sparkfun.com/products/12009
(axo VCC to LV, circuit +5v to HV)
iii) simple circuit to scale 3.3v to 5v?

b) 5v circuit to axo analog/digital
again, common ground between all devices.

i) simple resistor divider... e.g. 3/5 ratio,
I get that using higher resistor values increases impedance, but no idea what values are reasonable
i.e. why use 10k vs 10m?
... also I guess there is an issue getting 'exactly' 3.3v due to tolerance, and standard resistor values, can i use a trim pot to get close enough
ii) level converter - https://www.sparkfun.com/products/12009

c) audio in/out is anything special required here... as its low voltage anyway, no?

i guess with this kind of 'cv' control getting full range and linear behaviour is perhaps an issue.
but Id assume I can calibrate this with a 'curve' in software in the axo, for both in/out.
or does this not work, due to other physical issues (e.g. temperature?)

the level converters look attractive as a simple solution, any downside - im not doing production runs, so they are cheap enough for my usage :slight_smile:

sorry, I know all this is really basic stuff, but as a software guy, hardware is a mystery :slight_smile:

any good book recommendations?
im ok with ICs, and basics of what resistors/caps... but look at amazement at guys who say 'you'll need a 1ohm resistor there, and place a 1uF cap there :slight_smile:

thanks for any thoughts and pointers

Edit: so looking more at this...
seems logic levels are one thing, and continuous levels another. I'm wondering now if to use vactorals for the later , though they seem to be expensive, but have advantage of isolating the 2 circuits. ( are phototransitor optocouplers only for logic circuits? )

( I'm guessing vactorals are slower but that's not an issue).


Suggestions for CV/gate out from Axoloti to new Euro-compatible Behringer Model D
#2

Hey TB, they important thing is to know what you are attempting to do when going 3.3 to/from 5.
Are you going from Axo to another 5v controller ? Some controls can be achieved quite simply connecting 3.3v to 5v directly. For example if Axo digital to arduino 5v digital, 3.3v is sufficient to register a digital "high" (it works for me), same applies connective Axo uart TX to 5v RX, and just link the GND and everything works fine, but NOT the same in reverse. :scream:, you will need to convert. If you are trying Analogue Axo out to 5v Analogue in, this may affect your analogue reading, but you may have the option of of an Analogue voltage reference on the 5v side to account for the 3.3 v reference that can be connected. And if they all come from the same power source, connecting the GND's should not be an issue if required. To be safe, I have made a "Y" USB cable I split into 2 connectors so I can be sure they are definitely from the same power source, then I won't need to question any adapters and USB power supplies etc. Logic converters work, there are some unlike the sparkfun one that are by-directional and have more inputs, I try to ensure I have considered other alternatives as I find them a little fiddly to work with, but that is just me I guess. :slight_smile:


#3

thanks @Gavin

do you mean a 3.3ref voltage? (sorry not sure quite what you mean here)

hmm, this confuses me too ...

are you saying, if we have 3 devices all coming from different power supplies , then ground should not be connected?

do I then need to start thinking isolated circuits ?


#4

Analogue Voltage Reference - Many micro controllers Arduino, Teensy and the like have an Analogue Reference voltage input that can be used for analogue readings with a different analogue scope. But most importantly, it must not exceed the boards voltage. So for example connecting a pot, lets say you connect up a pot to a 5v arduino analogue input that has say 1024 analogue reading points, but the max voltage going into the pot is 3.3v, the arduino default analogue range is 0v to 5v, but you are connecting only 0v to 3.3v, then you will miss out on the entire range, but if you connect 3.3v to the analogue reference, it will use this instead to calculate the range of 1024 points between 0v to 3.3v. Hope I explained properly, have never had to put it in writing before. From what I see on the Axo, there isn't one.

Power source grounds - I know there has been a lot of discussions on many axo posts about power source, but this point, even if you Google it, there are a lot of resources and write ups regarding methods etc, and many of them because of costly mistakes. I am probably not the best to give detailed advice in this area, but basically, if you have 2 separate USB power supplies plugged into the mains, do not connect the ground. But 2 outputs from the same supply should be safe if it comes from the same single source. If you are powering multiple USB devices from your PC at different USB ports, then this should be 99% safe, because they should come from the same 5v rail in the PSU, but this one I have found has controversial discussion points, especially if they are using the 12v rails, because many high wattage PSU's have multiple 12v sources, some appear to be safe, and some not. Why would people use a PSU, because you get high current, you can use regulators to get the voltage you want, so basic PSU's are great power supplies, maybe this is an option for you. They are very cheap, there are heaps of write ups on using PSU's as power supplies, I've done a couple over the years and they are good, they come with fan, 3.3v, 5v, 12v, -5v, -12v, and all the voltages use the same ground.

Isolated circuits are an option, but hard to know your actual needs, suggest you map it all out and think about options.


#5

To quickly add, link to a list of several PSU power supply write ups on instructables.
http://www.instructables.com/howto/psu+power+supply/


#6

VDDA is available on one of the solder pads, and is the analog positive reference for the microcontroller. It is connected through a ferrite to the 3.3V supply, and a separate bypass capacitor to filter high frequency noises. Desoldering the ferrite woul allow to inject a different reference voltage if really needed, I have not tested, please check and respect all the conditions in the microcontroller datasheet.
"It is recommended to power VDD and VDDA from the same source. A maximum difference of 300 mV between VDD and
VDDA can be tolerated during power-up and power-down operation."

If you connect different (audio) devices with their own (independent) power supply, their grounds will typically connect through the audio or USB cable.
The most important concern is, when using power from USB, the ground voltage gets contaminated by (noisy) current running through the USB ground wire, and is no longer a proper reference, causing ground loop noises.

I'm not a fan of using a ATX supply as a cheap lab power supply. They're often designed to work with a minimum load attached, and can fail to regulate in absence of such a load. And their current rating is way more than usually needed.

Back to the original topic:

in case of digital: many 5V digital chips will accept 3.3 volt logic directly just fine. In the 74xx logic family, the 74HCxx specifies a minimum voltage of 3.5V for a logic high (3.3V logic won't deliver that), while 74HCTxx specifies a minimum of 2V for a logic high. A level shifter may be needed for high speed communications.
Yes, connect GND between circuits.

In case of a connection to a 5V analog circuit, you'd need an "opamp" to amplify the voltage if you need full range.

For 5V range analog voltages, a simple resistor divider will do. But it also will "load" the source circuit, often acceptable, but not so good in Eurorack context since the load will reduce precision, important when using 1V/oct pitch.

Their analog characteristics are very non-linear and imprecise, and subject to aging. Some special optocoupler devices exist that use a 2nd photodiode to cancel the error.

Vactrols are out of fashion, as they contain Cadmium, not in compliance with the RoHS regulations, though their characteristics can be pleasant for audio VCA's or compressors, and easy to use.


#7

Hi technobear, but sure whether you ever got to the bottom of this to your satisfaction. I'm thinking of ways to connect my axo to a diy modular synth so I'll tell you what I've learned.

Grounds. If you're connecting to a eurorack or other jack based system the ground is already one of the connections, so as long as you wire the jacks correctly, including the ground wire, on both sides they will have connected grounds. There is a ground reference pad on the axo to connect to your jacks. If you want to make a banana system (cooler imo) you'll need a separate ground banana coming out of the axo and you can connect it to the ground on the modular. I'm planning on making the interface on teh actual modular so it can be powered by +/- 12V so will just put jacks on the modular which will be grounded.

If you want to amplify the signal to modular levels, for digital triggers, analogue outs and audio out, you will need to make opamp circuits. Opamps are actually pretty easy to understand. Have a look as some basic tutorials online, or check out the Make book on diy analogue synths by ray wilson. It's just a case of ratios between input resistor and feedback resistor to get the correct gain, or putting a pot in for variable gain.

IF you want to keep everything powered by the axo you will only be able to amplify the voltage to near the rails. So the axo is 0-5, so you will be able to get to near 2.5V p to p (swing) bipolad or near 0-5 positive. This is good enough for triggering things but not really for cv control (eurorack is -5/5 so 10 v p to p).

I wouldn't bother with vactrols. They're expensive these days and don't give consistent results on a piece by piece basis.

In terms of getting the modular (or whatever) voltages down that is a simpler thing to do. You can make a passive attenuator or fixed value.

You might find this an interesting read: http://www.cgs.synth.net/modules/cgs60_sba.html

KEn stone is a synth diy legend and makes and sells pcbs for Serge modular systems as well as his own designs.

¬¬ EDIT ¬¬

You might also like to have a look at this site for great simulations of basic circuits. Really nice to see something to get your head around it!


#8

You can't get much simpler than the $3 PCB thetechnobear linked to in his original post - 4 channels of bi-directional logic conversion for $3.