hadi2009
Posts: 35
Joined: Sun Dec 15, 2019 9:57 pm

Switching from Arduino to RPi, what parts to buy

Sat Feb 15, 2020 4:32 pm

Hi. I used to use Arduino. Now I'm switching to Raspberry Pi 4 model B. It seems like I will need few extra parts to make some of the Arduino components (I2C-LCD, sensors....) usable with Raspberry Pi. I read that I need a logic level converter to be able to connect my I2C-LCD to the 3.3 V pins of the Raspberry Pi and I need an analogue to digital converter to use a potentiometer, etc...…

Below is the link to the kit I had for my Arduino. Can you please tell me what parts I need to utilize them with my RPi? I f you have good sources to buy from I would appreciate.


https://www.banggood.com/Geekcreit-UNO- ... rehouse=CN

User avatar
scruss
Posts: 3136
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Switching from Arduino to RPi, what parts to buy

Sat Feb 15, 2020 6:26 pm

That's a lot of sensors. Not all of them will work with the supplied 5 V Arduinos, so maybe be selective?

At the very least you'll need:
  • a GPIO to breadboard adapter. These usually go by the name Adafruit gave them, the T-Cobbler
  • an analogue to digital converter, typically a Microchip MCP3008, but any of the MCP3x0y chips should work (the higher x, the higher precision; the higher y, the greater the number of input channels). Any of the sensors that go into an A channel on the Arduino need to use the analogue to digital converter.
  • level shifters: there are lots of different ways to do this — some devices work fine with resistor networks, others need fancier devices.
Have fun, and be careful not to fry your Pi!
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

boyoh
Posts: 1463
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: Switching from Arduino to RPi, what parts to buy

Sat Feb 15, 2020 7:12 pm

You are given the option of setting the GPIO I/P
To a impedance level that the processor can respond
to. In its high impedance state floating, It will not,
sink or source a working level signal. This being a
logic level 0 low or 1 high, So you must set it to a
working impedance level by setting the internal
resistance 50k or using a external resistor of 10k .
If you want it to respond to a logic 1 high you
connect it to the 0v rail. If you want it to respond
to a logic 0v low you connect it to the 3.3v rail

One point is if you have the pull-up resistor to low a
value this will set the IN/Put impedance to low,
Ok for noise suppression, but will degrade the
low input signal . ( Impedance = Resistance )

Regards BoyOh
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

LTolledo
Posts: 3254
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Switching from Arduino to RPi, what parts to buy

Sat Feb 15, 2020 8:36 pm

some transistors (singles, arrays), opto-couplers, and my fave MCP23017 I/O expander

depending on the project....you may or may not need additional parts
just tell us what particular project you will be working on and the more experienced in us here will guide you...
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

hadi2009
Posts: 35
Joined: Sun Dec 15, 2019 9:57 pm

Re: Switching from Arduino to RPi, what parts to buy

Mon Feb 17, 2020 4:02 am

I might need I2C and maybe single wire transfer so can you please send me a link for what type of level shifter I should buy

PhatFil
Posts: 1665
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Switching from Arduino to RPi, what parts to buy

Mon Feb 17, 2020 4:31 am

hadi2009 wrote:
Mon Feb 17, 2020 4:02 am
I might need I2C and maybe single wire transfer so can you please send me a link for what type of level shifter I should buy
your pretty safe buying from the far east portals, these are very cheap and dont use components worth counterfeiting so while you may get a few duds in a batch the fact you can probably buy 5x-10x for the cost of something with an adafruit or sparkfun branding makes it a valid punt imho ;)
https://www.aliexpress.com/item/3273043 ... web201603_ for example

i would suggest the 4x modules, 2x modules could become a pita if you need more than 1 or 2 and 8x modules can be pain if you only need 1 or 2 lines


** EDIT the hidden cost of buying cheap is the probable requirement to set up a test rig to test each module as if you dont your bound to have and pick a dud early on and loose time and some portion of sanity..

otherwise you can spend a lot more and buy from a reputable supplier who have already absorbed the cost of quality control..
is a $3-4 saving on a component worth the risk of a few duds??

Return to “Beginners”