Page 3 of 5

Re: MIAC based temperature controller

Posted: Tue Dec 04, 2012 4:55 pm
by Enamul
For the relay output in the miac,that is Q1,Q2,Q3,Q4....regarding the fan, it is a normal home fan,which is rated at 220V and 50Hz
I am referring here MIAC datasheet...
rekay.PNG
(48.34 KiB) Downloaded 9195 times
This is saying you can switch up to 8A at 250Vac. Can you please check the FAN maximum current? I know that is much less than 8A that could be maximum 1A may be even less than that. But it worth checking. If it is less than 1 A, you can easily switch FAN using MIAC relay.

Re: MIAC based temperature controller

Posted: Tue Dec 04, 2012 6:02 pm
by DylanBalloo
I can't find about the fan's current....How can I check the current of the fan??

Regarding the LM35Dz.....How can I connect it to the miac...the output voltage is in mV...and is too low for the miac..can you tell me how to proceed with it please...
thank you

Re: MIAC based temperature controller

Posted: Tue Dec 04, 2012 6:24 pm
by DylanBalloo
You know for the fan I wanted to connect the supply voltage from the socket to the output relay and from the outpout relay to the MIAC..that is connect the live from a socket to the relay and from the relay to the fan?? can this be done??

Re: MIAC based temperature controller

Posted: Tue Dec 04, 2012 8:25 pm
by Enamul
I can't find about the fan's current....How can I check the current of the fan??
I think it should be fine. You should be OK in driving FAN using MIAC Relay.
You know for the fan I wanted to connect the supply voltage from the socket to the output relay and from the output relay to the MIAC..that is connect the live from a socket to the relay and from the relay to the fan?? can this be done??
Here is a diagram for how to connect FAN with AC socket and MIAC without regulator if it is celling FAN and also true for table FAN.

Edit: Considering IEE standard and info from Stuart, I have changed the L and N opposite way. Now L will always be present in MIAC relay input.

Re: MIAC based temperature controller

Posted: Tue Dec 04, 2012 8:28 pm
by Enamul
Regarding the LM35Dz.....How can I connect it to the miac...the output voltage is in mV...and is too low for the miac..can you tell me how to proceed with it please...
Yes you are right it can't be used directly. Miac's datasheet says for 0 to 12V analog input ADC value varies from 0 to 240. I think you can simply use a non-inverting amplifier with the gain of 10 to drive MIAC adc input for LM35Dz.

Re: MIAC based temperature controller

Posted: Wed Dec 05, 2012 7:33 am
by DylanBalloo
Great I was thinking to connect the fan like that...

regarding the LM35Dz how can I know which temperature is giving what voltage..and what adc value I should put??

Re: MIAC based temperature controller

Posted: Wed Dec 05, 2012 9:07 am
by Enamul
regarding the LM35Dz how can I know which temperature is giving what voltage..and what adc value I should put??
From LM35Dz data sheet we know it has linear scale factor which is as follows
Linear + 10.0 mV/°C scale factor
That means every 10 mV change in output caused by 1 deg temp rise. If we amplify the output by 10, in that case it will be every 100mV causes the change in temp.

Re: MIAC based temperature controller

Posted: Wed Dec 05, 2012 10:49 am
by LeighM
Thanks for all your input on this Enamul.
I would just like to repeat what you said earlier about taking extreme care with Mains connections.
Ensure the wiring up is done with the power removed and that it is suitably insulated against accidental contact.
Also note that if you switch the Neutral side, the wire from the Fan will be Live at all times (apart from when the fan is on).

Re: MIAC based temperature controller

Posted: Wed Dec 05, 2012 10:52 am
by Enamul
Yes..that's absolutely right. I did neutral switching intentionally to avoid dealing with L in MIAC. Although anything could be dangerous if not remain careful.

Re: MIAC based temperature controller

Posted: Wed Dec 05, 2012 5:05 pm
by DylanBalloo
Yes I'll be very careful while dealing with the high voltage.,..Thanks everyone...

Re: MIAC based temperature controller

Posted: Wed Dec 05, 2012 5:06 pm
by DylanBalloo
Enamul dont you have a sample program where you use the LM35Dz

Re: MIAC based temperature controller

Posted: Wed Dec 05, 2012 5:56 pm
by Enamul
Yes, I have. I will post for you

Re: MIAC based temperature controller

Posted: Wed Dec 05, 2012 6:23 pm
by DylanBalloo
Ok thank you Enamul

Re: MIAC based temperature controller

Posted: Thu Dec 06, 2012 6:46 pm
by DylanBalloo
Hello Enamul can you please check this program,For adc value not between 50<Temp<100 relay relay 2 should be on...but relay 1 is remaining on

Thank you Enamul

Re: MIAC based temperature controller

Posted: Thu Dec 06, 2012 11:08 pm
by Enamul
can you please check this program,For adc value not between 50<Temp<100 relay relay 2 should be on...but relay 1 is remaining on
In the code you didn't use adc rather you have used digital input. Do you want me to correct it to analog?

Re: MIAC based temperature controller

Posted: Thu Dec 06, 2012 11:52 pm
by Enamul
Here is a simple code for LM35Dz..You might need to tweak little to get here right temp.

Re: MIAC based temperature controller

Posted: Fri Dec 07, 2012 6:19 am
by DylanBalloo
Thanks for the programm..
Yes please do correct it for me please

Re: MIAC based temperature controller

Posted: Fri Dec 07, 2012 6:21 am
by DylanBalloo
Ya think the callibration of the adc value is not right..I'll try to play with it and get it right..thanks again.

Re: MIAC based temperature controller

Posted: Fri Dec 07, 2012 9:31 am
by Enamul
Here is the corrected PIR code...

Re: MIAC based temperature controller

Posted: Sat Dec 08, 2012 7:31 am
by DylanBalloo
Thank you Enamul

Re: MIAC based temperature controller

Posted: Sun Dec 09, 2012 7:39 pm
by DylanBalloo
Hello Enamul,
I have a small request to make..
Do you have a program to set time and display it??
I'm trying to look at the program underfloor heating but cant understand it properly..
Can you please post a program where there is only time only or please modify this program to get only the time display..i'm trying to do it but in vain...;( is it necessary to have a module having RTC in it to run the program of time????
Thank you Enamul for your precious help.....

Re: MIAC based temperature controller

Posted: Sun Dec 09, 2012 10:09 pm
by Enamul
Hello
I believe if you need accurate time and date in the temp controller you should use RTC module not just TMR based timing which is used in the code you attached. If you decide to use just TMR based timing I can post TMR0 based clock; but if you want to interface RTC module I can give you the link of forum where I have shown how to interface RTC module with MIAC.
Please let me know which one you want.

Re: MIAC based temperature controller

Posted: Mon Dec 10, 2012 6:51 am
by DylanBalloo
I dont have the RTC module, dont think I will get it,is RTC found in the GSM module??
Can you please post the TMR0 based clock, and I'll have a look at the RTC wec site in case I get an RTC module..
Thank you loads

Re: MIAC based temperature controller

Posted: Mon Dec 10, 2012 7:42 am
by Enamul
RTC modules are very cheap may be 10$ in USA. You can buy of your own as that will maintain real time but TMR0 will not maintain real time.

Re: MIAC based temperature controller

Posted: Mon Dec 10, 2012 12:43 pm
by Enamul
Hi
You can get something seems made for you by Martin...Clock using MIAC
http://www.matrixmultimedia.com/mmforum ... 119#p43119