Help with decoding 433 mhz RF XC-0331 Wireless Ultrasonic Tank Level Meter

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

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.

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.

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.

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.

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!

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

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.

1.wav (19.5 KB)

2.wav (9.01 KB)

3.wav (8.06 KB)

4.wav (19.6 KB)

Other 3 files.

5.wav (19.7 KB)

6.wav (32.9 KB)

7.wav (21.6 KB)

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

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

Yes

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.

FT002T RF CODE.xls (23 KB)

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

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.

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

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

Hi - did you make any further progress on this ? I am trying to do the exact same thing. I actually have a Maxbotix sensor I was going to use but then started thinking about decoding the signal from a device already built for the purpose of sensing water tank levels.

Any help would be appreciated.

Hi,
I’m not sure if this thread is still alive, but I’ve figured out how to read the temperature from the data you’ve provided.

Using the last data row as an example (010111110001110010001000010000001011000010000000111001000000000001101111 - 22.5 Celsius , 0.69m water level

Reading bytes 6 and 7 gives 10000000 and 11100100, reverse these bitwise giving 00000001 and 00100111 in other words nibbles 10, 11,12 and 13 are 0000, 0001, 0010 and 0111 or in hex 0, 1, 2, 7.

Unfortunately there does seem to be an error in the datasheet spreadsheet that was attached earlier – it seems it should be Temp_L = nibble 11, Temp_M = nibble 13, and Temp_H = nibble 12. Therefore temperature is 271 hex (not 127 hex)

Finishing off, 271 hex, = 625 decimal. Subtract the 400 offset gives 225 and divide by 10 gives the temperature of 22.5 degrees.

Let me know if this thread is still alive and I’ll have a go at the depth calculation.

Definitely alive for me !

Any chance anyone could post some more bitstream data for tank depths other than 100% - I don't actually have this hardware, but trying to work backwards from the data posted.

I suspect the unit is sending back the distance between the sensor and the top of the water. The sensor wouldn't know how much water is in the tank (only the receiver knows this). Ideally, 3 or 4 sets different data - bitstream, reported depth, temperature along with the gap height and tank depth setting used in the receiver.

Anybody still interested in this topic? I've started work on it for a different reason, I've now got two natty display units and two dead sensors! The ultrasonic sensor appears to corrode after a year or two and stop working, so after fruitlessly searching for a replacement sensor, I decided to construct my own using a waterproof ultrasonic module (typically used for car reversing sensors), thermistor using a nano and a 433MHz transmitter. So far, using the data from this thread (thanks Kinotech for the decoding!) I have successfully been able to transmit any temperature I like, but I have not been able to decode the depth sensor data, such that I can have the display show the value I want.

I think the sensor is sending the tank depth in metres * 100, but I have not been able to figure out the 8 nibbles used to send this data.

Here is some data I've extracted from the thread - If i send it exactly as-is the display reports the correct values.

Common data: Tank Depth (TD):1.2m, Airgap:0.51m The sensor should be sending raw distance (D), so when the tank is full it will be sending 0.51m, when the tank is empty 1.2m The display unit shows water depth (WD), so it will be showing WD=TD-D = 0.69m when full and 0m when empty.

Data from Senor (extracted from previous posts and .wav files, this will need bitswapping etc per earlier posts)

T=21.8 WD=0.69 (D=.51) 010111110001110010001000010000001011000001010000011001000000000000001111

T=21.9 WD=0.69 (D=.51) 010111110001110010001000010000001011000011010000011001000000000010001111

T=22.5 WD=0.69 (D=.51) 010111110001110010001000010000001011000010000000111001000000000001101111

T=23.8 WD=0.46 (D=.74) 010111110001110010001000001000000101000001110000111001000000000000101111

T=23.6 WD=0.0 (D=1.2) 010111110001110010001000000100001000000000110000111001000000000010001111