Panteltje's wind_pic_thermal_udp an ethernet based wind direction and speed sensor

This project is released under the GPL license

Circuit diagram:
wind_pic_thermal_udp_circuit diagram

work in progress.

Test board top:
test board top

Test board bottom:
test board bottom

Source code in asm for Microchip PIC 18F14K22
wind_thermal_udp-0.1.asm asm source for Microchip PIC 18F14K22

wind_thermal_udp-0.1.hex hex file for Microchip PIC 18F14K22

Wind sensor is with 4 x 2 diodes measuring voltage drop differences as wind cools one side or the other.
Diodes are pre-heated via resistors.

The unit is designed with POE (power over ethernet) in mind, so then you only need a singe cable,
I use an ENC28J60 based ethernet module from ebay, you can also just use the chip, that module only had a connector and some resistors plus caps,
if you want to use power over ethernet _without_ an adaptor, then you need to replace the connector in this ebay module with one specific for that,
Perhaps a HLJ-6115ANL, like this one
else as the connector in the module has 150 Ohm between the POE power lines it will overheat..
The ethernet module is ebay item

most parameters are programmable, and there is a zero correction option.
The module can output in 2 different formats:
mode 0 shows the 4 ADC values like this:
# netcat -u -l -p 1078
F747 R748 B745 L749
F747 R748 B745 L750
F747 R749 B745 L750
that you can then process at the receive end, even in a script with netcat.

Mode 1 is more advanced and shows the differences, and incorporates a zero correction:
# netcat -u -l -p 1078
FB-2 LR1
FB-1 LR1

FB stands for front back, and LR for left right difference (ADC steps).
Problem was to get rid of the noise at the ADC from the switch mode regulator, I decided to use a LC filtering, as I wanted to avoid a lot of power dissipation
with a linear regulator or a switcher followed by a linear etc etc.

wind_pic_thermal_udp first does ARP requests to find the MAC of the destination IP you specified, and as soon as it has that
then it starts outputting data like above once per second.

Most parameters can be set via RS232 (use logic level 3.3V cable interface at 115200 Bd), here is the menu:
Panteltje (c) wind_thermal_udp-0.1

AnnnENTER set source IP address saved in EEPROM
BnnnENTER set source IP address saved in EEPROM
CnnnENTER set source IP address saved in EEPROM
DnnnENTER set source IP address saved in EEPROM
EnnnENTER set destination IP address saved in EEPROM
FnnnENTER set destination IP address saved in EEPROM
GnnnENTER set destination IP address saved in EEPROM
HnnnENTER set destination IP address saved in EEPROM
LnnnnnENTER set source port, saved in EEPROM
PnnnnnENTER set destination port, saved in EEPROM
MnENTER set transmit mode, 0=4 values, 1=signed front_back signed left_right
Z zero calibration, do this with no wind
v print status, IP address, ports, and MACs
h help (this)
v print status

Here what you get when you type 'v' for status:
source IP address
source port 1078
source MAC 01:02:03:04:05:09
destination IP address
destination port 1078
destination MAC C8:60:00:2A:85:2C
front ADC 747
right ADC 747
rear ADC 745
left ADC 751
front back zero correction -3
left right zero correction -1
transmit mode 1

Of course the module can be used to send any ADC data via UDP on a LAN.
The module's own MAC addres is fixed with a #define in the asm source.
The ENC28J60.h include file I found somewhere on the net, not sure if copyright applies to it, so google if you need to assemble it yourself for a different MAC or software changes.

return to main page