how to connect more sensors

On 2019 May 28 19:57:26, you wrote to All:

MG> Its unreasonable to say "I can't solder connections and can't be bothered MG> to read the instructions" and expect us to do your job for free.

job? more like school work...

-- rumplestiltskin

)\/(ark

Always Mount a Scratch Monkey Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong... ... Never read the fine print. You're not going to like it.

Reply to
mark lewis
Loading thread data ...

Hi everybody, sorry for being newbie, at the moment I'm doing an exercise f or the school, a meteo station with 4 sensors. I installed raspbian and use it with Putty and VLC. The question is how I connect, at SLK and SDA pins the 3 sensors school gave me (the fourth -VOC- is serial, has its own conne ction). I'm not a technician and have a little manual skill, so I ignore th e way to do it. The aim is to connect simultaneously the 3 sensors, by now I can only use one sensor only. What hardware is the solution? Thankyou Marius

Reply to
mario_rossi

Nobody here can help unless we know exactly what the four sensors are, who made them, and what model they are.

Its unreasonable to say "I can't solder connections and can't be bothered to read the instructions" and expect us to do your job for free.

So, at a minimum you need to tell us exactly what each sensor measures as well as its make and model. You also need to provide working URLs for the online documentation for each sensor.

To be useful this documentation needs to describe the hardware (datasheet wiring diagrams, etc) in enough detail for a competent person to understand how to connect it to an RPi and its configured. It should also include documentation for any supporting software if this is supplied with the sensor.

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

Mario,

You didn't specify it, but I'm assuming you're talking about I2C (its SCLK by the way) than how are you currently talking to your first device ? Isn't there a "device address" involved ? And if so, do the two other devices not have their own addresses ?

In that case its rather easy: You connect all three devices to the RPi's SCLK and SDA pins, and talk to each of them by their device adresses. Each device on that bus listens if their address is send, and irf not ignores the following databytes.

... which is a thing that they should have explained in class.

Also, you could also google "I2C protocol" and get a much better explanation, and most likely some example code too.

Regards, Rudy Wieser

Reply to
R.Wieser

After which, shouldn't the student also show what he's done so far - code and connections - to do his own homework?

--
Jim H
Reply to
Jim H

On Tue, 28 May 2019 12:11:56 -0700 (PDT), mario snipped-for-privacy@peppercom.it declaimed the following:

"SLK" I don't recognize.

Are they I2C or SPI. If I2C you just hook them (SCL and SDA) in parallel -- as each device should have its own address, which gets sent in the data stream to identify which device is being commanded.

SCL ----------------------------------------------------------- | | | | rpi sen1 sen2 sen3 | | | | SDA -----------------------------------------------------

For SPI, you will need to allocate one GPIO per device to act as a chip-select (depending on wiring either set these with pull-up resistors and drive one GPIO low to select a sensor, or pull-down resistors and drive one GPIO high to select the sensor). With the sensor selection, send the appropriate commands and read the return data (SPI tends to send a return bit for every bit sent to a device). SPI uses two data lines MOSI/MISO and a clock -- shared by all devices, and separate select lines.

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
	wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/
Reply to
Dennis Lee Bieber

...I'm not very good in using newsgroup functions :-( anyway, I copy here the urls of each sensor and other devices professor said we'll use,

1)
formatting link
(PM1.0, P M2.5 and PM10 measurer) 2)
formatting link
(temp+umidity) 3)
formatting link
(serial VOC and CO2) 4)
formatting link
(pressure+altitude) 5)
formatting link
formatting link

I didn't say but, we (group of students) soldered all the "holes" (sda, scl ...) with a comb-like metal (like this ++++), so that the pins one side com ing from sensor enter the cablet whose other side connects to right pin on Rpi. This is our problem (I think it is the thinnest of all the problems :- ) but we're still beginners), a cablet is for 1 sensor but the pins on Rpi are only 2... What is needed is a "multicablet": 1 end to the Rpi, that divides in more ends at the other side, so the sensors can share the c ommunication with the processor

Reply to
mario_rossi

In article (Dans l'article) , Martin

It may not be unreasonable to think that an expert would be able to give a friendly advice to a young student and to give him some ideas to move towards the solution ... for free.

Reply to
Jean-Pierre Kuypers

Yes, that's possible. I said 'job' because I thought the OP might be a friend of a staff member who was thought to understand RPIs and so been 'volunteered' to help before finding himself out of his depth.

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

Agreed, but "I'm not a technician and have a little manual skill, so I ignore the way to do it" sounds much more like "do it for me because I don't want to" than "please help me learn how to do it".

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

Sounds more like someone who doesn't have English as a first language to me and this not being able to express their request simply.

What makes me smile is it's fairly obvious from the signal names these are I2C sensors and nobody has told him to read about I2C.

Hint: Mario, once you have read about I2C you need to find out if the sensors have different I2C addresses. If they do then you can connect them in parallel and you are nearly done.

There, a hint on how to proceed without doing the job for the guy. You can all do it if you try.

Reply to
mm0fmf

On Tue, 28 May 2019 17:05:15 -0700 (PDT), mario snipped-for-privacy@peppercom.it declaimed the following:

What type of RPi do you have that you had to solder to it? All of mine came with a set of pins for connecting jumper wires

(depending on what type of ends you need)

formatting link
formatting link
formatting link

and a breadboard (for solderless development and component reuse)

formatting link
formatting link
formatting link

or proto-board (for soldering a more permanent project -- these have copper in the same arrangement as a breadboard, so when the project works you just move the components to the same position on the proto-board and solder them)

And here is one meant for direct jumpering of an RPi

formatting link

breakout and cable for use on breadboard

formatting link
formatting link
formatting link

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
	wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/
Reply to
Dennis Lee Bieber

My rpi zeros came with no pins soldered to the GPIO ports. Had to solder myself on both of them

--
--
Reply to
Björn Lundin

I am more than willing to match the effort of the student in trying to solve any problem unfortunately in this case the effort appears to be ZERO

Reply to
Alister

Indeed - I read "I ignore" as "I am ignorant" rather than "I can't be bothered to look".

Well done. :-)

Reply to
Rob Morley

And don't forget the pullup resistors on the 2 lines. Try 4k7 for starters or see, e.g.:

formatting link

Reply to
A. Dumas

Pi Zeros don't (except the WH), not sure about the others.

Note that those don't suit later Pi models with a 40pin GPIO header.

--
__          __ 
#_ < |\| |< _#
Reply to
Computer Nerd Kev

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.