How to reduce MISO voltage?

Hi,

I am using Arduino uno as a spi slave.
I measured the voltage (by scope ) on the MISO, and it show 5V.
I need to reduce the voltage to 3.3V.

Is there somthing on the Arduino uno that enable controlling this voltage?
How can i reduce the voltage?

Tomerf111:
How can i reduce the voltage?

either use a microcontroller which works out of the box at 3.3V or use a dedicated level converter / Level shifter

You can use a voltage divider made from two resistors - for example

Arduino 5v pin ---- 3300ohms --- + --- 5600 ohms --- GND

At the point + between the resistors the voltage will be 3.1v which should be fine.

The mid point voltage is calculated as 5 / (3300 + 5600) * 5600 in case you want to try other values.

There are other methods to match the voltage but that is probably the simplest.

...R

Hi @Tomerf111,

there are many variants of the Arduino boards and quite a few of these are 3.3V, that is the main CPU runs at 3.3V and therefore all inputs and outputs also operate at 3.3V. You do not say which Arduino board type you are using. Would it be possible to use a 3.3V board instead of your current choice?

If you must use a 5V type of Arduino board, there are many cheap level converter boards which can be bought on Ebay. Note that the voltage divider solution can be made to work but timings of the signal transitions will be impacted and the resistor values also depend upon whatever you connect up. Since MISO is used for SPI which is often high speed, I would suggest not using a voltage divider solution.

regards...
--gduino

gduino:
Note that the voltage divider solution can be made to work but timings of the signal transitions will be impacted

I would be interested to get details of the situation in which you experienced that. I have never had any problem like that with voltage dividers.

and the resistor values also depend upon whatever you connect up.

The OP has told us that one end is a 5v I/O pin and the other end is a 3.3v I/O pin.

...R

there are many cheap level converter boards which can be bought on Ebay.

My observations, when checked on a scope, using 'cheap level converter boards' on an SPI interface is that the signal levels and rise times etc are marginal. They might work, but I would not consider such boards as a long term reliable solution.

srnet:

Quote from: Robin2 on Today at 10:04:51
there are many cheap level converter boards which can be bought on Ebay.

You have got the source of your quote wrong.

...R

Robin2:
You have got the source of your quote wrong.

I did indeed, corrected.