Posted on

Simple Arduino Temperature, Moisture and Light Monitor

Simple Arduino Temperature, Moisture and Light Monitor

Recently I planted some succulent seeds indoors, and had to put them in a miniature greenhouse so that they could sprout. I wanted a way to keep an eye on the temperature, moisture and ambient light in the greenhouse, so I whipped this up. It outputs realtime measurements to an LCD. If you’ve seen my ProGrow project, this is a simplified version without any data storage or relays.

Parts

I used an old scrap 3D print for the frame; it’s just a block of plastic that I screwed everything to. The electronic parts used are:

A quick overview of each component and why I’m using it:

  • Arduino Nano
    • Extremely low cost (<$3)
    • Ready to go ATMega328p board with voltage regulators and USB
    • Lots of expansion opportunities
  • Arduino Expansion Board
    • Makes life easier for prototyping/wiring with the Nano
  • FC-113 + 16×2 LCD
    • Cheap and easy to use LCD combo
    • Only requires two analog pins for communication
  • Photoresistor module
    • Works just like a photoresistor with an analog signal, but it also has a digital output
    • Has an indicator LED and potentiometer for the digital output
  • DHT11 Temperature/Humidity Module
    • Cheap, easy to use and fairly accurate.
    • DHT22 is a better version, but is more expensive

Connecting everything to the Arduino

Schematic for Temp/Humidity/Light Sensor
Schematic for Temp/Humidity/Light Sensor

The DHT11 module has 4 pins, but only three are used:

  •  Vcc to +5V
  • Signal to Digital Pin 5
  • Gnd to Gnd

The photoresistor module I am using also has 4 pins, and only three are used. The analog output of the module is used over the digital output. You can get the same functionality with just a resistor and a photoresistor.

  • Vcc to +5V
  • Aout to Analog pin 1
  • Gnd to Gnd

The LCD module is connected to the FC 113. The FC 113 is connected in the following manner:

  • Vcc to +5V
  • SCL to Analog pin 5
  • SDA to Analog pin 4
  • Gnd to Gnd

 

The arduino nano can be powered through USB with 5V, or through the Vin pin with 7V-12V.

 

Programming

Programming the Arduino for this is pretty straightforward. All the Arduino has to do is take a measurement from the DHT11 and photoresistor, and then output them to the display. There are libraries available for the DHT sensor, and the FC 113 module, so the whole process is straightforward.

 

Before starting

You need two libraries to make things easier, one for the DHT11 and one for the FC 113.

You can download the DHT library I used at:

https://github.com/RobTillaart/Arduino/tree/master/libraries/DHTlib

 

You can download the FC 113 library I used at:

https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library

 

How to install libraries:

https://www.arduino.cc/en/Guide/Libraries

 

Before Setup

//Temp/Humidity/Light Monitor V0.1
#include <LiquidCrystal_I2C.h> //Import LcrystalI2C for FC 113 + LCD module
#include <dht.h> //Import DHT for DHT11 temperature/humidity sensor
int tempSensor = 5; //Digital pin 5 for temperature sensor
int lightSensor = A1; //Analog pin 1 for light sensor
dht DHT; //Sets up dht11 as DHT

First I include the required libraries.
Then, I establish pin 5 for the temperature sensor and analog pin 1 for the light sensor.
Finally, I set up an object called DHT to handle data from the DHT11 sensor.

Setup

void setup(){
Serial.begin(9600); //Establishes serial at 9600
lcd.init(); //Initialize the lcd
lcd.backlight(); //Initialize LCD backlight
lcd.clear(); //Clear LCD
Serial.print(analogRead(lightSensor)); //Print currently photoresistor value to serial; for troubleshooting purposes
}

The setup just consists of initializing the LCD module, and printing a simple message to the serial monitor as an optional self-check.

Loop

void loop(){
DHT.read11(tempSensor); //Reads information from tempSensor(pin 5), stores in DHT
lcd.setCursor(0,0); //Sets cursor of LCD to very first position
lcd.print("H: "); //Prints H: , for humidity
lcd.print(DHT.humidity); //Outputs humidity
lcd.setCursor(0,1); //Sets cursor of LCD to first position, second line
lcd.print("T: "); //Prints T: , for temperature
lcd.print(DHT.temperature); //Outputs temperature
lcd.print(" C"); //Prints C for celcius
delay(4000); //Delays for approximately 4 seconds
lcd.clear(); //Clears the LCD
lcd.setCursor(0,0); //Resets cursor to first position
lcd.print("Lux: "); //Prints Lux, for light level
lcd.print(analogRead(lightSensor)); //Outputs lux value
delay(4000); //Delays for 4 seconds before looping
}

The loop starts by reading the DHT11 sensor, and storing the values in the DHT object. Then, it outputs the information to the LCD. It delays for a few seconds, and then it reads the light sensor. It continues in a loop like this, reading and then outputting.

Posted on

Designing and 3D Printing a Multi-Color Business Card

3D Printed Business Card
3D Printed Business Card
3D Printed Business Card

 

Earlier today I was experimenting with multiple shades/colors and materials using my Prusa i3 Mk2s. I have some black PETG from Fused Filaments, and some natural NextPage PLA. I wanted to see if I could combine them, so I tried to make a minimalistic business card.

 

Designing The Card

I used 3DS Max to design this card. Virtually every 3D modeling software has tools that let you follow the basic steps that I outline here. I tried to keep it as simple as possible. The basic design idea is split into two parts –

  • solid background in one color or material
  • raised features like text/border/design in another color or material

This slideshow requires JavaScript.

Base:

I made the base of the card by creating a 90mmX50mmX0.4mm rectangle. I chamfered the edges so that it would be more comfortable to hold.

Text:

I made a text spline and then extruded it to be 0.4mm thick. Then I positioned it on top of the base.

I find that Arial Round MT Bold is a great font to use for 3D printing, because it has nice corners and good legibility.

Border:

I made an outline of the edge of the card, and positioned it on top of the base like I did with the text. It is 0.4mm thick, like the text.

3D Printed Business Card
3D Printed Business Card

Printing

I sliced the model using the latest version of Prusa3D Slic3r. I used the following settings on my Prusa i3 Mk2S:

  • 100 micron layers (0.4mm standard Optimal setting)
  • 215C 1st layer
  • 205C PLA layers ( 2nd to 4th layer )
  • 240C PETG layers  ( 5th to 8th layer )

I uploaded the model to the Slic3r ColorPrint webpage and used their tool to modify the G-Code. I simply set it to request a color change after completing the background. When I inserted the PETG, I had to make sure to adjust the temperature to 240C using the tune option on the LCD panel.

 

Design Thoughts

I thought that it would be best to use my natural PLA for the background, and the PETG for text to get a sharp contrast. The opposite would work well, but I thought that the transparency of the natural PLA would be nice as a background. The PETG also requires a printing temperature of ~240C, so it has no problem adhering to a PLA surface. Printing PLA onto PETG might have adhesion problems, because of the lower printing temperature of PLA.

There was minor stringing with the PETG because I was using my standard PLA settings, and only changed the temperature during the color change. It still turned out quite nice considering how little effort I put into it. I started by printing one card, and then I printed six cards at once. Both batches turned out nice.

Stringing on PETG lettering
Stringing on PETG lettering

The cards are pretty flexible but still firm with a 0.4mm base and 0.4mm border. The text gives a really nice tactile feedback when you run your fingers across it. I’m going to try printing them with a base thickness of 0.6mm instead of 0.4mm. The 90mmX50mm size profile is standard, but you could go any direction with the shape or size or design. There’s so many options.

The PETG lettering stuck firmly to the PLA. I twisted, bent and crushed one of the cards and it didn’t break or lose letters. I had to use a knife to peel the letters off, and they were pretty stubborn. The borders didn’t stick as well as the letters, though. I was able to peel the border off of two cards with my fingernails. Perhaps it was too thin.

Crushed Business Card
Crushed Business Card

I am going to experiment with further modifying G-Code, so that I don’t have to manually adjust the temperature after a material switch. Maybe I should pick up some black PLA so I that I don’t have to fuss with temperatures.

 

Posted on

Designing & 3D Printing A Star Vase With 3DS Max

Star Vase printed with transparent purple AMZ3D PLA

I’m going to describe the basic process I go through to design and then 3D print a vase using 3DS Max. The basic techniques can be applied to many different modeling programs.

 

Step 1:

Navigate to the splines section and select the Star tool.

Step 1

Step 2:

Place a star spline with your desired dimensions and number of points. The filet option can be used to smooth the edges.

Step 2

 

Step 3:

Select the star. Select Extrude from the Modifier List. Enter the desired height. Use 1 vertical segment for this example, with the rest of the settings at default.

 

Step 3

Step 4:

Select the star. Right click, and select Convert To: Editable Poly

Step 4

 

Step 5:

Select the top face of the object, and twist it.

Step 5

 

Step 6:

With the top face still selected, shrink it to your desired size to create a taper.

Step 6

 

Step 7:

Export the model as an STL from 3DS Max, and import it into your slicing program. I use Slic3r and repetier host.

To use vase mode, you have to have:

  • 1 External Perimeter
  • 0 Top Layers
  • Spiral vase mode enabled (obviously)

I find that using 3 bottom layers is fine, but you can use more to make it less tippy.

Step 7

Step 8:

Once the model is sliced, print it using your printer and desired settings. I printed this one using transparent purple PLA from AMZ3D. It came out alright; I should have printed a bit slower.

Star Vase printed with transparent purple AMZ3D PLA
Star Vase printed with transparent purple AMZ3D PLA

 

You can download the model on Thingiverse:

http://www.thingiverse.com/thing:2105789

 

Thanks for reading! I hope you learned something. Have a great day.

Posted on

Designing and 3D Printing an Integrated Circuit Holder

3D Printed Integrated Circuit Holder

3D Printing / 3D Printed Integrated Circuit Holder

3D Printed Integrated Circuit HolderI spend way too much time on Aliexpress in the middle of the night. As a result, I’ve amassed a huge collection of assorted ICs. Who can resist a pack of 20 ICs for $1 with free shipping? Not me, that’s who. I enjoy making models and I have a 3D printer, so took a crack at solving the problem by designing and 3D printing my own IC organizer.

 

I designed it so that each compartment would hold a single 8-pin IC, and to use as little plastic as possible. Compartments can be added or removed to hold as many ICs as needed, and can be positioned into whatever configuration is desired.

 

I started by creating a basic design, which was just a box that was slightly larger than a standard 8-pin IC. More boxes were used to create the rough profile of an IC. Then I subtracted the IC profile from the original box using the Advanced Boolean tool. I added a notch  to each side of the holder to make it easier to add or remove ICs. Then I copy and pasted the individual holder until I had as many as I desired.

 

Printing involved exporting the model as an STL through 3DS Max. I imported it into Repetier Host, sliced the model using Slic3r and then I printed it on my Kossel Delta.

 

Here’s a video of the entire process, from initial design to 3D printing to being used.

 

I used the following printer settings:

  • 0.4mm nozzle width
  • 0.3mm layer height
  • 200C nozzle temperature
  • 103% extrusion multiplier
    • Better bonding and surface finish at 103%, but reduced dimensional accuracy
  • 120mm/s internal speed, 90mm/s surface speed
  • 25% speed first layer

 

Download the 3DS Max and STL files:

http://www.thingiverse.com/thing:2007972

 

Leave a comment: