Monitoring an Ultrasonic Fogger Using a MAX471 Current Sensor With ARDUINO
by Kev_MTL in Circuits > Arduino
3294 Views, 13 Favorites, 0 Comments
Monitoring an Ultrasonic Fogger Using a MAX471 Current Sensor With ARDUINO
![Fog.png](/proxy/?url=https://content.instructables.com/FTQ/2648/J65G11AT/FTQ2648J65G11AT.png&filename=Fog.png)
This instructable is intended for people who consider using an ultrasonic fogger and need to monitor its proper operation. It is more of sharing an idea than making a complete system. Ultrasonic fogger can be used for different application. I use them for aeroponics (fogponics) or simply to create humidity. I intend to make an instructable on hydro-culture shortly. Here I want to concentrate on the monitoring part only.
When an ultrasonic fogger operates, the current being used will vary with its oscillation. If we measure this variation, we should be able to distinguish between a working fogger and a defective one.
Here are some scenarios where the fogger is not working correctly and the corresponding interpretation
- fogger is not touching water => it will not use any current
- short circuit => current will go real high
- ceramic disk might not oscillate the way it should => current fluctuate differently compared to a working fogger
So the idea is to monitor current variations in real-time and do some stats to differentiate these situations.
Parts used:
- MAX471 3 amp. current sensor (for example this one on ebay)
- 24V ultrasonic fogger and the AC adapter (see this search on ebay)
- ARDUINO UNO
Circuit
![circuit fogger, MAX471, Arduino.png](/proxy/?url=https://content.instructables.com/FKW/AOP3/J66Q96RS/FKWAOP3J66Q96RS.png&filename=circuit fogger, MAX471, Arduino.png)
There is a good tutorial for the MAX471 current sensor here :
Test Code
![code fogger test.png](/proxy/?url=https://content.instructables.com/FNY/GMFN/J5X0J1TU/FNYGMFNJ5X0J1TU.png&filename=code fogger test.png)
The MAX471 will output 1V per 1A, up to a maximum of 3A. You can read the analog output with an ARDUINO UNO easily.
The ADC of the UNO has a 10 bit resolution (2^10), which means 1024 possible values. 1024 correspond to a 5V input and 0 to a 0V input. So using this formula we can calculate easily the corresponding current :
current = 5V / 1024 * value_of_the_analog_input * 1A/V
Now to know how the current varies, some stats are needed. We will take 10 measurements (one on every 50 milliseconds) and calculate the average value and the standard deviation. The average will be useful to know the current being used. The standard deviation will tell us how the current varies. A small value tell us there is not much fluctuation, as a higher value indicate the opposite.
You will need to add this library to Arduino :
Interpretation
![example.png](/proxy/?url=https://content.instructables.com/F44/2G3Q/J5X0J1Z7/F442G3QJ5X0J1Z7.png&filename=example.png)
Here is an example with three different foggers. The first two are defective and the third one is working properly.
In the first case, the fogger is taking too much current (about 1.8A, while the power supply is rated 1A max). This means the pins are probably shorted.
The second case shows that the standard deviation is way lower than with the good fogger. This means it is not oscillating correctly and it is the best way I could find to detect it. So even if the average current seems normal, it it not enough to asses that the fogger is operating correctly.
The third case is when it is working properly.
So, needless to say it is easy to take action on these values. If current is around 0.4A and standard deviation is greater than 2, everything is fine, but if not, we can buzz an alarm, send an email, etc.
(Note that this may vary depending on the ultrasonic fogger model you are using.)