-1

Want to create a weather station with only GY-BME280-3.3 chip and w5100 Ethernet shield mounted over Arduino mega 2560 r3 but I have no previous experience with Arduino. And The Arduino will be hooked up to a router using the Ethernet shield and powered using desktop USB connection or may be with the barrel jack and I want to control it using a GNU/Linux machine. So far I am trying to follow these https://educ8s.tv/arduino-bme280-weather-station,

https://startingelectronics.org/tutorials/arduino/modules/pressure-sensor,

http://cactus.io/projects/weather/arduino-weather-station,

but none of these is an exact match for my setup, so a little confusing as a noob. But my questions is,

How to hook up the GY-BME280-3.3 sensor to the Arduino on which the Ethernet shield is already mounted?

EDIT: So far I have connected the first 4 pins to the pins on the Ethernet on 1->3.3v, 2->gnd, 3->A5, 4->A4 or 1->3.3v, 2->gnd, 3->13, 4->11, 5->10, 6->12 but to no avail. Only 1+6->3.3v, 2->gnd, 3->21, 4->20 finds the sensor but reading is 0,0,0mb in that case and shows reading if SparkFun BME280 library is loaded.

Still the question is, if there any other pin combinations where I don't have to join 1+6 to a 3.3v, just one pin to 3.3v will be enough?

1

You must decide if you want to connect the sensor over I2C or over SPI interface. According to datasheet of the sensor, at power-up pin CSB determines the interface. If CSB is pulled-down SPI is selected. CSB must be connected to VCC to select I²C interface.

On current revisions of Mega and Uno the 'standard location' of I2C pins SDA and SCL is near pin 13 after the Ground and AREF pin. Other location on Mega are pins 20 and 21. (A4 and A5 on Uno). Note that the 'standard location' pis are connected together with the 'numbered' pins, so you can't use 20 and 21 even if you connect the sensor to the standard location pins.

Pin SDO determines the I2C address of the sensor.

If you want to use SPI to connect the sensor to Mega, use SPI pins 50 to 52 and you can use pin 53 as CS (SS) pin. Ethernet shield uses pin 10 as CS for W5100 and pin 4 as CS for pin for the SD card. Note, that Ethernet shield connects to SPI bus on the ICSP header, but those are still SPI bus pins 50 to 52.

Adafruit has a tutorial for this sensor with wiring for Mega.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.