AdSense

Sunday 11 September 2016

Read DHT11 sensor with Arduino

(Deutsche Version) Some time ago, I bought a temperature and humidity sensor which is called DHT11. The sensor is easy to use and can be used with 3.3V or 5V. The sensor has four pins, for the normal operation, only three of them are needed.
The left pin (as you can see in the image) is connected to 5V, the pin on the right with GND. The left pin of the middle pins is the signal pin which can be connected with a random digital pin on the arduino (in my example, this is pin 2). Additionally, a 10k resistor is needed between the data pin and 5V.

Next, you need the corresponding library which you can download here: Download. In the arduino software the sensor can be read as it is shown in the following example. The source code should be self-explainatory. If a sensor with a higher precision is needed, you can use a DHT22, therefore you just have to adjust the DHTTYPE definition.

#include "DHT.h"
#define DHTPIN 2

#define DHTTYPE DHT11

DHT dht(DHTPIN, DHTTYPE);

void setup() {
  Serial.begin(9600);

  dht.begin();
}

void loop() {
  float h = dht.readHumidity();
  float t = dht.readTemperature();
  
  Serial.print("Humidity: ");
  Serial.print(h);
  Serial.print(" %\t");
  Serial.print("Temperature: ");
  Serial.print(t);
  Serial.println(" *C ");

  delay(2000);
}

Sunday 17 July 2016

3D printing profiles for the Ultimaker 2

(Deutsche Version) After a long time with no updates I want to introduce a new topic to this blog: 3D printing. I own an Ultimaker 2 and in this first post, I want to present the printing profiles I use. I only use black PLA from Innofill. This means that I do not have to fine tune the printing profiles if I buy new material because the properties of the material stay the same.

Ultimaker 2:
At the printer, I only set some small values. I have three profiles: Fast, Fine and Ultrafine. For all three of them I use a Heatbed Temperature of 70 °C. This get the PLA to stick to the platform. The Nozzle Temperatures are 210 °C for Fast, 195 °C for Fine and 172 °C for Ultrafine. This last temperature is really close to the melting point, this means that if the temperature in your house changes (summer / winter) you have to adjust this temperature, in the winter I usually have 175 °.


Printing profiles for Cura:
Usually, PLA does not need any cooling by the fans. If you activate this cooling, the print will warp upwards. Therefore the profiles Fast and Fine have a Minimum Fan Speed of 10%, whereas Ultrafine has 60%. This means that small structures are cooled quite good and the print does not melt during the printing process as the nozzle always stays at nearly the same position.
The Layer Height is 0.1 mm for Fast and 0.05 mm for Fine and Ultrafine. The Shell Thickness is 0.8 mm.
The printing speed is set to 25-40 for Fast, 20-25 for Fine and 10-25 for Ultrafine.

If anyone is interested in the profile files, you can download them here:
Fast
Fine
Ultrafine