arduino-dw1000 icon indicating copy to clipboard operation
arduino-dw1000 copied to clipboard

Fast and Cheap Level shifter 5V -> 3.3V

Open maxicastle opened this issue 9 years ago • 4 comments

Hello friends, thanks a lot for the initiative to create this library (really useful), I only want to share a different way to communicate your arduino 5V Pro-mini/UNO/Mega/etc with the 3,3V DWM1000 module.

It's really simple if you need to communicate your module with your 5V system, but you don't have a level shifter (Chip or module) and you can't get it or need a fast solution you can use the next voltage divider on each ARDUINO_OUTPUT_PIN and connect the output of the voltage divider to the DWM1000_INPUT_PINS, and connect the DWM1000_OUTPUT_PINS(3.3V) directly to your arduino board.

voltage divider

is not forced to use these exact values the only condition that you need to satisfy is:

5V_(R2/(R1+R2))=3.3V or R1=0.5151_R2

Example , for the next diagram this is te I/O configuration

adapterboardtestbed

DWM1000 || Arduino
3 (RSTn) Pin 9 Reset (OUT) 13 (SPICSn) Pin 10 SPI chip select (OUT) 14 (SPIMOSI) Pin 11 MOSI (OUT) 15 (SPIMISO) Pin 12 MISO (IN) 16 (SPICLK) Pin 12 SPI clock (OUT) 17 (GPIO8) Pin 2 interrupt asserted line (IN)

img_7506 img_7494 Uploading IMG_7488.JPG… img_7482

Works really well !!!

maxicastle avatar Feb 21 '16 07:02 maxicastle

Potential dividers are a simple way to make a single-direction level shifter. Can I suggest that hardware advice be kept to the wiki rather than the issues page? I created a page here where everyone can list hardware that they have used successfully.

MikeS159 avatar Mar 02 '16 12:03 MikeS159

I think your configuration is wrong, because in all the pictures there's a wire (pin 12 on arduino) that is attached directly and the voltage is not shifted.

Maybe I'm wrong eh. I tried your configuration and i'm not able to connect and read the DW.

pascalbros avatar Jun 05 '16 21:06 pascalbros

16 (SPICLK) Pin D13 SPI clock (OUT)

R2D2RU avatar Aug 10 '16 12:08 R2D2RU

@maxicastle Hi, please move your idea to the wiki. Thanks for your help:) !

Rotzbua avatar Apr 24 '17 12:04 Rotzbua