Help with TX RX Temp Unit Please

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by Enamul »

Hi Stuart,
Issue is not current rating...rather the problem is with the maximum possible output of LM358 if you use 5V as it's power supply. LM358 will produce maximum little more than 4v if you use 5v as power supply which will not give you full range of adc and i am using 8-bit adc which means that you will not get linear behavior if you not at least either changes to 6V supply to LM358 or I move to 10-bit ADC.
Edit: for checking the voltage output of LM35Dz you can check input of LM358 and for checking output and gain you can check ADC input of PIC.
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by acestu »

Hi Enamul,

Forgive me if I appear thick I am not familiar with these devices,

Am I right in thinking that what you are saying is that I need to increase the input voltage of the lm358 so that it can output the correct information

If this is the case I will have to use a different power supply as mine is only 5 volts or 3.3 volts

I do have a variable bench supply ie 0 to 30 volts could i use this and if so what voltage ?

Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by Enamul »

Hi Stuart,

If you don't have any power supply which can give 6V, in that case I can move to 10-bit adc which should solve the issue and we should be able to see the desirable temp range below 1.25v. In that case your amplifier will be linear. I will change the code and post asap.
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by Enamul »

Hi Stuart,

First of all please reduce the gain of the amplifier now. Only pot is enough now..no series resistor is needed now. please make sure the output of LM358 does not exceed 1.25V for your maximum temp you need to measure. If necessary reduce the value of pot to reduce gain. Please post the input volt and output volt of LM358 and transmitted value and real temp.
Attachments
16f870_Tx_TEMP.fcf
(10 KiB) Downloaded 278 times
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by acestu »

Hi Enamul,

Is this how the circuit should look now ?
LM35DZ_Circuit.jpg
LM35DZ_Circuit.jpg (39.96 KiB) Viewed 12067 times
Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by Enamul »

Hi Stuart,
Yes, the circuit should be such. You can measure voltage at pin3 and 1 of LM358 for different temperature while making sure that voltage at pin1 is not greater than 1.25V in maximum temperature you want to measure. Please post some voltage data sothat I can have some idea..
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by acestu »

Hi enamul,

I will do that when I get home at lunch time..

Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by acestu »

Hi Enamul,

I have reprogrammed the pic16f870 with the new code and removed the resistor

I have taken these voltage readings between ground :

Real room Temp = 24 Degrees C


LM358 pin 5 positive input = .205 volts

LM358 pin 7 output = 2.13 volts


Data Received pot turned down fully = 40 4.0 Degrees C

Data Received pot turned up fully = 177 17.7 Degrees C


Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by Enamul »

Hi Stuart,
You see the voltage output in output of LM358 is higher than 1.25V it means that we will get wrong reading in 8-bit data. Can you please reduce the gain of the circuit by putting smaller value POT like 1K pot so that for maximum temp you are looking for ....the vout of LM358 is less than 1.25V.
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by acestu »

Hi Enamul,

I have changed the pot to a 1k and now the voltage on pin 7 is between

.196 to .385 volts

Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by Enamul »

Hi,

That means you can use upto 3.3 K pot easily. Please post the temp value and the value you are getting in Rx as well. We are close now. now you can check whether the Rx value varies linearly with temp or not.
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by acestu »

Hi Enamul,


Real Room Temp = 16 Degrees


Data Received with pot down = 33 3.3 Degrees C

Data Received with pot up = 66 6.6 Degrees C


Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by Enamul »

Hi Stuart,
You missed my point. I have mentioned to post couple of temp and transmitted value and voltages in adc input in my earlier post but with 3.3K pot.
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by acestu »

Hi Enamul,

I am trying to locate a 3.3k trimmer but I can only find them in Hong Kong in 100's , do you know where I might get one from please ?

thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by Enamul »

ohh..sorry if you don't anything in hand forget it we can sort with 5k. You can put a series resistor with the 1k fixed resistor so that the the pot is 5k but the fixed become 2k. Is it clear?
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by acestu »

Hi Enamul,

Is this what you mean ?:
lm358_2.jpg
lm358_2.jpg (36.69 KiB) Viewed 12023 times
Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by Enamul »

Yes, this is what I mean. It will reduce gain and pot will act like 2.7K pot
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by acestu »

Hi Enamul,

What do you want me to do now take some more voltage readings ?

Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by Enamul »

It should now work properly if you set at particular temperature and particular value of POT. At least two temp and two voltage at adc pin and transmitted value I need if I need to correct receiver program.
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by acestu »

Hi Enamul,

I have just got the unit sat on top of the radiator with a temp gauge, so as soon as it has stabilized I will post the lower and upper temp readings
with voltages and data...

Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by acestu »

Hi Enamul,

I have now taken the readings and they are as follows:


The pot was left half way for the readings

Voltage .215 Temp 17.7 Data Sent 43


Voltage .721 Temp 56.7 Data Sent 147



I hope this is what you meant


Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by Enamul »

Thanks for the information you have posted. I have modified the Rx code to adjust with temperature. There could be some difference with the actual temperature and the value shown in display but should not be too different with the new code. For more accuracy we need to move to DHT11. But I think we can finish it here and then start next step..for DHT11.
Attachments
16f877a_rx_ TEMP.fcf
(15.5 KiB) Downloaded 180 times
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by acestu »

Hi Enamul,

No Thank you for doing the new code, I will let you know how I go on...

Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by acestu »

Hi Enamul,

I have programmed chip with new code and all looks good, here is a video:

http://www.youtube.com/watch?v=WKwb85oCVto


Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with TX RX Temp Unit Please

Post by acestu »

Hi Enamul,

Would it be possible to use the DHT-11 sensor with this project in order for it to be more accurate ?

thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

Post Reply