Update:DIY wireless temperature sensor for Tellstick

Moderator: Telldus

niclasf
Posts: 163
Joined: Fri Mar 17, 2023 9:45 am
Contact:

Re: Update:DIY wireless temperature sensor for Tellstick

Post by niclasf »

esic_clone-0.9 is available for download.
niclasf
Posts: 163
Joined: Fri Mar 17, 2023 9:45 am
Contact:

Re: Update:DIY wireless temperature sensor for Tellstick

Post by niclasf »

fineoffset_clone-0.3 is available for download in the first post of this thread.
free30
Posts: 40
Joined: Fri Mar 17, 2023 9:45 am

Re: Update:DIY wireless temperature sensor for Tellstick

Post by free30 »

Ok you tempted me to have a go. Thanks. :D

I've a load of parts coming from China.
I'm hoping to build 5 temp\humidity and 5 movement sensors.

I've been looking at this thread and trying to translate parts of you other thread so sorry if you've covered my questions.
I've four questions at the moment, any help much appreciated.

1. The wiring for the DHT22 module. Is it the sensor wired to both sides of the battery and to your circuit? Like this > https://www.circuitlab.com/circuit/udxr ... to-sensor/

2. I see you get ID's for temp/humidity from the sensor and therefore they will configure themselves. With the PIR sensors I will need to edit the HEX file before programming. So I need to change the .asm file and complile? Would I need to change this line>

Code: Select all

PIR_SENSOR_ID           equ .255 ; sensorID to use if a PIR-detect event occur.
to something else like

Code: Select all

PIR_SENSOR_ID           equ .205 ; sensorID to use if a PIR-detect event occur.
and compile?

3. The 433 units I've ordered have a solder point for an aerial. Am I right in thinking it would work best with a 17cm wire attached ? (these ones http://www.ebay.co.uk/itm/300955480782?ss)

4. The movement sensor module HC-SR501 is 4.5v to 20v. I was planning to use a single 3.7v lithium battery (18650). Is one battery enough for the HC-SR501 module and if not, does your circuit take two 18650's (up to 9v) ? (This module http://www.ebay.co.uk/itm/400497435590?ss)

Thanks for any help.
I can't wait to get making. :clap:
niclasf
Posts: 163
Joined: Fri Mar 17, 2023 9:45 am
Contact:

Re: Update:DIY wireless temperature sensor for Tellstick

Post by niclasf »

free30 wrote:Ok you tempted me to have a go. Thanks. :D
Excellent :)
free30 wrote: I've a load of parts coming from China.
I'm hoping to build 5 temp\humidity and 5 movement sensors.

I've been looking at this thread and trying to translate parts of you other thread so sorry if you've covered my questions.
I've four questions at the moment, any help much appreciated.

1. The wiring for the DHT22 module. Is it the sensor wired to both sides of the battery and to your circuit? Like this > https://www.circuitlab.com/circuit/udxr ... to-sensor/
That is correct.
free30 wrote:
2. I see you get ID's for temp/humidity from the sensor and therefore they will configure themselves. With the PIR sensors I will need to edit the HEX file before programming. So I need to change the .asm file and complile? Would I need to change this line>

Code: Select all

PIR_SENSOR_ID           equ .255 ; sensorID to use if a PIR-detect event occur.
to something else like

Code: Select all

PIR_SENSOR_ID           equ .205 ; sensorID to use if a PIR-detect event occur.
and compile?
You are right. Change the above and then compile. If you send me a PM I might be able to do the change and compile for you if I have the time.
I assume you already have a Pickit 2 or 3 at hand?
free30 wrote:
3. The 433 units I've ordered have a solder point for an aerial. Am I right in thinking it would work best with a 17cm wire attached ? (these ones http://www.ebay.co.uk/itm/300955480782?ss)
I think that 16.5cm is more appropriate. However, I do not even need an antenna and I use the same transmitter as you have ordered.
free30 wrote:
4. The movement sensor module HC-SR501 is 4.5v to 20v. I was planning to use a single 3.7v lithium battery (18650). Is one battery enough for the HC-SR501 module and if not, does your circuit take two 18650's (up to 9v) ? (This module http://www.ebay.co.uk/itm/400497435590?ss)
The min/max voltage is set by the components you use. If the PIR-sensor need 4.5v to work, then that is the lowest voltage you must have. The PIC can only handle maximum 5.5v, but there is nothing that stops you from adding a LM7805 to limit the voltage to the pic. This will probably not be optimal when battery powered.
free30 wrote:
Thanks for any help.
I can't wait to get making. :clap:
free30
Posts: 40
Joined: Fri Mar 17, 2023 9:45 am

Re: Update:DIY wireless temperature sensor for Tellstick

Post by free30 »

niclasf wrote: You are right. Change the above and then compile. If you send me a PM I might be able to do the change and compile for you if I have the time.
I assume you already have a Pickit 2 or 3 at hand?
To compile a few variants would be helpful, I've already got a bit confused with the compiler.
I've got a willem programmer I was hopping would work.
niclasf wrote: The PIC can only handle maximum 5.5v, but there is nothing that stops you from adding a LM7805 to limit the voltage to the pic. This will probably not be optimal when battery powered.
I'll have a rethink and maybe use 4x1.2v instead.

Thanks for the help.

I'll let you know how I get on.
Thanks :D
niclasf
Posts: 163
Joined: Fri Mar 17, 2023 9:45 am
Contact:

Re: Update:DIY wireless temperature sensor for Tellstick

Post by niclasf »

esic_clone-0.9.1 and esic_clone-0.6.2 is available for download.
Baltta
Posts: 10
Joined: Fri Mar 17, 2023 9:45 am

Re: Update:DIY wireless temperature sensor for Tellstick

Post by Baltta »

Can anyone help me. How to connect analog input for this sensor. If my software version is 0.9. What kind of Connection I have to make.
niclasf
Posts: 163
Joined: Fri Mar 17, 2023 9:45 am
Contact:

Re: Update:DIY wireless temperature sensor for Tellstick

Post by niclasf »

Baltta wrote:I have ver 0.6 temperature sensor. And i like to measure one analog measurement. Where i connect it? I have my house electricity comsuption 0 to 25 amp transformed to 0 to 3,6 V dc. So if it works i can monitor my electricity consuption. But where i connect this 3, 6 V dc. Above there is says connect pin 7. Now there is led.
It is not as easy as I first thought.
I use the voltage drop over the LED as a reference to the Vdd, to measure the Vdd. You will need to use it the opposite way around.
You need to use pin 7 to be connected to your 0-3.3V and then free up another pin on your pic where you should connect your reference voltage. A zener diode with a 3.3V back voltage.

However, I do not really see how you will be able to measure your electricity consumption measuring this. You will only get snapshots of very momentary values. It will be very inaccurate. What you want to measure is the consumed Wh. Most people measure this by counting blinks from a LED located on most electrical meters hanging on the wall where the incoming power is. I do not have support for this in my sensor, and I will not add it since it will never be so accurate as a cabled solution will be.

My suggestion to you is, build a 1-wire network and use a 1-wire counter ds2423b like this, http://www.vigesdal.net/weather/my_stat ... ematic.pdf
There are pages on the net that will help you more. I have built the one described here, http://www.temperatur.nu/forum/hemautom ... 20loggning

Sorry that I am not able to help you more than this...
niclasf
Posts: 163
Joined: Fri Mar 17, 2023 9:45 am
Contact:

Re: Update:DIY wireless temperature sensor for Tellstick

Post by niclasf »

esic_clone-0.9.2 and fineoffset_clone-0.4 are available for download.
niclasf
Posts: 163
Joined: Fri Mar 17, 2023 9:45 am
Contact:

Re: Update:DIY wireless temperature sensor for Tellstick

Post by niclasf »

esic_clone-0.9.3 and fineoffset_clone-0.5 are available for download.
free30
Posts: 40
Joined: Fri Mar 17, 2023 9:45 am

Re: Update:DIY wireless temperature sensor for Tellstick

Post by free30 »

I'm still waiting for parts from China; might have to re-order :banghead:

Was thinking this project would be great if you added an LCD display. Other projects are that without the wireless part. I wonder how easy they would be to combine. Be nice to have it so you could switch on the display if you wanted.
Project like this seem do-able > http://embedded-lab.com/blog/?p=6582

My other thought was whether we could do a wireless Barometer using BMP085. I don't think there's a commercial one to copy as barometer's are normally in any weather stations base unit. Guess we could send as temperature at first, than try and get Teldus to implement it or find another software solution to interpreting the results.

Any how still waiting on the basic parts. I'm sure my Willem will program the chip. If anybody wants to try this project and doesn't want to buy a programmer, PM and you can send the chip to me, to do for you. (I'm UK based)

:wave:
niclasf
Posts: 163
Joined: Fri Mar 17, 2023 9:45 am
Contact:

Re: Update:DIY wireless temperature sensor for Tellstick

Post by niclasf »

free30 wrote:I'm still waiting for parts from China; might have to re-order :banghead:
It could be as much as 6-7 weeks before your items arrive. That is at least my worst case scenario. I have ordered almost 80 different items from ebay. Mainly from China, and none of the items have got lost in the mail. Be patient 8)
free30 wrote:Was thinking this project would be great if you added an LCD display. Other projects are that without the wireless part. I wonder how easy they would be to combine. Be nice to have it so you could switch on the display if you wanted.
Project like this seem do-able > http://embedded-lab.com/blog/?p=6582
Sorry, but I will probably not implement this. My focus is to create a wireless sensor that can be interpreted by Tellstick DUO/NET and RFXtrx433. I also focus on features that I see a need for myself. You are very welcome to add this if you like.
Note that this will also need a PIC-chip upgrade.
free30 wrote:My other thought was whether we could do a wireless Barometer using BMP085. I don't think there's a commercial one to copy as barometer's are normally in any weather stations base unit. Guess we could send as temperature at first, than try and get Teldus to implement it or find another software solution to interpreting the results.
I agree that this would be nice, but then I need to implement the I2C-bus protocol as well. There must also be a couple of spare pins available on the PIC, and today it is not. As my comment above, this would need an upgrade of PIC-chip to be doable. Not in my plans today likely not later. I do have a BMP085 sensor but I planned to connect that to my hacked WR703N.
free30 wrote:Any how still waiting on the basic parts. I'm sure my Willem will program the chip. If anybody wants to try this project and doesn't want to buy a programmer, PM and you can send the chip to me, to do for you. (I'm UK based)

:wave:
Don't hesitate to ask any questions if you bump into problems when your items arrive :wave:
free30
Posts: 40
Joined: Fri Mar 17, 2023 9:45 am

Re: Update:DIY wireless temperature sensor for Tellstick

Post by free30 »

:D Part success :D

Most of the bit arrived and I've put a few together.
The odd one did not work at all.

That said I've four working. The only problem is two are reporting as the same sensor. Both are DHT22 so I tried changing the sensor over with the one I could not get working and it still reports as the same sensor ID.
Does it take the ID from the sensor only once or have I been unlucky and got three sensors with the same ID ?

Anyhow I've soldered the chips straight to the boards and it's not easy to take apart again.
I might order some more sensors if you think that's the issues.

Anyhow thanks for sharing, its kept me occupied for a far while and I learnt loads. :lol:
Thanks :clap:
niclasf
Posts: 163
Joined: Fri Mar 17, 2023 9:45 am
Contact:

Re: Update:DIY wireless temperature sensor for Tellstick

Post by niclasf »

I am glad you like it :)

It is the OSCCAL value for the PIC that is used as sensorID in the DHT22 case. The OSCCAL value is unique for each PIC as it is used to adjust the internal oscillator drift. Around line 257 there is a line that is commented out where you could hardcode the sensorID of your choice. In your case you have two options, 1. Change PIC and hope that it has a different OSCCAL value than all the others 2. Uncomment the line around 257 and hardcode the DHT22 value as described above to an ID of your choice.

I suggest option 2. You will need to reprogram the PIC in either case. As you now understand, there is nothing wrong with your DHT and there would make no difference at all to change it. It is all in the PIC-chip. I hope you used a DIL-socket so that you easily can remove the PIC for re-programming.

A completely different thing. Make sure the PIR-pin is grounded to actual GND if not used. Else you might get sporadic data packets sent. You preferably connect it immediately to the negative power supply.
free30
Posts: 40
Joined: Fri Mar 17, 2023 9:45 am

Re: Update:DIY wireless temperature sensor for Tellstick

Post by free30 »

niclasf wrote:I am glad you like it :)
I hope you used a DIL-socket so that you easily can remove the PIC for re-programming.

A completely different thing. Make sure the PIR-pin is grounded to actual GND if not used. Else you might get sporadic data packets sent. You preferably connect it immediately to the negative power supply.
Yes forgot to ground the PIR pin and had that problem, before I remembered you mentioning it.

No sadly I did not use a DIL-socket..... but like I say learnt loads :D
Post Reply