Hi: This was my first Arduino/Processing project and the most complex I have attempted. This is video part 1. It shows only the hardware prototype built for the system. An Arduino Duemilanove controls the bench operation under main computer commands. The main computer is running a program written with Processing 1.5.1. and sends orders to Arduino and receives data from it, but Arduino executes most of the functionality in an autonomous way. For example, Arduino receives the order to move left, right, reset car, increase or decrease pressure to the next step and it controls the order execution entirely, informing Processing when the order is completed. Solenoid valves are used to control the pneumatic system to apply the different pressure levels to the Gauges required by the test, with an air compressor used as the pressure source. The system can test simultaneously up to 4 Gauges with up to 100 psi full scale at this time. There is a camera mounted in the moving car with spot lights to take live video and pictures of the Gauges being tested by the Processing software. The pictures are magnified and analyzed with help from the software to find if the readings are in or out of tolerance. This increases the accuracy of the readings taken compared with simple operator observation. The code includes many software interlocks to prevent the user from taking the wrong action at all times and guides the user all along the test procedure which improves repeatability considerably. Many things are monitored like all power supply voltages, inflation and deflation times for the different pressure steps, obstructions and/or leaks in the pneumatic system, gauges positioning on the screen, camera car positioning, overpressure detection, inactivity timers, etc. Also included are events loggers as .txt files to record every action and results including buttons pressed by the user with time pointers of occurrence. There are also several data loggers in Excel. Gauges pictures are also stored for each of the test points. At the end a summary of the tests performed is generated with all the measurements taken and the results. The Gauge scale is also analyzed for non linearity, rotation, and pointer centering. These parameters are also calculated and shown at the end for each Gauge in numerical and graph formats. Building the Processing code was the hardest part taking about 95% of the time. The major difficulty was that to test anything, the program must be run and the test conducted to the point where any code correction was made and that takes several minutes specially at the end of the tests when several gauges are tested at once. There is no way around that. The prototype was built with what I could find at local hardware stores on weekends and salvaged parts. Its purpose was to have a test platform to prove concepts and write the software. I hit the pause with this project since the next step is to build a more sophisticated test bench for real and conduct more tests and that's going to take some serious money. The pressure sensor required alone is $750 for it to have the accuracy required by the standards to test all possible gauges ranges from 30 to 100psi with 1%FS accuracy. At this time I'm entering temp, atm pr. and relative humidity manually as that was not the main goal of this project. That monitoring capability will be added later on. The pneumatic system I built has leaks; but that's OK for now as the leakage rate value is determined by the system and known. It must be corrected though. The pressure source value is also entered manually at this time by visually reading the gauge under the bench. I did not wanted to spend more money in another pr. transducer for now. I will have to move to an Arduino Mega or expand the inputs an outputs of the Duemilanove I'm using again. I have all input/output digital pins in use and expanded already by 8. The analog inputs are almost exhausted with only one left. In order to add anything expansion will be required. So far I have tested many concepts and ideas and they are implemented and working; but since this is a massive project I guess it is also the never ending story... There are hundreds of different Gauges out there with the intended range and making a universal calibration system capable of testing most of them is not easy task. Built with Processing 1.5.1 and Arduino Duemilanove.
Can you post a list of the all Gauges you need and the pins where you are planning to input them?. The picture is just too big and I has to be moving it all around to get the general idea. Also the min scale value, number of major divisions and full scale of each of them will help understand what you really need. You will need to have that list handy anyway, to write any code. I also suggest you make a preliminary drawing (could be by hand) of the set up you want to have on the computer screen, being realistic of course. Don't shoot to high as it could get troublesome to build it on a first project. You can put whatever you want and then begin to remove what you don't really need to make the project work at first. In later versions, you will always have time to add and improve; but you have something running already. Thanks
I would have thought the DS18B20 was the ideal choice for a weather station
It all depends on how accurate you want to go; but as mentioned before, the sensor used is just a matter of choice. The question I have is if there is a way to implement that kind of math with Arduino other than going multiMap();? There maybe applications requiring that. Maybe a link will help. Thanks.
Your planning for things useful in the future might be better devoted to research for simpler alternatives - like using DS18B20s, which don't need any of that stuff
You are right, there are other alternatives and more time should be placed to research that. Problem is, there is so much out there that its hard to find it all. I have used LM35; but did not know about the existence of the DS18B20. Thanks for letting me know.
There are also other things to consider when selecting the sensor like accuracy for example and depending on the application some sensors maybe better suited than others. For example, from the DS18B20 datasheet(http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf) the accuracy is 0.5 Celsius in the range I need and for the ST-100 I'm using it is 0.1 Celsius which is way better.
Maybe I did not phrase the question correctly since this particular case was not what I was thinking of when asked the question. This is just an example. There maybe other situations when complex math maybe required (particularly for linearization) and I basically wanted to know if Arduino could handle that kind of math in a stand alone configuration without help from the computer. This is what I was referring as useful in the future.
(There maybe errors in the formulas; but that's not important for now) The question is this: Can this equation be implemented in the Arduino code somehow or the best choice will be getting some samples and use multiMap(); for example as discussed here: http://forum.arduino.cc//index.php?topic=195788.0?. When I saw the complex math on this formula, I didn't even try; but I want to know as it maybe useful in the future. Thanks.
I'm glad to see your progress with this project... a very neat one by the way. As a simple suggestion, I think it's better to use a potentiometer in your voltage divider that will allow you to adjust the fraction of voltage you are going to feed to the OP Amps more precisely. This will simplify the code later on. Simply use 2 resistors as usually for the voltage divider; but place a pot with a resistance value around 10 times smaller than the value of the resistor connected to ground. Take the voltage from the pot wiper and send it to the opamp. This will allow you to precisely adjust the voltage fraction using 5% resistors instead of 1% ones. Easier to experiment with the divider set up that way. Good Luck
I discovered Processing/Arduino exactly 2 years ago and concluded like you, that was powerful combination I could use to build many many things I always wanted to do. If you want to learn Processing, I recommend you to set up a project you want to work on and begin the build up. That's how I learnt it by building things. It will take a while; but you will be amazed how much you've learn in the process. There are tons of examples out there and the guys in the Processing forum are extremely savvy and helpful. Processing is a super powerful language; but as you mentioned, you don't need all its possibilities. Many of the instructions and features it offers are directed to artistic work and for some you will see its potential engineering applications. I always try to use low level and simple instructions as much as I can; but you will see they have instructions that will take your breath away when you realize how powerful they are. Learning it, is not easy though and takes a lot of time, so be patient...
Thanks. Highly appreciate your comment. Regarding Processing version 1.5.1. It is the version I've been using forever and for some reason (laziness I guess) I prefer to write the code using it. Every time I try to run the codes I write with 1.5.1 using 2.03 some problems pop up. I'll try to update in the future. Maybe I'm just a little retrograde... Thanks again.
PD: I forgot to mention that I built the Recorder and Gauges in a way they can be used independently or combined with other types of instruments also. I used it as a Weather Station; but very easily can be reconfigured to measure any other variables provided they are low frequency.
This is a Weather Station configured for indoor climate monitoring. I gave this project a "Retro" look and added a 3 Channels recorder including some features like: -Events detection and logging -Data logger in excel files -Rate monitoring and logging -Up to 3 Cams video monitoring. -Pause, Fast Forward and Rewind functions. -On screen unit conversion tables. -Alarms -Peaks detection. -Sensors Power Supply Monitoring. -Moving Magnifier Glass. -Possibility of taking screen and cams still pictures. -Cams video zooming and panning (by software) -Emailing events (this feature is the only one pending and emails are not sent for real yet).
This time I'm using real sensors for the Atmospheric Pressure and Temperature. For the Barometric Pressure I'm using the SB-100 sensor from Apogee Instruments, Inc (http://www.apogeeinstruments.com/barometric-pressure/) This is a high quality professional sensor providing an amplified liner analog output. It is a very sturdy accurate and reliable sensor and very easy to use as it requires no amplification and can be connected directly to one of the Arduino analog inputs. For the Temperature I'm using the ST-100, another high quality professional sensor very reliable and accurate (http://www.apogeeinstruments.com/temperature/.) from the same company. It is also connected directly with no amplifier to another Arduino analog input. The linearization equation provided by the manufacturer in the data sheet was pretty straight forward to implement in the Processing code. For the Relative Humidity there is no sensor connected at this time; but a potentiometer is used to simulate variations to show in the video as this is a very slow varying variable. In the video, variations in temp were introduced by touching the sensor with the fingers and you can see how sensitive it is. The atmospheric pressure variations shown in the video were introduced by blowing the sensor with mouth air. Also very sensitive. This code in CPU and memory usage intensive and when run together with the screen video taping software I'm using, it slows down a little bit. Built with Processing 1.5.1 and Arduino UNO.
This is phase 1 of a Power Line Monitor Project. Four potentiometers are used to simulate change in the AC line variables, voltage, current, frequency and phase angle difference between voltage and current. These are the primary variables used to calculate the remaining ones. THD (total harmonic distortion) is not calculated at this time, but I fixed it to 1% for representation only. The next phase of the Project will be implementing the necessary hardware and software in the Arduino code to measure the primary variables for real and send them to the computer. Built with Processing 1.5.1 and Arduino Uno.
Sorry, I don't know Visual Basic; but maybe you can try to just rewrite the code using VB instructions. Actually most of them are low level and compatible with other languages. Perhaps someone here knows VB and can do that.