Posts

Showing posts from January, 2021

Reading the Temp & Humidity from the DHT11 connected to a Raspberry PI

Image
  Connecting the thermal module (DHT11) is quite simple. Here're the pins that I used. Module    RPI GND          GND (Pin 6) VCC          VCC (Pin 1 - may need Pin 2 (5v) for longer distances) Data          GPIO 0 (Pin 11) Overall, the way to read data from the thermal module is to pulse the data pin and then wait for 40 bits of data. The Pulse The RPi needs to pulse the data pin low for 18ms (milliseconds) and then wait for module to pulse the data signal low then high for 80us (microseconds) The Data The data is transmitted as 50us of the data line getting pulled low, followed by the line getting pulled high for ~27us (for a "0") or high for 70us (for a "1"). The 40 bits The 40 bits are made up of the following 2 x 8 bits of humidity 2 x 8 bits of temperature 8 bits of parity The humidity and temperature are made up of the first 8 bits are the whole part of the number when the second 8 bits are the fractional part. For example 0x10 0x12 would be 0x10.0x12 = 1

Quick guide: ADS1115 on Raspberry Pi

Image
Note that I'm specifically using this device (Well, the 12bit version, but that's a different/Amazon story),  ADS1115 16 Bits 4 Channel Analog-to-Digital ADC PGA Converter with Programmable Gain Amplifier High Precision I2C  First thing is to solder all the pins (Note that if you're only sampling one analog input, you could ignore A1->A3). I soldered male breadboard jumper wires on, rather than the pin header, as that adds even more bulk.  Next is to connect to the Raspberry Pi.  ADC (Analog to Digital Converter) to RPi connections: VDD to 3.3v            -  Pin1 GND to GND              - Pin 6 SCL to I2C 1 Clock    - Pin 5 SDA to I2C 1 Data     - Pin 3 ADDR to GPIO<any>        - For me Pin 13, GPIO2/27 ALRT to GPIO<any>      - For me Pin 11, GPIO0/17   SDA/SCL are the data and clock for i2c. ADDR is to "address" the ADC device - active high. ALRT is an alert that something has changed. Input from the ADC. Default: Active Low. Use 'gpio' or