With Instructables you can share what you make with the world, and tap into an ever-growing community of creative experts.
Tell us about yourself!
@geigercounter120If its any help to you, I have an example of using an Arduino, a DS18B20 and a solid state mains relay to control the temperature of a water boiler for use as a mash tun: https://github.com/jazzycamel/BoilerController.Thanks for your comment, good luck and have fun!
Ignore that, ive just reread the code and seen the conversion from μs to Hz is 500,000/time rather than 1,000,000. Might ne good to explain that somewhere. Also, the duty cycle of the square wave is 50% +/- 25% so you're probably better measuring edge to edge, as averaging the result won't compensate for continuously asymmetrical waveforms.
Hi there,Simple question: using pulseIn() are you not only measuring only the 'high' part of the square wave as opposed to the full period? If so, your frequency and thus your speed will be double the actual value. I may have missed something in your explanation though...
Good to know you've got it working, we'll done :) Glad I could help.
Hi @Tecwyn Twmffat,My Dad works for Vector Instruments (Windspeed) and was the guy who sorted out these instruments for you. I hooked up on the of Anemometers to a PIC micro ~4 years ago so feel free to give me a shout if I can be of any assistance (not that I think you'll need it!) :)Congratulations on a nice job well done :)
That failure is right at the first step of communicating with the sensors, i.e. it's failing to find any and/or the right number of DS18B20's on the 1Wire bus. What model of Arduino are you using? Is NUM_BS18B20 set to the number of sensors you have connected?Also, a few things to check:1) Are all the connections the same or equivalent to those in my circuit diagram2) Are you using my tweaked version of OneWire.cpp? If not, you'll need to connect a 4.7kΩ pullup resistor between the 1Wire bus (pin 7) and VCC (you might try this anyway).This is just the first few things that come to mind. Try these and let me know the results, I hope you get it working :)
That should have been NUM_DS18B20, sorry!
Glad I could be of some help :)
Join 2 million + to receive instant DIY inspiration in your inbox.
© 2016 Autodesk, Inc.