Show Posts
Pages: 1 2 3 [4] 5 6 ... 19
46  Topics / Science and Measurement / Re: Weight Scale Part 1 (High Resolution A/D Conversion and GUI) on: February 24, 2014, 10:23:28 am
One more thing: since I don't have the instrumentation required, I have not performed any serious accuracy, linearity or repeatability tests and for that reason the preliminary tests I have performed in these areas are inconclusive.
47  Topics / Science and Measurement / Re: Weight Scale Part 1 (High Resolution A/D Conversion and GUI) on: February 24, 2014, 06:47:09 am
Let me emphasize that noise is a big problem and for this to work properly it has to be kept under control at the right level. Too much noise and there will be instability and errors. The drastic reduction of the frequency response helps reducing noise; but on the other hand reduces the response time. Its a delicate trade off.
48  Topics / Science and Measurement / Weight Scale Part 1 (High Resolution A/D Conversion and GUI) on: February 24, 2014, 01:50:54 am
Hi all:
This is a High Resolution Weight Scale GUI built with Arduino UNO and Processing 1.5.1. I have been playing with high resolution before in some of my previous projects; but nothing like this. Using the same 10 bits A/D converter from Arduino which will normally resolve 1024 different voltage values in the 0-5V interval, the system is resolving almost 100000 different voltage values in that interval (in the grams scale), which corresponds to about 5/100000= 5 microvolts voltage steps. The result is quite stable as the video shows. Neither amplification nor hardware noise reduction techniques are in use. The pot is directly connected to the Arduino A0  input. In the other scales (units) the resolution is even greater (shown by the end of the video). To achieve this resolution, of course, the overall frequency response of the system had to be drastically reduced and the total response time is slow. In general, it has to be a very slow moving variable to tolerate this. I tried to add some dithering; but there was no noticeable effect, either because I was doing it wrong or because there is already enough noise present in the signal. I don't have a clear answer on that yet. As in previous projects all the data collected is logged directly into Excel (shown at the end)
I'm currently working on a real version using a real weight (bridge) sensor and an instrumentation amplifier. Still making final adjustments. The performance is nowhere near this one and I had to reduced the resolution by one order of magnitude to obtain some acceptable results.
I used this project to improve the Gauges GUI I had already built and the Graph which will be very useful in many future projects, Arduino and Processing are really awesome.



49  Topics / Science and Measurement / Re: Colorimetric CO2 Analysis on: February 22, 2014, 06:23:29 pm
Quote
Camera or no, I probably should log all my measurements to Excel anyway. That way I can look up the history of my aquarium if I think something is going wrong. My project gains another step in complexity every time I think about it  smiley

Apparently your project is getting  more and more similar to this one...  smiley.  Skip to the end so you can see the data logged. The code for how to log the data is in the description... Enjoy.

50  Topics / Science and Measurement / Re: Colorimetric CO2 Analysis on: February 22, 2014, 06:54:20 am
Quote
but I do not know how to use it to interface the serial I/O from the Arduino to another program such as Excel.

It is possible to either directly log the data into Excel with a computer or use and SD card as the transfer media in an Arduino stand alone situation, although  I don't know using C.
51  Topics / Science and Measurement / Re: valve /motor automation on: February 22, 2014, 06:42:05 am
Quote
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.

Quote
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.
52  Topics / Science and Measurement / Re: Colorimetric CO2 Analysis on: February 21, 2014, 02:42:22 pm
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.
53  Topics / Science and Measurement / Re: problems in data measurement on: February 19, 2014, 03:05:33 pm
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.
54  Topics / Science and Measurement / Re: problems in data measurement on: February 19, 2014, 11:14:05 am
From the AD8226 you are using datasheet page 12: http://www.analog.com/static/imported-files/data_sheets/AD8226.pdf  

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.
55  Topics / Science and Measurement / Re: problems in data measurement on: February 18, 2014, 01:49:57 pm
Glad you solved the problem and the code worked.
Check these subjects:
-Precision rectifier
-Input protection diodes.
Quote
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.
Quote
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.


56  Topics / Science and Measurement / Re: problems in data measurement on: February 18, 2014, 07:18:54 am
Since you have enough memory left (or I guess so) you can try to run the code step by step as we use to do with the Z80 and others back in the day and check the results.

Simply repeat the same thing for several instances of i.

Code:
int i=0; // TX 1
{
WriteTXActivationCode(i);
for(int j=i+1;j<8;j++)
{
 WriteRXActivationCode(j);
 int Val=analogRead(analogPin);
 Serial.println(Val);
}
delay(2000);

int i=1; // TX 2
{
WriteTXActivationCode(i);
for(int j=i+1;j<8;j++)
{
 WriteRXActivationCode(j);
 int Val=analogRead(analogPin);
 Serial.println(Val);
}
delay(2000);
// and so on...


57  Topics / Science and Measurement / Re: problems in data measurement on: February 18, 2014, 06:31:42 am
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.
58  Topics / Science and Measurement / Re: Colorimetric CO2 Analysis on: February 17, 2014, 05:57:39 am
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.
59  Topics / Science and Measurement / Re: Colorimetric CO2 Analysis on: February 17, 2014, 05:44:10 am
Hi:

In case you decide to go in a different direction with a different CO2 sensor:

http://www.fischundwasser.de/lang1/co2_sensor.html

Good Luck!
60  Topics / Science and Measurement / Re: valve /motor automation on: February 15, 2014, 06:59:11 am
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.


Pages: 1 2 3 [4] 5 6 ... 19