Go Down

Topic: Help with decoding 433 mhz RF XC-0331 Wireless Ultrasonic Tank Level Meter (Read 4177 times) previous topic - next topic

tejkoklemen

Hello,

Sorry for my bad english, I have XC-0331 Wireless Ultrasonic Tank Level Meter which measure temperature and water level for tank. I want to decode the RF433 signal from the device.

I read a few signal ( example in attachment )  and decode them (long signal as 1 and short signal as 0).  For start I just want to read temperature without water level.

010111110001110010001000010000000111000000010000011001000000000010001111 - 21.6 Celsius , 0.69m water level
010111110001110010001000010000001011000001010000011001000000000000001111 - 21.8 Celsius , 0.69m water level
010111110001110010001000010000001011000011010000011001000000000010001111      - 21.9 Celsius , 0.69m water level
010111110001110010001000010000001011000000110000011001000000000001101111    - 22.0 Celsius , 0.69m water level
010111110001110010001000010000001011000010000000111001000000000001101111    - 22.5 Celsius , 0.69m water level

I look on the PCB of device and the temperatrue sensor is NTC HT series. If I read value with arduino when temperature is 21 Celsius, the value is 473 .

Please help me if anyone see how can I read temperature.

Thank you in advance.

Best regards,
Matej Klemen


Jesterbaze

I think that sensor is a thermistor, not positive though. If it is, this would be an awesome place to start!

http://www.hacktronics.com/Tutorials/arduino-thermistor-tutorial.html

Datasheet on NTC-HC http://www.semitec-usa.com/downloads/htthermistor.pdf

Looks like that value is the resistance for the temperature, or could be if the board has a 503HT thermistor.


Jesterbaze


Hello,

Sorry for my bad english, I have XC-0331 Wireless Ultrasonic Tank Level Meter which measure temperature and water level for tank. I want to decode the RF433 signal from the device.

I read a few signal ( example in attachment )  and decode them (long signal as 1 and short signal as 0).  For start I just want to read temperature without water level.

0101 1111 0001 1100 1000 1000 0100 0000 0111 0000 0001 0000 0110 0100 0000 0000 1000 1111 - 21.6 Celsius , 0.69m water level

0101 1111 0001 1100 1000 1000 0100 0000 1011 0000 1101 0000 0110 0100 0000 0000 1000 1111      - 21.9 Celsius , 0.69m water level

I look on the PCB of device and the temperatrue sensor is NTC HT series. If I read value with arduino when temperature is 21 Celsius, the value is 473 .

Please help me if anyone see how can I read temperature.

Thank you in advance.

Best regards,
Matej Klemen



Just noticed what is the same and what is different, your data must be in there some way or another...? Not sure though

Also, it looks like the meter does some math to figure out the depth. The signal may be transmitting just a certain part of the equation or something. https://www.jaycar.com/products_uploaded/XC0331_Programming_Guide.pdf
IE: Your tank is 10m deep, you have a 0.5m air gap, and it's sensing that the ultrasonic sensor is say, 4m from the water surface. It may just be transmitting the 4m (distance) it's reading, or it could be 4m+0.3m (air gap + distance), or it could be sending 10m-4m-0.5m etc... But anyways I hope this gets you off on the right path with your project. Sorry I couldn't help much.

tejkoklemen

Thank you for your answer. For now I just want to decode temperature and then I will try decode meters. I tried get raw data from sensor and this is what I get:

Temperature is: 21.82 C / 71.28 F Raw: 476
Temperature is: 21.82 C / 71.28 F Raw: 475

Yes I noticed that bits are changing. But I tried convert from binary to dec but never get reasonably value. I think that I make some mistake with converting.

Thank you for your help.

Jesterbaze

Sorry for the sloppy reply but here I go:

Simply put, the temperature should be read as a value of resistance, so it's going to be a hard number to find. It might be that 473 or whatever that raw value is, is your resistance in Ohms. Then you have to put that number through some long equations, convert Ohms to Kelvin, then Kelvin to Fahrenheit or Celsius.

The distance should be the easy variable to find. Usually distance sensors don't output anything complex. However like you said earlier, I was trying to decode the binary also, and I didn't see anything useful when I get the dec values from each 4bit block. I also tried 8bit blocks, 16bit blocks, nothing looked like it made sense. I can see there is a header byte, and a footer byte, but everything in-between doesn't make any sense. Do you happen to know what the Make / Model is of that sensor is that is reading the distance? There might be some information online about how to decode that specific sensor??

Best of luck to you keep me updated! I'm really confused about this, and would love to know more!

iambenq

Can you upload the .wav file? So we can also check the decoding.  :)

tejkoklemen

Ok lets decode the distance then.

Setiings that I put in display:
Tank depth: 1.2m
Tank Gap: 0.51m
So for 100% value is 0.69m, for  50% is 0,345. In wav files you will see that measured distance was 0.46m so display show me 60%.

I upload 7 wav files ( 4 are in this post , 3 are in next post ).

1 wav file: Temperature: 23.8, Distance: 0.46m, Percent: 60%

2 wav file: Temperature: 23.7, Distance: 0.69m, Percent: 100%
3 wav file: Temperature: 23.7, Distance: 0.69m, Percent: 100%

4 wav file: Temperature: 23.6, Distance: 0.46m, Percent: 60%

5 wav file: Temperature: 23.6, Distance: 0.69m, Percent: 100%

6 wav file: Temperature: 23.6, Distance: 0.0m, Percent: 0%
7 wav file: Temperature: 23.6, Distance: 0.0m, Percent: 0%

There are no specification for distance sensor. It look like this
https://www.google.si/search?q=arduino+ultrasonic+distance+sensor&es_sm=122&tbm=isch&tbo=u&source=univ&sa=X&ei=YEp8U9ioCuyZ0QXtpYHwCA&ved=0CDcQsAQ&biw=1280&bih=856#facrc=_&imgdii=_&imgrc=IPCdQKhVhM2QKM%253A%3Bn77wpoHFnvlxJM%3Bhttp%253A%252F%252Fwww.tautvidas.com%252Fblog%252Fimages%252Fposts%252Fsensor_pins.jpg%3Bhttp%253A%252F%252Fwww.tautvidas.com%252Fblog%252F2012%252F08%252Fdistance-sensing-with-ultrasonic-sensor-and-arduino%252F%3B300%3B300
but have only one not two sensors.

Thank you both for your reply.

tejkoklemen

Other 3 files.

iambenq


Hello,

Sorry for my bad english, I have XC-0331 Wireless Ultrasonic Tank Level Meter which measure temperature and water level for tank. I want to decode the RF433 signal from the device.

I read a few signal ( example in attachment )  and decode them (long signal as 1 and short signal as 0).  For start I just want to read temperature without water level.

010111110001110010001000010000000111000000010000011001000000000010001111 - 21.6 Celsius , 0.69m water level
010111110001110010001000010000001011000001010000011001000000000000001111 - 21.8 Celsius , 0.69m water level
010111110001110010001000010000001011000011010000011001000000000010001111      - 21.9 Celsius , 0.69m water level
010111110001110010001000010000001011000000110000011001000000000001101111    - 22.0 Celsius , 0.69m water level
010111110001110010001000010000001011000010000000111001000000000001101111    - 22.5 Celsius , 0.69m water level

I look on the PCB of device and the temperatrue sensor is NTC HT series. If I read value with arduino when temperature is 21 Celsius, the value is 473 .

Please help me if anyone see how can I read temperature.

Thank you in advance.

Best regards,
Matej Klemen




All of the data(0.69m) are 100% ?


aburow

Hi, I am a n00b on the 433MHz RF integration for the Arduino and this one has been causing me a little grief.  The best recordings I got for decoding was using HDSDR/rtl-sdr audio captures and other methods proved relatively fruitless.

I traced back the device (read as searched: alibaba and made-in-china) to a manufacturer in China - UC Technology Ltd - model FT0021 and also quoted the Jaycar XC-0331 to them as a possible rebadge - they neither confirmed nor denied.

I sent their contact an email requesting assistance in supplying line-coding and data structures for hobby use.  They forwarded the attached document.  I can confirm that the decodes are pretty close (for the XC-0331).  I haven't tried to confirm the data via CRC but the readings only seem to differ due to bit errors.

I hope you find the information useful and that you can share what you discover.

I'm keen to help where I can.

tejkoklemen

Hello,

Thank you for this, but I cannot decode signal. I don't know what I am doing wrong. Does anyone have any idea?

Best regards,
Matej Klemen

aburow

I can decode your recordings by hand so I'm assuming you have the same issue as myself which is programming the gating in RF.

When I get time to sit down and play again I was going to look into borrowing some of the code from the bottom of rc-switch.cpp.  The idea being to match the gating (0/1 high/low timing) to that in the xls I uploaded... look for the sync bits (10101111) and capture x number of bits after that for the fully payload.

There's also code in practical arduino for the weather station that is quite descriptive which uses a different method to that used by rc-switch.  If you are using the Freetronics 433MHz shield with rc-switch you need to cut data pin 8 and reroute it to pin 2 on most boards as pin 8 is not tied to an interrupt.

Malster

Hi All,
   I have the raw data format and am about to start work on it, but I have not done this kind of decode before, so if someone has started already it would be a great help.  

Has anyone had any luck writing a routine to decode this data stream yet?  


Logic 0 = 480uS High, 480-uS Low
Logic 1 = 480uS High, 1000uS Low

Bits are set MSB first,  full sentence is 17 nibbles.

Nibble      Function
0 & 1        Sync           [  1010   1111 ]
2 & 3       Serial#            
4 & 5       DeviceID   [ 0001  0001] ??
6 & 9      Depth HH,HL, LH,LL  (Value in hex *100 Fill with 5DC on invalid, range 0-15M)
10            Transmit Interval ( Bit 7=0 180S,   Bit 7 =1  30S,  bit 4-6=1 5S)
11&12 &13   Temp H, M, L (in hex *10, Max 1000, with 400 offset) If invalid read, filled with 3E8
14&15     Rain H, L (Value 0-256) I assume not used in XC-0331
16&17    CRC (includes nibbles 2-15 only)


Cheers,

Malster





jandkw99

Hi,

Any luck in completing this work? I'm looking at using this sensor with a Jeelink USB 433Mhz receiver and would like to know if this has progressed to save me 'reinventing the wheel'.

thanks,

Jason

Go Up