Super cheap DIY anenometer (for Arduino) - Page 1
Forum section: electronics / beginners

author: gildasd
author_rank: Frequent Contributor
timestamp: March 06, 2016, 02:05:43 pm
content: This is for a proof of concept, the idea is to measure variations in wind speed, not absolute value.This thing has got to live a couple of weeks at the most.If the result are ok, then I'll get something better:https://www.adafruit.com/products/1733For now, the "sensor" is DC motor lifted out of a 3,99€ toy car.Even at low speed (turning between fingers slowly) it produces more than 50mV.It's cheap, it's crap, it's what I got (and can afford).I intend to connect it like this:But with a 4V Zener to ground if it starts generating a lot of volts.The construction is going to be cheap ass (starting from the bottom):An alloy plate.A bit of epoxy paste to hold the motor.The hood is half a plastic Easter egg.3 more half easter eggs as vanes.Question:Am I missing something obvious?

author: tautech
author_rank: Super Contributor
timestamp: March 06, 2016, 02:34:06 pm
content: Quote from: gildasd on March 06, 2016, 02:05:43 pmHave scope?Check for unexpected spikes that might fry an Arduino.Schottky diode to VCC?

author: gildasd
author_rank: Frequent Contributor
timestamp: March 06, 2016, 02:43:54 pm
content: Quote from: tautech on March 06, 2016, 02:34:06 pmOnly an analogue scope at home, but I'll test on the Uni's scope before I plug in.Did you mean Schottky diode between VCC and the ground?

author: Seekonk
author_rank: Super Contributor
timestamp: March 06, 2016, 03:55:19 pm
content: The zener is probably rectifying some RF energy. I would place a ,1uf in parallel. A 4.7K load resistor would also be a good ides.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: March 06, 2016, 04:12:35 pm
content: Your cutaway sketch shows the motor connected to Ground and to an Analog input. If your motor makes any spikes or sustained voltage over 5V this will probably damage your analog input. You may be able to protect it using a Zener diode but you might need some more complicated snubbing arrangement just to be completely safe.But your graphic appears to show the motor connected to Vin instead of Ground. I don't think that is going to work very well for you.

author: gildasd
author_rank: Frequent Contributor
timestamp: March 06, 2016, 04:49:29 pm
content: Quote from: Seekonk on March 06, 2016, 03:55:19 pmSomething like this?I'm not doing high frequency sampling, 1Hz our less. So if the cap robs some of the signal, I won't even notice...

author: MK14
author_rank: Super Contributor
timestamp: March 06, 2016, 05:11:51 pm
content: Quote from: gildasd on March 06, 2016, 04:49:29 pmBy putting everything after the resistor, ALL the components will tend to be protected. Even if something silly happens, like accidental connection to a battery or something.The problem with a lone zener like that, is that if the power is switched off, the port pin is now susceptible to excessive voltages again.You could put Schottky diodes in (instead of the 1N4148), for even better protection. But what I showed is probably fine.You could make one of the 1N4148's I showed, a 4V zener, if you want to limit the voltage, because of the ADC. But the double diode protection, should do fine, anyway.

author: Andy Watson
author_rank: Super Contributor
timestamp: March 06, 2016, 05:13:42 pm
content: The zener should be the other way up.Have you considered that a "toy motor" might introduce too much coggin?

author: gildasd
author_rank: Frequent Contributor
timestamp: March 06, 2016, 05:46:34 pm
content: Quote from: MK14 on March 06, 2016, 05:11:51 pmI might be saying something stupid here, but looking at the datasheet of the 4148, the forward voltage is 1V.That being that, does it mean that your circuit limits the signal to 1V? I was hoping to max out at 3V at 20m/s...

author: gildasd
author_rank: Frequent Contributor
timestamp: March 06, 2016, 05:50:41 pm
content: Quote from: Andy Watson on March 06, 2016, 05:13:42 pmI removed the gear box, the cups drive the rotor directly.

author: MK14
author_rank: Super Contributor
timestamp: March 06, 2016, 05:52:45 pm
content: Quote from: gildasd on March 06, 2016, 05:46:34 pmThey are reverse biased, so only come into play at around -0.7 V and suppyVoltage+0.7Vi.e. voltages around 0 up to supplyVoltage, should be left alone.If the above is NOT the case, then I have drawn the diode(s), the wrong way around. Easily done.They are to protect the MCU input from damage, from too low or high voltages. I.e. Below ground or above Vcc (Supply voltage).

author: gildasd
author_rank: Frequent Contributor
timestamp: March 06, 2016, 07:46:29 pm
content: I get the general idea, thanks!

author: tautech
author_rank: Super Contributor
timestamp: March 06, 2016, 07:54:09 pm
content: Quote from: MK14 on March 06, 2016, 05:52:45 pmExactly why I mentioned Schottky diodes in reply #1.Schottky diodes will prevent more than 0.3 V influence to the power rails, therefore staying under the usually recommended + or - 0.5V for all IC inputs.

author: pmbrunelle
author_rank: Regular Contributor
timestamp: March 06, 2016, 07:59:22 pm
content: I think that it could be difficult to mount the rotating assembly well aligned with the electric motor.I think I would try some epoxy, and then applying power to the motor (in the low-drag direction), so that the rotating assembly self-stabilizes on the electric motor while the epoxy cures. Obviously, the motor must be oriented vertically...

author: Kleinstein
author_rank: Super Contributor
timestamp: March 06, 2016, 08:21:12 pm
content: Those cheap motors are usually not rotating really easy. Chances are better with a little fan from an old CPU cooler. If you are lucky you can even remove the coil and iron part an leave only the magnets and the hall chip.For protection the resistor and zener are Ok, the 1µF cap is rather large and should better be non polarized. For additional protection there should be a second resistor between this circuit and the µC.

author: MK14
author_rank: Super Contributor
timestamp: March 06, 2016, 08:23:29 pm
content: Quote from: tautech on March 06, 2016, 07:54:09 pmI agreee.But also the internal (IC) diodes, are suppose to be slightly weakened (either by design or they are like that anyway), to ensure that external, low cost diodes can be used.Sticking with the datasheet is best, so 0.5V it is.

author: MK14
author_rank: Super Contributor
timestamp: March 06, 2016, 08:28:23 pm
content: Quote from: Kleinstein on March 06, 2016, 08:21:12 pmMaybe not. Because when the power is off, and Vcc=0V. Voltages below the 4V of the zener, can damage/destroy the cpu. Dave has done at least one video, explaining some of the details about this (it shows an MCU mysteriously being powered up).There are millions of ways of protecting stuff. Opinions vary.EDIT:As long as the 4K7 resistor, is connected, in a way which limits the current. I guess voltages below 4V, but above 0.5V or so, would be more of a datasheet violation and/or undesirable. E.g. Might cause latch up on power up. Rather than actually damage the MCU.Many people use the single zener method, so there are not necessarily black and white answers. A lot of it is opinion.

author: gildasd
author_rank: Frequent Contributor
timestamp: March 06, 2016, 11:39:56 pm
content: Quote from: Kleinstein on March 06, 2016, 08:21:12 pmThe two I have have low enough drag for my purpose - and they are identical - of making two similar anemometers.They were unusable, for this purpose, with their little gear box.I'll think about your circuit.

author: gildasd
author_rank: Frequent Contributor
timestamp: March 06, 2016, 11:43:50 pm
content: Quote from: pmbrunelle on March 06, 2016, 07:59:22 pmI was thinking of using a lathe to centre the egg...Pour a bit of epoxy in, let cure, drill hole smack in the middle.

author: gildasd
author_rank: Frequent Contributor
timestamp: March 19, 2016, 02:30:14 pm
content: This is how they look.Making the protection circuit now.

author: gildasd
author_rank: Frequent Contributor
timestamp: March 29, 2016, 08:43:30 am
content: The recommended circuit does not work right now.I get a steady 1.93V at the MCU port pin and a hand pin makes the signal goe down to 1.926V.The same spin with no ptotection produces +0.045V...Weird.Edit;Works much better with the 4.7kO resistor after the protection circuit.Negative voltage does still get through...

author: MK14
author_rank: Super Contributor
timestamp: March 29, 2016, 09:11:22 am
content: With a quick look at the circuit, it seems fine.D1 1N4148, seems to be the only easy way, a faulty component, could produce a "stray" voltage. As it is the only easy source of Vcc.You could try removing D1 and/or testing D1 with a multimeter or something.But I would guess it is mis-wired, or one of the components is faulty/leaky.

author: gildasd
author_rank: Frequent Contributor
timestamp: March 29, 2016, 09:32:14 am
content: Quote from: MK14 on March 29, 2016, 09:11:22 amGlue on the pin of a diode - arrgh!That being said, the output is more sensitive to small anemometer movements with the resistor after the protection circuit.I'm thinking of putting a 1µF dielectric to smooth the signal further, as to reduce the needed sampling time on the ADC...Added pictures:1) Donor toy car.2) The slot for the wiring get electrical tape to avoid shorts.3) Heat shrink on the capacitor pins to make the fit tight.

author: MK14
author_rank: Super Contributor
timestamp: March 29, 2016, 09:40:40 am
content: Quote from: gildasd on March 29, 2016, 09:32:14 amThat makes sense. I'd expect the motor signal to be very noisy. You effectively would be making an RC filter.

author: gildasd
author_rank: Frequent Contributor
timestamp: March 29, 2016, 09:52:40 am
content: Quote from: MK14 on March 29, 2016, 09:40:40 amThanks for the help!Is MK14 a reference to Griffon Engined Spits?A 1µF just smooths the sine, a 10µF effectively make the output DC while only robbing 5 to 10 mV.

author: MK14
author_rank: Super Contributor
timestamp: March 29, 2016, 09:59:09 am
content: Quote from: gildasd on March 29, 2016, 09:52:40 amNo.It is a 1970s, classic/vintage electronics hobbyist self build microprocessor hex display/keyboard, early microcomputer. CliveSinclairrelated, by 'Science of Cambridge'.With a phenomenal 256 BYTES! of ram.https://en.wikipedia.org/wiki/MK14

author: gildasd
author_rank: Frequent Contributor
timestamp: March 29, 2016, 10:17:31 am
content: Quote from: MK14 on March 29, 2016, 09:59:09 am256 bytes! What will people do with so much space?Doing a burn test now. Anemometer has already detected that the source fan is not 100% constant speed.

author: gildasd
author_rank: Frequent Contributor
timestamp: March 29, 2016, 01:06:53 pm
content: Makes for a very small circuit!

author: MK14
author_rank: Super Contributor
timestamp: March 29, 2016, 01:26:07 pm
content: Quote from: gildasd on March 29, 2016, 01:06:53 pmYes, that is looking nice, neat, tidy and compact.Neat/tidy (usually/often) means reliable/consistent.

author: Mephitus
author_rank: Regular Contributor
timestamp: March 29, 2016, 04:29:33 pm
content: Maybe I am missing the point here, but couldn't this be immensely simplified with a hall effect sensor detecting the RPM on a non-motorized fan? It would make for a safer and more reliable circuit.

author: gildasd
author_rank: Frequent Contributor
timestamp: March 29, 2016, 06:44:52 pm
content: Quote from: Mephitus on March 29, 2016, 04:29:33 pmYes in theory.In practice, the motor is off a 4€ toy, the 3D printing using the Uni's printer, discount ping pong balls, CAPS de-soldered from PC main boards and scrap alloy machined on Uni lathe/mill...Plus this motor is already natively max 4V, not the 12V that a PC motor produces, so it can talk directly to an Arduino ADC.Total cost is 6 to 7€ per complete system plugged in.This kind of anemometer maxes out aerodynamically at 90km/h, producing 5V...So the protection is more for shorts, crazy seagulls and other dumb stuff (radar test, idiot turning the vanes the wrong way round).If anything, the only possible problem is increasing the low speed sensitivity, while losing some top end, with different vanes.

author: Mephitus
author_rank: Regular Contributor
timestamp: March 29, 2016, 07:53:39 pm
content: Ahh, I see. That would make sense. As something that might help in future projects. I have found that printers are a gold mine for parts. Many times people even give them away for free. They commonly have hall effect sensors as well as IR interrupter sensors that could be used for projects like this. Hope your testing works out!

author: gildasd
author_rank: Frequent Contributor
timestamp: March 29, 2016, 09:34:20 pm
content: Quote from: Mephitus on March 29, 2016, 07:53:39 pmI have a late 1990's alarm system fished from a dumpster that is going to be a gold mine!

author: MK14
author_rank: Super Contributor
timestamp: March 29, 2016, 10:51:30 pm
content: Quote from: gildasd on March 29, 2016, 09:34:20 pmCan I send you a message, to put into your Mars probe project then, made out of a 1990's alarm ?Also the protection circuit would need updating, as there is radiation? in space, but no wind, so you don't need the ping pong balls!

author: gildasd
author_rank: Frequent Contributor
timestamp: March 30, 2016, 08:26:42 am
content: Quote from: MK14 on March 29, 2016, 10:51:30 pmNo Mars probe, "just" testing superstructure optimisation for commercial shipping...Send away!

author: gildasd
author_rank: Frequent Contributor
timestamp: March 30, 2016, 10:14:27 pm
content: Changing the angle of the vanes has wielded some improvement.The (highly scientific) testing method was:A large table fan was set level with the anemometer and the distance was slowly increased till failure to register.Version 1: 82cm (original, left)Version 2: 88cm (new, right)So a noticeable and repeatable improvement.But to improve even more, I still think the vanes need to be bigger.