Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
More and more interesting devices seem to be using 3.3V rather than the usual 5V that micro-controllers run
at. I find that level conversion circuitry often clutters the rest of the circuit and has to be tweaked for the
characteristics of the device being interfaced with. This posting details the research for and construction of a
reusable, plug-n-play power drop and bi-directional level converter for use in prototyping.
By far the easiest solution is to also run the micro-controller at 3.3V, but this can affect maximum frequency
of the device and can complicate interfacing with USB. The alternative is to use a small regulator to down
shift the 5V to 3.3V supply voltage (if not using an Arduino like board which has one built in) and an ad-hoc
level conversion circuit for the logic lines.
Power Conversion
The Circuit below uses a Microchip MCP1700 LDO Voltage Regulator, which is fairly cheap, and available
in a number of output voltages and case styles, the device can provide upto 250mA, but unless cooled I
wouldn't draw more than 10s of mA through it - particularly in the SOT23-3 style case (see here for more).
we're shifting up or down (if the driving line is the low or high level respectively).
Bidirectional Conversion
Bidirectional Level conversion is more complex, as either end of the line can be driving the circuit. There are
also some bidirectional IC level shifters available, for example the Maxim Range of level shifters look
interesting but these don't yet appear to be very cheaply priced in small quantities.
The circuit below shows a bidirectional voltage shifter that first appeared in an Application Note by Herman
Schutte at Philips. The technique is unique in that it uses a single MOSFET transistor, is bi-directional, and
can work with a fairly large range of voltages.
The resistors are only required if the lines are open-collector (not connected to GND or +V), which is not the
case on the 5V side if connected to an AVR output pin or an input pin with the internal pull up resistor
enabled). But adding does no harm and allows the circuit to be used in other situations.
Below is a prototype soldered onto vero board, the power shift is electrically separate from the level shifters
allowing an external 3.3V to be used if available.
.
The soldered SMD components aren't pretty but usable until a PCB version is ready.
References
1.
2.
3.
4.
5.
6.
7.
Set a pin to 5V by saving "1" to its control file, set it back to 0V by saving "0".
Control LCD and LED displays by writing the data to display to a file.
Communicate with TWI, and SPI and other devices by writing data to a file.
Like
Recent Posts
phatIO
Installing AVR GCC on OS X
Automating Gerbers from Eagle
SMT Table Top Reflow Oven (part 3): Final Build
Programming the AD9851 DDS synthesizer
Using the ICM7218 LED driver
Decoding a Rotary Encoder
External Time Capsule Fan
SMT Table Top Reflow Oven (part 2): Controlling the Heater Elements
Using SPI on an AVR (3)
Using the MAX6675 Thermocouple-to-Digital Converter
Bidirectional Level Converter PCB
SMT Table Top Reflow Oven (part 1)
Using SPI on an AVR (2)
Review: The Saleae Logic
Categories/Tags
Howto, Projects, Reviews, Miscellaneous.
arduino, seeeduino, servo, photoresistor, control, piezo, shifter, voltage conversion, 3.3V, 5V, AVR,
regulator, LDO, MOSFET, SPI, Serial, MCP3201, DAC, at90usb162, atmega328, Saleae Logic, USB,
DS1305, RTC, interrupts, SMT, soldering, reflow oven, MAX6675, MCP1700, master/slave,
Thermocouple, relay, LED, AD9851, pcb, eagle, phatIO