I started this little project the other day when I saw that Instructables had posted a competition for the use of Sensors, however its turning out to be a bit more interesting.
My original idea was to take a very simple project (examples in one form or another are available all over the web) add a sensor and reprogram it in a way that would allow the sensor (a Light Dependent Resistor) to control the lights.
After all a lot of the wiring on projects can be the same its the programming that changes the way it works.
Anyway - I put it all together, got it to work and realised that it was quite a sad effort. so I decided to try to link the serial port back to the computer to send real time data to a graphing package.
You could use this as a diagnostic tool to monitor and display results from your robotic sensors to ensure that they perform as required on your projects. Yes you can do this in the monitor window of the Arduino software, but you cannot save or trend the data in that application.
More interesting uses for this type of project would be to monitor how light levels change throughout the day comparing things like cloudy days to brilliantly sunny days.
Another option is as security sensor to track entrances into a room.
Once I had captured the data I used excel 2013 to chart it, but also later on you can see that I have had a go with Plotly as well and found it to be a really good tool for creating quick and simple representations
If this interests you then please read on - if not then please take a look at some of my other projects, but I hope you enjoy all of them.
|Ten||Light Emitting Diodes|
|One||Light Dependant Resistor|
The Arduino is an UNO, the LED's are low values and the Pot is one I had laying around.
The LDR is one salvaged from my Cybot which was modified in a previous guide see
I found a good site for calculating the values for resistors - see the first picture on this guide, the link to which is just below here. I used 33 ohm resistors - these where considerably smaller than my first attempt using some a rescued from an old alarm system - they where way too big leaving me wondering why nothing worked when I switched the "finished thing on"?.
There are two bits of software and one addon required for this project to work:
The Arduino IDE is free to download from the following location and comes as either an install of zip file - I like the Zip (easier to use and and be run from a flash drive for portability)
MICROSOFT EXCEL - unfortunately not free - I have office 2013 on a windows 7 computer
Finally the most important bit is the addon - this is for Excel and comes from a site called PRALAX
The file you want is PLX-DAQ and runs as a macro from inside Excel. This is a great little file as it can be used to monitor any serial port and gather the resultant data sent through it. All that is required is some specific lines of code in the Arduino sketch to tell it the send data to specific cells in Excel.
You also need to specify the port speed and ensure that the Arduino is set to the same speed - initially I tried 9600, but although this worked for the test spreadsheet that only sent text to excel from the Arduino, I needed to set it to 128000 for the final project as I would be monitoring the response times for the LED's dependent upon the resistance of the LDR at any given time.