Image of the day

Captured by
Byron Davies

M-52, NGC-7635, SH2-157, SH2-158, SH2-159, SH2-161, NGC-7510

My Account

New to Astromart?

Register an account...

Need Help?

Heater control - Arduino

Started by kapkowski, 01/20/2015 02:01PM
Posted 01/20/2015 02:01PM | Edited 01/20/2015 02:06PM Opening Post
You will need elements as you can see on the included picture

Than sketch ( software) as following:

#include
#include

dht DHT;
Timer timer;

#define DHT_PIN 2
#define PWM_PIN 3


void setup() {
timer.every(1000, updatePWM);
}

void loop() {
timer.update();


}

void updatePWM() {
int chk = DHT.read22(DHT_PIN);
if(chk == DHTLIB_OK) {
byte pwm = map(constrain(DHT.humidity, 60, 100), 60, 100, 0, 255);
analogWrite(PWM_PIN, pwm);
} else {
analogWrite(PWM_PIN, 255);
}
}

You will also need library for DHT sensor and optionally Windows operated software to monitor heaters, temperature and humidity by USB from computer.
I dont know how to publish here .zip files or .exe. so please send me your email to [email protected] and you will receive files.

Regards

Maciej

Attached Image:

kapkowski's attachment for post 59023

Location:21 19 E 52 25 N, visit www.astrofun.pl
Posted 01/20/2015 08:22PM #1
This is great! Thanks for the diagram. I'm emailing you my address. ~ Charlie

~ Charlie Stevenson

8" f/5.7 String Telescope - 1st Scope Build; 2nd Place Stellafane 2016 Optical Award for Newtonians 12.5" and Smaller
10" f/4.5 Newtonian (June 2015) mirror refigured by Optic Wave Labs P-V WaveFront 1/14.24, Strehl Ratio 0.993 (Aug '15)
Criterion RV-6 seems to be circa 1973 (June 2015) [For Sale]
Celestron C8-A XLT (January 2015) [For Sale]
Celestron PowerSeeker 70AZ (Christmas 2014)
Aldrich Astronomical Society member since 2015
http://astro.charleskelleystevenson.com/