Pull up or pull down resistor?

Hello

I have a TX20 anemometer and I have programmed my Arduino to read data from it with the help of this blog: La Crosse TX20 Anemometer Communication Protocol – john.geek.nz
Arduino does read and decode the messages just fine, however, one problem arises often.

According to the common sense and the protocol, I should use a pull down resistor with the anemometer. That's because the TX20 pulls data line high at the beginning of the data transmission (it sends an array of 11011 bits). But that just doesn't work, the anemometer data line is quiet and no data is read by Arduino. The same thing happens, when there's no resistors at all.

I also tried to hook up data transmission line to the LTC1050 op amp's positive input and use it as a buffer. Same result, data isn't sent.

The trick that works it's actually the opposite. If I put a pull up resistor parallel to the data line, the anemometer sends data happily. How is that possible? I don't get it.

Can you draw a diagram of your working setup? I don't understand what you mean by "a pull up resistor parallel to the data line.

Steve

slipstick:
Can you draw a diagram of your working setup? I don't understand what you mean by "a pull up resistor parallel to the data line.

Steve

The anemometer TX line is hooked up to Arduino's digital input pin. Pull up resistor is just hooked to the same pin, but another end of it is connected to +5V. Just like here Pull-up Resistors - SparkFun Learn

I used 2k2 and 10k pull up resistors, and they both work just fine. I know, my question if kinda paradoxic, why does this work? The anemometer clearly pulls data pin high, when it's transmitting! Weird!

What I can't understand is why you need a pull up or down resistor in the first place. What happens if it is just connected directly to the pin with no resistors which seems like the obvious thing to do?

Steve

slipstick:
What I can't understand is why you need a pull up or down resistor in the first place. What happens if it is just connected directly to the pin with no resistors which seems like the obvious thing to do?

Steve

Same as with pull down resistor, data is not flowing. Data line is kept pulled down all the time.

I was thinkinh this problem and maybe find out an explanation.

The anemometer pulls the line low and releases it to high only when necessary during the data transmission. It assumes that there's a pull up resistor forcing the data line to high when it releases it. If there's not, it might stay at low.

I don't know, if this is correct, but another explanation didn't come to my mind. Is it normal that sensors keep the data line pulled low?

kataja:
Is it normal that sensors keep the data line pulled low?

No. Normally in case of no communication, a line is left floating - and the pull-up resistor will pull it high. Then to communicate, the line is pulled low by the sensor as needed. Examples of this include OneWire, I2C (aka TwoWire), and the DHT11/DHT22 communication. Other protocols are driven high and low, such as SPI, and don't need a pull-up or pull-down resistor.

Now why don't you start to provide some real information on this anemometer, such as a link to its data sheet (a quick Google search on the type number you provided didn't give useful results), the circuit diagram of your setup, and your code. The first part is actually the most important. Without data sheet it's basically guess work. Who says that the blog posting you refer to is even correct?

wvmarle:
No. Normally in case of no communication, a line is left floating - and the pull-up resistor will pull it high. Then to communicate, the line is pulled low by the sensor as needed. Examples of this include OneWire, I2C (aka TwoWire), and the DHT11/DHT22 communication. Other protocols are driven high and low, such as SPI, and don't need a pull-up or pull-down resistor.

Now why don't you start to provide some real information on this anemometer, such as a link to its data sheet (a quick Google search on the type number you provided didn't give useful results), the circuit diagram of your setup, and your code. The first part is actually the most important. Without data sheet it's basically guess work. Who says that the blog posting you refer to is even correct?

I think there is no circuit diagram available for TX20, and that's why I am guessing, why pull up resistors work. La Crosse WS2300 weather stations use TX20 and all its sensors are "closed" source, as almost all of commercial weather stations.
But could my theory explain the behavior? This sensor doens't use I2C or SPI, and mayby its designers just decide to use weird line logic?

I've never seen a TX20 or a datasheet for it. But Google shows several circuits from people who claim to be using it successfully. None of them seem to use a pullup resistor.

Steve

I wasn't asking for a circuit of the sensor itself, but YOUR circuit.

The blog doesn't mention any resistor on TxD, only that you have to pull low the DTR line and the anemometer will start sending data. Connect the TxD to a scope and see what's really coming out, without resistors, or with resistors.