Wiatr
Z Wiki.2o.pl
| Informacje podstawowe | |
| Programy obsługujące: OWFS | |
| Adaptery obsługujące: DS9097, DS9490 | |
The original 1-Wire weather station used DS2401s to label each of the eight magnetic reed switches in its wind direction sensor, as shown in Figure 4. A single DS2450 quad ADC can perform the same function with five resistors. As the wind rotates the wind vane, a magnet mounted on a tracking rotor opens and closes one (or two) of the reed switches. When a reed switch closes, it changes the voltages seen at the input pins of U1, the DS2450. For example, if the magnet is in a position to close S1 (north), the voltage seen on pin 7 changes from VCC to 1/2VCC, or approximately from 5V to 2.5V. Since all 16 wind vane positions produce unique 4-bit signals from the ADC, it is only necessary to indicate north, or specify which direction the wind vane is currently pointing to initialize the sensor.
Because two reed switches are closed when the magnet is midway between them, just eight reed switches indicate 16 compass points. Referring to the schematic and position 2 in Table 1, which lists the voltages seen at the ADC inputs for all 16 cardinal points. Observe that when S1 and S2 are closed 3.3V is applied to ADC inputs B and C. This occurs because the parallel combination of pullup resistors R2 and R3 act as a single resistor half their value connected in series with R1 to form a voltage divider with 0.66VCC across R1. Note that this condition occurs twice more at switch positions 4 and 16 generating 3.3V at those cardinal points also.
|
Cardinal |
Voltage Input |
Voltage Input |
Voltage Input |
Voltage Input |
|
1
|
5
|
2.5
|
5
|
5
|
|
2
|
5
|
3.3
|
3.3
|
5
|
|
3
|
5
|
5
|
2.5
|
5
|
|
4
|
5
|
5
|
3.3
|
3.3
|
|
5
|
5
|
5
|
5
|
2.5
|
|
6
|
0
|
5
|
5
|
2.5
|
|
7
|
0
|
5
|
5
|
5
|
|
8
|
0
|
0
|
5
|
5
|
|
9
|
5
|
0
|
5
|
5
|
|
10
|
5
|
0
|
0
|
5
|
|
11
|
5
|
5
|
0
|
5
|
|
12
|
5
|
5
|
0
|
0
|
|
13
|
5
|
5
|
5
|
0
|
|
14
|
2.5
|
5
|
5
|
0
|
|
15
|
2.5
|
5
|
5
|
5
|
|
16
|
3.3
|
3.3
|
5
|
5
|
To jest tylko zalążek artykułu. Jeśli możesz, rozbuduj go.


