Sensors Kit compatibility and Raspberry Pi 5

March 2, 2024, 13:28

ken_t1

Hello guys ! I'm very new to the raspberry pi world and I would like to know if the sensors that i can see on the internet, said to be compatible with RPi 4B and older ones, could be so with RPi 5 or not ? Thanks πŸ™‚

k9t33n

link?

ken_t1

this is a pure example but i've seen a lot of them

k9t33n

any sensors in particular? because the gpio is the same most should work with the pi5

k9t33n

but if it has to use drivers or anything then i would double check, to sumarise it though for basic stuff like distance sensors your fine

ken_t1

Ok thank you

ken_t1

Do you have any starter kit of sensors to have best fun discovering the capabilities of the RPi 5 ? Better than the one I linked πŸ™„

k9t33n

https://thepihut.com/products/camjam-edukit this is the one i got and its served me well

ken_t1

thanks a lot

k9t33n

although the one you linked comes with a lot more stuff

k9t33n

im jealous of the distance sensor

ken_t1

the fact is i'm studying electronics in engineering class in France πŸ˜‰

k9t33n

nice

ken_t1

so i'm used to use resistors and capacitors, and stuff like that

ken_t1

but i wanted to make my own projects, implying sensors

k9t33n

that kit doesnt really have any sensors

ken_t1

cause we don't use that kind of stuff in class, yet i expect

ken_t1

yeah i've noticed

k9t33n

i mean unless you count the button as one lol

ken_t1

haha

k9t33n

wrong reply

ken_t1

it is actually ^^

ken_t1

action sensor

k9t33n

so i suggest you get another bigger kit

ken_t1

yeah i'm gonna search for one on amazon

k9t33n

shall i find one with sensors? itd help if youd name one in particular that you are interested in

ken_t1

the basic ones, humidity, temp, gyroscope...

ken_t1

and many others if possible

ken_t1

i want to make the most of it

ken_t1

as much different projects as possible to get to know how the Pi work and to code with Python, cause i'm only used to java

k9t33n

this one looks good then

k9t33n

ive seen another person get the same one, i think its a good quality kit

ken_t1

i don't know, there aren't that much sensors

ken_t1

i've seen a arduino kit sensors with 27 sensors

ken_t1

but don't know if compatible

ken_t1

this one

k9t33n

looks good but I don't think that comes with a breadboard and gpio wires so you might want to get those along with resistors

oops.se

There is nothing special about them that makes them compatible with a specific Raspberry Pi model. The kit has just electronic components that can be used with Raspberry Pi, Arduino, Beaglebone and so on.

k9t33n

yes because its only electronics. I was thinking your talking about sense hats at first

ken_t1

Other thing, I realised that RPi 5 doesn't have ADC gpio, so that many sensors can't be implemented directly on it. Does it worth it adding a Pi Pico to collect data from the sensors and sends it to the Pi 5 ? Cause Pi Pico has some adc ports

jannik44

i cant recommend the rpi pico anymore its wayy overpriced, you can get rp2040 chip controllers from aliexpress for half the price with more features like neopixel

ken_t1

Okk

ken_t1

Do you have any other idea to use analogic sensors with my RPi ?

ken_t1

Or do I have to purchase an Arduino ? :/

ken_t1

Then connect it to my RPi..

jannik44

just purchase an rp2040 chip board

jannik44

its the same chip as the rpi pico

jannik44

but actually, i think there are adc converters available by themselves

ken_t1

Yeah I found some on Amazon but don't know the quality

ken_t1

I'm gonna rather take a rp2040

ken_t1

Does it work with 5V sensors

ken_t1

Cause the kit I found is primarily made for Arduino

ken_t1

Ok I'll finally use a MCP3008-I/P, a adc converter that costs a baguette πŸ₯–

ken_t1

But since I'm very new to that kind of electronics because I'm only used to solder on PCBs, not to use breadboard (that I never used actually ^^), that will be all fun to meeee

k9t33n

french currency? πŸ˜‚

ken_t1

Of course πŸ˜‚

ken_t1

What do you think of it ? <@1071178789939331253>

ken_t1

Ok I'm gonna go for a sense hat first

ken_t1

Easier to setup and cheaper

ken_t1

It should be compatible with RPi 5, does it ?

oops.se

Close to all models of Raspberry Pi have the same 40 pin header. So electrically they are compatible. And than i comes to the HAT and drivers. Some HATs hasn't updated drivers for Pi 5, check with the vendor.

oops.se

And that HAT is more complex than the kits you ref to earlier

ken_t1

More complex but easier to install πŸ™‚

ken_t1

And less things to buy

oops.se

Agree

k9t33n

looks good now it has resistors but do you have a breadboard and gpio wires?

ken_t1

Not yet that's the reason why I should rather buy a hat to start discovering sensors and then buying all that stuff later

oops.se

HATs is a perfect for that, I have designed some HATs with just a couple LEDs, buttons and sensors (DS18B20 and a socket for a accel sensor) for that purpose

ken_t1

They didn't respond to me yet I want to geeeet one 😭

ken_t1

Okok I did some research on the internet it seems to work fine with RPi 5 πŸ‘

ken_t1

I'll buy oneeee

oops.se

Nice, I suspect that it will work with a Pi 5 but I can't vouch for it.

k9t33n

unless it uses drivers your pretty safe

ken_t1

I've just seen that the temp sensor is just above the CPU so the values aren't really relevant.. does someone know about a good extender for the 40 gpio ?

ken_t1

To set the hat on the extender

ken_t1

https://shop.pimoroni.com/products/40-pin-gpio-extension-cable?variant=32246715580499 something like that but available in my country (France) on Amazon preferably

ken_t1

?

oops.se

No answer = No one know ! And that should be easy to find with a bit googling.

ken_t1

Sorry πŸ˜… i did some research and i did find some but very expensive for what it is

oops.se

try ebay then

ken_t1

okay i received the sens hat, it doesn't fit on the RPi 5 directly due to the 4 Poe pins placed very badly :/

ken_t1

luckily i bought a gpio ribbon extension cable, 5 actually in the pack πŸ˜‚

ken_t1

expecting to get it tomorrow

k9t33n

ok good

ken_t1

What do I risk by plugging the cable on the wrong side of the hat ??

ken_t1

Cause I have no idea on which side it comes out

ken_t1

From the cable

k9t33n

possibly killing your pi

ken_t1

Oh great

k9t33n

well just plug it in and make sure the corner gpio goes to the correct corner on the end of the cable

k9t33n

simple

ken_t1

The correct corner ?

k9t33n

like pick a gpio pin on the corner

k9t33n

and just make sure that the other side lines up with that corner

k9t33n

also you might want to use a marker to mark both sides of the corner for the future

ken_t1



ken_t1

It might be because I'm french but I didn't understand that very well πŸ˜…πŸ˜…

k9t33n

lol

ken_t1

Sry

k9t33n

ok so the way I'd do this is id take the gpio extender off

ken_t1


k9t33n

then act like your putting the hat on and mark a corner on the hat and the corresponding corner on the pi

ken_t1

Another pic with delay haha

k9t33n

now see how it one side starts off white and the other starts off red?

k9t33n

make sure the white side is plugged into the corner with the marking on both the pi and hat

k9t33n

make sense?

ken_t1

White and red ?

k9t33n

the gpio extender

k9t33n


k9t33n

just the colours

ken_t1

I got it

ken_t1

I might be tired

ken_t1

Just to make sure

ken_t1


ken_t1

Since the hat goes that way

ken_t1

I want to plug it that way

ken_t1


ken_t1

The white side goes to the white side and the red one to the red one

ken_t1



ken_t1

It says that it doesn't detect it :/

ken_t1

I enabled I2C

ken_t1

I downloaded sense-hat

ken_t1

Ok ! It seems that I need to apply pressure on the hat to guarantee the connection

ken_t1

The pins might not be inserted correctly without pressure

k9t33n

hmm

k9t33n

do you need to constantly apply pressure?

ken_t1

Yeah

ken_t1

I used a clothespin to keep pressure on it :/

ken_t1

Maybe I haven't plugged it entirely? But I don't want to break it, I forced a bit already and didn't get deeper

ken_t1

Ok I forced even more and it plugged in, may not be able to get it out but it works fine

k9t33n

ok

k9t33n

need any more help now?

ken_t1

No that's fine thank you very much for your help

ken_t1

Now I'm gonna have fun with programming a game and play it on the hat haha