Schematics of a weather station

Hello,

I am planning to build a weather station using an arduino uno. The system should contain

  • DHT22 and BMP180 sensors for measuring temperatute, humidity and pressure
  • a photoresistor to measure light intensity
  • a 433 MHz RF receiver for receiving weather data from a commercial external temp&humidity sensor
  • a DS3231 real time clock
  • a SD card module (SPI) for datalogging
  • an ESP2866 to transmit the measured data to a web server
  • an I2C LCD

Because the arduino only supports up to 50mA at 3.3V, I have added a AMS1117-3.3V voltage regulator.
My BMP180 sensor is not compatible with 5v I2C logic, therefore I have added a I2C level converter which also converts the signal levels of the ESP2866 (3.3V) to arduino (5V).

Before I build the circuit, can someone please have a short look at the circuit if I have done a misteke that could destoy a component?

Thank you very much
Frank

Post a schematic diagram (hand drawn is fine) and perhaps someone will help.

No one wants to try to figure out a *$%##@ Fritzing diagram.

Fritz should have been thrown in jail for awhile to discourage other people from inventing such technical atrocities.

I used fritzing because I find the drawing much more clearer than a handwritten diagram. Making diagrams with fritzing takes a longer time than a simple handdrawn sketch, but the result is cleaner and easier to understand I think. Wouldn't be the hand drawn schematic diagram exactly the same as my picture, but only "dirtier"?

Then I post my main questions as text:

  • Is an external 5V power supply necessary, or can I use the 5V from the arduino for all the devices?
  • Can I use the I2C level converter also for the ESP8266, although ESP8266 is not a I2C device, but requires level shifting between 3.3V and 5V?

Thanks
Frank

The world has been very successfully communicating circuitry via standardized schematics for around 100 years. Fritzing diagrams are definitely a step backward, and are only for complete beginners and the simplest circuits. They are confusing, misleading and jam packed with completely irrelevant and distracting detail.

can I use the 5V from the arduino for all the devices?

If you do not exceed about one half the allowable maximum current, which depends on the type of Arduino.

Can I use the I2C level converter also for the ESP8266

Perhaps. Post a link to the product page. However, with I2C you don't really need a level converter if you are careful. Connect the pullup resistors to the 3.3V source.

Thanks for you answer. This is my first arduino project, therefore I had no idea what is the correct way of drawing circuits. I know the standardized symbols for basic elements like resistors, capacitors, diodes, but for more complex modules like the commercial sensors used for arduino, I do not know how to draw them standardized.

I have ordered a level shifter like this one: https://www.sparkfun.com/products/12009
On the website they say "Each level converter has the capability of converting 4 pins on the high side to 4 pins on the low side with two inputs and two outputs provided for each side.", but in the schematics at that site it looks like that the gate of the Field Effect Transistors is controlled by the low voltage side for all 4 channels. So it is not bidirectional but has 4 LV inputs and 4 HV outputs. Strange.

I use several I2C devices on the same bus, some of them are running on 5V, so I cannot pull the logic levels to 3.3V. The LCD I2C controller seems to have builtin pullup resistors to 5V and I cannot disable them. Even if I could, I don't know if the 5V LCD I2C controller would understand the 3.3V logic.

For a first project. No.

Start smaller.

Have you got say, the LCD screen working on its own?

Try each component by itself. Start by only getting data from the DHT22 Sensor.

Then get the data to display on the LCD.

Then get it to save the data to a .CSV on the SD card etc.

Too much at once for a starter project imho.

It does not seem like a good idea to mix 3.3V I2C devices and 5V I2C slave devices, even with a level converter, but I have not tried it.

Have you figured out whether the code to do all you need will fit in a Uno?
For example, the code needed to receive the external temp / humidity sensor?
I would start with something far simpler.
What you are attempting is not by any means easy.

Yes, it is my first project but of course I have tested the components separately, for example I have programmed the arduino to read the temperature sensor, display it on the LC display and send the temparature reading via 433 MHz to another arduino that writes the data to an SD card. But these things were not real projects, I was just playing around and finding out how the things work. I assembled the circuit on a breadboard and will take it apart later when I use the components to build the weather station and solder them onto a circuit board. I also have some programming experience, therefore only the electronics part is new for me. I was just asking the questions because I wanted to be sure that I would not destroy any component as it would be the case if I would connect the 3.3V and 5V devieces together on the same I2C bus without level shifters.

Is it possible to use two separate I2C busses with only one arduino, one operating at 3.3v, the other one at 5V? Like in the case of serial communications, it is possible to use pin 0 and 1 for serial communiucation via USB and at the same time one can use another serial bus by the Software Serial library.

Ok, the memory usage could be a problem, especially because I have to use many different libraries. I will build up everything on a breadboard and write the software for testing before I solder everything.

It is possible to have two I2C buses, one hardware and one software, but I don't think you need to do that.

You didn't say what level shifter you have, so I don't know how it works or whether you can use it with a mixture of 3.3 and 5V devices.

The I2C bus is "passive" which means that the master and slave components do not actively raise the voltage levels to (for example) 5V. The external resistors do that.

It may be that the 5V devices on the bus will respond properly to 3.3V levels as "HIGH", in which case you can try using 2.2K pullup resistors to 3.3V and connect all the I2C devices to the same two lines.

I have tried to use pullup resistors to bring the logic levels of the 5V I2C LCD module to 3.3V but it didn't work, maybe the resistance of my resistors was too large, so the internal pullup resistors to 5V of the 5V I2C LCD module dominated the pullup process. Unfortunately I cannot deactivate these internal pullup resistors. If I could do that, I could just pull the level to 3.3V and test if the 5V device can understand it.

My logic level converter is built up like this: http://cdn.sparkfun.com/datasheets/BreakoutBoards/Logic_Level_Bidirectional.pdf It looks like that it should work.