Pages: 1 2 3 [4] 5   Go Down
Author Topic: Ultrasonic Anemometer  (Read 25044 times)
0 Members and 1 Guest are viewing this topic.
Australia
Offline Offline
Full Member
***
Karma: 7
Posts: 209
AVR Microcontrollers
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi ilioSS

Sensors should be fine.

Do you have a cro, the program "calibrateCRO" can be used to see if you get the same waveforms as me.

Are you using "calibrateENVELOPE" to get the 8000 you should be able to adjust the 10k pot to get
4000. 

You must get this value and 3000 for the ZCD for the system to work.

The 918 is just a small signal diode, any one should work.

I cant tell you what is the problem, but you must go back to the absolute basics.
Program the arduino to send 40khz pulses and check the result.
I'm afraid that a cro would be very usefull.

cheers
Logged

Holland
Offline Offline
Jr. Member
**
Karma: 0
Posts: 81
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Carl47,


First of all many thanks for your reply.
It am very delited to recieve responce which is very welcome.

In reacton of your anwser.
Good to hear that the sensor are ok.
 I had a real good look at your picture in your article and I saw that you used also screened cable.
You connected the wire from the sensor direct on the PCBclose to the ic connection.
I changed the connection like you did. ( I routed the signal from the ic to terminals on the side of the PCB most problaby caused interfirence)
In this way it is optimal.
I wonder if the sensor realyis so sensitive. On the west sensor I heared the pulses as normal but also pulsen a bit weaker just for the stronger pulses.( interference)
I changed the place of the sensors west to south and south to west now the interference is not heard.
How can we check if a set of sensors are best for each other?
The ZCD is able to adjust to about 3000. This looks ok now.
Stil the envolope is 6000 about.
I will take a scope to check the CRO signal. ( can send scope pictures)
I think something is wrong with the LM324 loop envolope.Amplifier setting or so.
I keep you posted.

Kind regards,

Theo (ilioSS)

ps. Like your project gives lot of fun.
Logged

Australia
Offline Offline
Full Member
***
Karma: 7
Posts: 209
AVR Microcontrollers
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Theo (ilioSS)

Quote
I changed the connection like you did.
Make sure that the two drive lines are not earthed, the drive is differential and
if one side is earthed you only get one half the driving signal.

Quote
How can we check if a set of sensors are best for each other?
Try different pairs until you get the closest received amplitudes.

Quote
I will take a scope to check the CRO signal. ( can send scope pictures)

That would be very helpfull.

You only need low resolution photos, these would be really usefull:
(Make sure you have the voltage levels in the photos)

Output from 1st stage with example program CRO.
Output from 2nd stage of the amplifier with example program CRO.
Output from the LPF with example program CRO.
Output from the envelop detector with example program CRO.
Output from the zero crossing detector with example program CRO.

Cheers.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi can you please tell me what the ultra-amp circuit is for?

thanks
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
tell me what the ultra-amp circuit is for?
Amplifying the very weak echo signal.

so this is an optional extra amp to put in between the digital and analog board ?
Logged

Australia
Offline Offline
Full Member
***
Karma: 7
Posts: 209
AVR Microcontrollers
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

rondlite

The ultra-amp is a new version of the discrete divice shown in the analog circuit.

I will eventually change the analog circuit to show this.

No time frame as I'm busy on another project at the moment.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

cheers! that clears up a lot smiley

I am making a pcb design for both the analog and digital boards... so if i am done i will share with you.
from first check i can just hook in the ultramp in top left of analog, however it currently is 8v and ultra-amp is 5v

i assume H9 and H10 on analog are testpins too?

one thing i was wondering, you have a lot of gnd's to seperate holes, i could just lead them to 1 ground plane right, since you seem to lead them to actual pinouts

thanks a lot for the help
Logged

Australia
Offline Offline
Full Member
***
Karma: 7
Posts: 209
AVR Microcontrollers
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
so if i am done i will share with you

great!

Quote
currently is 8v and ultra-amp is 5v

Yes we use the 5v for the amp.

Quote
H9 and H10 on analog are testpins too

yes

Quote
just lead them to 1 ground plane right

That will be better and something you can do with a pcb.

Thanks and Cheers
« Last Edit: June 20, 2013, 12:23:56 am by carl47 » Logged

New Zealand
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Grey hacker
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Several months ago I announced that I was going to develop a PCB for this project - well life got in the way!!

I've been spurred onto looking again by the failure of my trusty old WS2515 LaCrosse weather station. This is the second time I've had an outside unit fail so having 2 good indoor 'base' units I've developed a 433.92MHz transmitter to take data from an Arduino based outside unit and transmit it to the existing base units. The temperature and humidity sensors are easy enough (basic 1-wire stuff) and the mechanics of the old LaCrosse tipping rain gauge is OK so that is easy as well but the inaccuracy of the original wind sensor has brought me back here.

Wanting to use some of the Arduino pins for other purposes has made me look at the circuit more closely - there is some really good cunning stuff here - I particularly like the 'bridge' drive to the transducers in transmit mode and then isolating (tri stating)  and grounding one side for receive. This is where I have saved 4 CPU pins by using 74hc240 rather than 74hc368 tri state buffers. By pulling one of the spare inputs to Vcc I take its output to the complementary low side transducer. i.e. A3 input of North goes to Vcc and the Y3 output goes to South(low). This causes South(low) to get grounded, ready to receive, whenever North is transmitting. The same goes for the other directions.

I've also shifted a few pins about so Tx control is now all on port C such that pc0=North, pc1=South, pc2=East and pc3=West. I've also shifted the analog mux to pd4 and pd5 so as to free up all of portB.

I've now got pins for 1-wire data, RF TX data, rain tipper etc

Attached is a (unchecked) schematic with the mods on it. I'd appreciate any feedback.

* digital.zip (27.54 KB - downloaded 31 times.)
Logged

Robin Down Under (or are you Up Over!)

Australia
Offline Offline
Full Member
***
Karma: 7
Posts: 209
AVR Microcontrollers
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'd appreciate any feedback

Very neat hardware mod.

How about a look at your software, I,m sure it would be appreciated.

Cheers.

Logged

New Zealand
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Grey hacker
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Still working on the software - its based on my fork of BeRTOS https://github.com/g8ecj/bertos/tree/g8ecj/all which provides the 1-wire interface and the basic serial comms, timers etc.

I've got the RF transmitter stuff ready to roll but only just started on porting your anemometer code to the new environment. I've posted the bit that is working to give some ideas of how it fits together! To use it with BeRTOS, get that package and use the wizard to create a project with the 1-wire stuff enabled (or use the example 1-wire project) and substitute the WxTX.c file for main.c in the project folder. You'll see what I mean if you start to play with BeRTOS smiley-wink

I'm also using an Arduino Nana as a plugin CPU engine - makes the PCB a bit simpler but having said that I no longer have access to the PCB lab where I used to make my own boards so I'm trying to simplify it even more to hopefully get a commercial 2 sided board done. That means smd parts to cut the size down since most suppliers charge by board area and the number of vias. Obviously I want to get it right first time so it may be a while  smiley-sad
Logged

Robin Down Under (or are you Up Over!)

New Zealand
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Grey hacker
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Forgot the attachment and I can't find an edit button!!

* WxTx.zip (5.71 KB - downloaded 21 times.)
Logged

Robin Down Under (or are you Up Over!)

Australia
Offline Offline
Full Member
***
Karma: 7
Posts: 209
AVR Microcontrollers
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for sharing.

You seem to be really getting your moneys worth out of a 328.

When I first setup my weather station I set aside one 328 for the anemometer and one for the other functions.
Humidity,temp, lightning ect and receiving, sending data is handled by the second.

I like your approach. I think that it will be a real improvement on my simple first design.

We would appreciate if you can keep us updated on your progress.

Your TXRX for 432Mhz looks good, the Arduino community also have classes to send data over radio links.

http://forum.arduino.cc/index.php/topic,60239.0.html
http://forum.arduino.cc/index.php/topic,63755.0.html

However fitting this to the LaCrosse base format would hardly be worth the effort.

Keep in touch.
« Last Edit: August 22, 2013, 11:48:36 pm by carl47 » Logged

New Zealand
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Grey hacker
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for sharing.

You seem to be really getting your moneys worth out of a 328.

When I first setup my weather station I set aside one 328 for the anemometer and one for the other functions.
Humidity,temp, lightning ect and receiving, sending data is handled by the second.

I like your approach. I think that it will be a real improvement on my simple first design.

We would appreciate if you can keep us updated on your progress.

So far I'm using about 13k of the 32k program space for the TX, 1-wire stuff (humidity, temperature) and serial logging. The idea of the TX was to re-use the LaCrosse base units but as I develop the prototype I'll be splitting it into modules to make it easier to maintain and to allow a clean API between modules that will allow changes to be done in a simple fashion. I've just been checking out the specs of the MPX4115A and  MS5534C barometer modules - the latter is what is used in the LaCrosse base unit - I think I'll incorporate one into the design  to round the whole thing out.


Quote
Your TXRX for 432Mhz looks good, the Arduino community also have classes to send data over radio links.

http://forum.arduino.cc/index.php/topic,60239.0.html
http://forum.arduino.cc/index.php/topic,63755.0.html

However fitting this to the LaCrosse base format would hardly be worth the effort.

Keep in touch.

Over the years I've written a lot of RF related stuff starting with a ham radio 9k6 modem 15 years ago using the very first AVR (the AT90S1200) up to a year ago using an Arduino hardware with HDLC modules for APRS TX and RX and KISS modem - part of the BeRTOS fork I refer to above. Google for my old callsign 'g8ecj' for other stuff.

I've just got to get my head round your 'NorthError' array and associated calculations to start the port to BeRTOS. The rest makes sense but I have found myself floundering over a couple of 'magic numbers' in the code!!

The next challenge will be to use the LCD driver I developed under BeRTOS for a receiver module based on an Arduino Nano again smiley-lol
Logged

Robin Down Under (or are you Up Over!)

Australia
Offline Offline
Full Member
***
Karma: 7
Posts: 209
AVR Microcontrollers
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
'magic numbers'

Yes, sorry about those I should have defined them and listed their origion.
I'm a bit slack and dont do complete explainations.

Quote
'NorthError' array

The tx/rx properties of the transducers are not symetric and they are also dependant on temperature.

Code:
int Northerror[20]; //The tof error for north-south transmit

This is my attempt to compensate for this changing error. 20 gave me the best result.
I'm not completely happy with the updating of this error correction factor.

I am reworking the project at the moment and hope to improve on this.

We have the tof difference from the envelope detector and the phase difference from the zcd detector.
In the code I only allow for updating the error when the phase difference goes through zero.
This will happen as the wind is always changing. But if you use a wind tunnel with a constant speed we may
not have a zero and the error would not be updated.

I,m also trying to recover the tof from the zcd detector and so elimating the envelope detector.
I could not do this on my first design and I still have not been able to get reliable values.
It's frustrating because the information on the tof pulse is there in the zcd signal. But least squares
on the polynomial of the pulse and everything else I try cannot give me as good a tof value as
I can get from the envelope detector method.

I'm sure my design has been improved on but no one has shared any details.

If I come up with anything I will share on this page.
« Last Edit: August 28, 2013, 11:54:33 pm by carl47 » Logged

Pages: 1 2 3 [4] 5   Go Up
Jump to: