Also, depending upon what the valve is controlling, you may want to specifically choose a default open or default closed valve. If you lose power (and thus control) you want to make sure your valves default to a safe position.
That's right, forgot to mention, Normally Open or Normally Closed as another parameter for the selection.
You will probably not be able to power the solenoid valves directly from the Arduino. I would use a relay that is powered by the Arduino to control power to the solenoid.
If you chose DC as the operating voltage type then you can use transistors to activate them which are less noisy and faster than relays. You can even control the flow using PWM. I suggest for simplicity using 12VDC. That's what I did in this project and I could even control the air flow using PWM modulation from Arduino up to a certain degree. That was just to test that possibility as I don't need that there. Doing that may cause some heat generation though.
I would try to use the sensor I told you. It will save you a lot of problems and the accuracy will be undoubtedly superior. If you can't because of budget reasons (you need to find out how much it is for real, I don't know) and you need to stay with the drop checker then: If you are not familiar with Arduino and electronics already and neither with writing software for the computer then I would try the computer software approach. It will be easier, more accurate and reliable (I think). On the other hand, you don't need to build any hardware for that, with a camera and a computer you are all set. It will probably take longer since you will need to learn how to do some coding; but there are several examples of how to capture the camera and extracting the RGB components from the image. In this case, computer speed won't be a problem as you can sample the CO2 concentration every second or so, I guess. At such a low rate any computer can extract the RGB with no problems. I have done it several times and its so fast that you hardly notice anything. Your device is static which is another great advantage. Then you still will need an Arduino to perform the control you want. That will help you learn some Arduino tricks and coding too and on the other hand you would have learned to code in the computer and communicate with Arduino, something you will appreciate having spent time on in future projects. The down side is of course, having to use a computer; but you probably can find one for that. If the solution change in color is hardly noticeable for a person then it will probably be harder for the computer to detect the changes and that will limit your resolution and accuracy. That can become another limitation you may encounter with this method. I have no idea about it. Arduino can communicate with the computer directly by just connecting it to a USB port. Nothing else is required and there are millions of examples of how to do that. Anyways, either method you use, you will have to provide interlocks alarms, etc in your system to prevent (as you mention earlier) wrong CO2 deliveries to the tank. To give you some ideas, with the same cam you can set a white spot which can be used as control image and determine if the illumination is right, for example. Another colored spot (or several) corresponding to known values within your range can be used to calibrate the system on every measurement and find out if the readings are right. You can take readings from 2 or more places in the image, compare them and average, etc. Illumination is critical though. Of course, things like contamination of the solution, broken container, power failures you will have to find ways to detect them. Again; if you can find the money, try to get the right sensor. In my opinion, it will be the easiest and more reliable way to do it.
To avoid some head aches, I would try to do this: -Try to find a different approach and a different sensor, if possible. Its difficult to believe there is only one possible method to measure what you are trying to accomplish; but I don't know what it is. -If the coils method is the best option: *Decrease the freq to about 10-15KHz and use a HiFi audio amp (in case the oscillator-driver you are using can't do it) to put more power on the TX coils, 10V for example, That will give a higher induced voltage at the receivers, needing less amplification and making it more immune to noise.That's if the coils can take it without burning, overheating or core saturation. Take the voltage as high as possible without undesirable effects. Careful though as that my produce unacceptable EMI radiation. -Use caps to tune the thing and make an LC tank (f=1/2PI*sqrt(LC)). That will help filter out undesirable harmonics and reduce distortions and EMI radiation. Same goes for the RX coils to help filtering RF interference. *Define the temp range you expect for the device to operate without significant change in the readings at the output. Once you have that, make sure to select the gain resistor with a temp coefficient capable of that, so it will not change the gain with temp inside that range. The same applies to the offset voltage temp drift of any other amps you may need and any other resistors affecting the total gain. *Keep the gain of any amp stage under 10 or whatever the product Gain*Bandwith limit for the particular device dictates for the operating freq selected. Check the device datasheet for that similar to the previous post. Spread the overall gain into several stages. Too much gain increases the chances of building an oscillator instead. *Use the manufacturer's recommended filtration caps on power supplies rails next to the actual opamps or any other places you may need including the input. *Use ferrite cores and make a couple of turns trough them with the power supplies wires feeding the amps at least in the prototyping phase. If not enough and noise persists, place ferrite core coils in series with the power supply wires feeding the amps. *Use shielded wires to send the coils signal to the amp. Place the amp as close as possible to the coils. *Make sure the multiplexers can handle the freq in use ( I don't know, never used them). *Follow ground distribution recommendations from the manufacturer of the Instrumentation Amp. *If noise is persistent, enclose the amps board in a grounded metal box. *Use a precision rectifier at the output (if required as there maybe enough voltage already to use simple diodes) and build the right low pass filter to average the envelope of the rectified signal with the right time constant for the application. Check AM Demodulation subject, as I think AM modulation of your 20KHz carrier from the measured variable, is what you get at the end of the day with your sensor approach. The low pass filter must be designed to filter out the carrier freq and keep the envelope which is your original signal. -Consider using a high quality Audio preamplifier as your first stage, instead of the instrumentation Amp. Similar to the ones used as Needle Preamps in old vinyl record players or a simple Mic Preamp. You will need to reduce the band width though to reduce noise and most likely correct the freq response. If I recall well, their band pass wasn't flat to compensate for freq response problems in the needles or mics. You can build your own using LM382 or similar. Beware when setting the band pass it can not be a super High Quality (Q) filter that excludes useful freq components of your original variable signal (the one you are sensing). The bandwidth if its AM modulation (as I suspect) has to be at least twice your original variable signal max freq and centered to the carrier you use.
I don't know what else could help you. If any thing else comes to my mind I'll let you know.
With a gain of 1052 ( aprox. 60 dB), If you look at the Graphs (Fig. 25, Fig.26), no matter what Power Supply Voltages are you using, the cutoff freq is way lower than your operating freq of 20KHz. Probably, the reason why you are not getting a linear increase in the output voltage when you increase the Gain to 1052 as you were expecting (It falls in the slope of the Graph).
Possible solution: -Divide the Gain into multiple stages.
Additionally, check the subject Slew Rate. You may also be out of range of the device max slew rate (I don't know) and getting a triangular wave at the output not linearly following the input. This is common occurrence when the gain is taken too high and the freq is too high to do that. I haven't checked that in your case; but you need to check it as well and confirm the slew rate is right in your case.
I think you are taking the device off limits in this application.
Glad you solved the problem and the code worked. Check these subjects: -Precision rectifier -Input protection diodes.
Since I know arduino adc only reads 0 - 5 V and using 100,000 gain [ not sure if i can do this] to multiply the signals, if i do, the highest output from the sensor goes to 50V and that will harm the arduino.
Then you don't need 100000 you need only 10000 to get the 5V you want and not 50. Check the datasheet of your instrumentation amp to see if the gain can be set to 10000. I'm using right now an AD620 with a gain of 2000 with no problems. On it, the gain can be set to 10000 according to the manufacturer. For the precision rectifier if you are concern about temp dependency of your whole system transfer function select a low offset temp drift opamp and low temp coefficient resistors. Correcting temp drifts later on will be time consuming and can get pretty ugly. I still don't understand why you are getting such low voltages with a gain of 1000 already and how could you read them without a precision rectifier??? But I'm not there. -Are your TX and RX too apart from each other? -Do the RX coils have enough turns? -Are you feeding the right power to the TX coils? -Are the frequencies correct? With such low voltages and coils as pick ups, if you are anywhere near public broadcasting stations frequencies and/or distances you will have problems isolating your signal from the interference from theirs. Its always better to have a strong clean transducer signal than having to amplify it too much to keep the S/N ratio under control. Maybe you can improve your transducer performance somehow and get a stronger signal so you don't need to amplify that much.
I wish I can think first and do it rather than do it and think later.....
That's common occurrence for many of us, including myself. The reason being lack of patience... That condition improves a bit as you get older though.
Hi: Please double check your connections correspond to the pins you are driving from the code. The instance i==0 corresponds to (LOW, LOW, LOW) for your mux which means none of the TX outputs is active and maybe that's why it works there and not with other instances of i++. Remember I set my own pins for TX which may not have been the same you were using. Another reason for the problem could be the definition of the TX pins Mode in the setup. If I get any other ideas I'll let you know. Please post your results.
Another solution could be using a cam pointed at the instrument and extracting the RGB components from the image by software. That will require way less hardware tweaking. However this may need stable lighting and you may not need an Arduino.
I have found and purchased some pretty good ASCO solenoid valves from Grainger.com. You can do a Google search for solenoid valves. Some of the parameters you need to know to make your selection are: -How many ports. (2way or 3way) -Max pressure the valve will withstand. -Max water flow you need. -Coil voltage you want. -Type of coil activation voltage AC or DC. The sensors are depending on what you want to monitor. In order to help you better, we need to know which variables you will be monitoring and their ranges.
That's pretty cool. Have you considered using a PC as a central control unit for all your farm tasks?. I'm sure with your expertise you can do it and you will have a much more powerful system. Just a suggestion.
Hi all: This is another version of Dial Gauges I have developed to be used in Arduino based Projects. This configuration allows for better screen optimization when combined with other virtual instruments. They are also more simple in appearance and operation. Indications are being driven by pots connected as voltage dividers to the Arduino A0-A5 analog inputs.
There are two diodes coming off of the battery pack that come together into one wire that goes to the A0 pin of the Arduino.
If the battery pack voltage is higher than 5V that configuration will fry the Arduino. You need to use a voltage divider using 2 resistors; but you need to tell us what the batteries voltage is, so we can calculate the resistors. Please tell us what the nominal battery voltage is and how much you expect it to swing from discharged to fully charged. If you don't know then you can mention which batteries you are using and they most likely will tell you here what are those. The diodes are probably not needed there. You may need a diode though to protect Arduino's input from voltages higher than its power supply; but we need to know first the batteries voltage.