UVA UVB Sensor

I have a commercial UV Index sensor running but I found an IC sensor chip that would measure UVA and UVB separately and thought it would be interesting to see how the two UV bands varied with respect to each other.

The sensor IC is a Vishay VEML6075. This is a very tiny surface mount chip that would be very difficult for me to successfully mount on a board. Luckily I found a breakout board with the VEML6075 mounted. This board is the UV 2 Click by MikroElektronika a Serbian company. They make a variety of boards like this and microprocessor development systems.

Currently my favorite microprocessor board for this type of project the the Teensy 3.2 by PJRC. This board uses a NXP Cortex M4 processor chip and has plenty of power and IO including 12 bit A/D converter. This board communicates and is powered via a USB port. There is an add on for the Arduino software development system that allows code for the Teensy  to be written. It is really convenient that there are quit a number of companies  making modules like the Teensy and UV 2 Click. It makes projects like this possible without having to work with tiny surface mount parts. All these modules have holes on 0.1″ centers making it possible to plug them into a piece of perf board and wire them up.

The sensor IC is digital and uses I2C to communicate with the processor. Luckily I also found some code to control the sensor written for the Arduino environment. That saves a lot of time and head scratching getting up and running.

All of my environmental sensor are online. To do this for this sensor it is connected to a Win 10 PC out at the weather station tower via USB. A Python script running on the PC reads the serial data from the sensor and sends it to a MySQL server on the web.  A web page script gets the data from the MySQL server, plots the data and serves up a web page.

A sensor like this should accurately measure the energy falling on a horizontal surface. It should see the whole sky from horizon to horizon. It will have a cosine response to the angle of light from the sun. To do this a diffuser or cosine filter is used. This cosine filter uses a Teflon disk mounted at the surface of the housing so nothing blocks the light from the sun from horizon to horizon. The filter is a 3/8″ diameter disk of 1/32″ Teflon mounted in an aluminum holder. The holder is slightly cone shaped to help keep rain water from staying on the disk.

My favorite housing for outdoor sensors is plastic electrical junction boxes. For this sensor I used a 4″ X 4″ X 2″ box. These boxes are designed to be used outdoors making them water tight and UV resistant.

The cosine filter is attached to the junction box with some silicone sealant. The perf board with the sensor and processor attach to the inside of the box cover with plastic hex standoffs and screws.

The processor is mounted to the bottom of the perf board to allow the sensor board to be mounted close to the cosine filter and allow easy access to the USB cable and programming button. Unfortunately the button has to be pressed to put the processor in the program mode. So I can’t program it when it is mounted on the tower in its box.

The completed UVA/UVB sensor on the right mounted on the tower along with some other sensors that look straight up. I need to put a spacer under the sensor to bring it up to the same level as the others. Right now the taller sensor is blocking part of the sky.

 

References:

MikroElektronika https://www.mikroe.com/

Vishay https://www.vishay.com/

PJRC https://www.pjrc.com/

UVA/UVB sensor data http://www.ocrslc.net/sensors/uvab.php

Advertisements
Posted in Amateur Science, DIY, Electronics, environmental monotoring, Imbedded Software, Nature | Tagged , , , , , , , , , , , , , , , , | Leave a comment

IoT Rain Gauge

On thing that is missing from my weather station is automatic reporting of rain fall. I have a manually read CoCoRaHS rain gauge which is more accurate than say a tipping bucket gauge but I thought it would be nice to have a automatic gauge to compare with the CoCoRaHS readings and also to see the timing of the rain fall. The idea was to mount the tipping bucket sensor next to the CoCoRaHS gauge in the same Alter wind screen. It turns out there is not enough room in the wind screen for both gauges. So the tipping bucket gauge is on its own post near the CoCoRaHS gauge. The  rain gauge is not located near the weather sensor tower but it is close enough to the WiFi signal beam to use WiFi for communicating. The location also means that the sensor will have to be solar powered.

The tipping bucket sensor is from the weather meters sold by SparkFun electronics. It provides a reed switch closure each time the bucket tips. A cable with an RJ11 connector is provided.

For the electronics I chose a SparkFun ESP8266 DEV. This board has an ESP8266 WiFi chip along with a USB serial port for debugging and provisions to connect an external WiFi antenna if needed. I mounted this along with a tiny switching regulator on a piece of perf board.

For the solar power I used a small motorcycle size lead acid battery and started out with a 1.5 watt solar panel intended to trickle charge car batteries. I thought about using a rechargeable lithium battery but most of them will not charge when cold and I did not want the hassle of taking it inside during the winter. The 1.5 watt solar panel turned out to be inadequate and let the battery go dead after a week or so. A 5 watt panel would have worked but I could not find a suitable one so I settled on a 10 watt panel. Some software work on power saving might have allowed the smaller panel to work.

There were problems with the tipping bucket sensor. Spiders and earwigs got into the sensor by way of the drain holes in the bottom. The funnel has a grid to keep trash and insects out but the bottom had large holes. The earwigs would mess up the inside and the spiders would build webs that would prevent the tipping bucket from working. A piece of window screen and some duct seal solved that problem.

The battery and electronics are mounted in a plastic electrical junction box. The WiFi signals pass through the box easily so there is no need for an external antenna.

The software uses an interrupt to increment a count every time the bucket tips. For some reason I got 2 counts for each tip. Something to do with the way the interrupt works I suppose. There is timeout for contact bounce so that was not the cause of the 2 counts. No problem though just divide the count by 2.  Initially I was only going to send the tip count each time it incremented but there were problems with this approach. Without some activity the WiFi link would disconnect. I did not see anything in the software samples I looked at to deal with this problem. I settled on sending out the tip count every 5 minutes and whenever the bucket tips. This keeps the WiFi link connected and gives an assurance that the sensor is still working.

The tip count is sent as a HTTP get message to my web server. A PHP script on the web server then sends the tip count along with a time stamp to a MySQL server. Finally a PHP web page script accesses the SQL data, produces a plot and sends it to the user. The plot  shows the accumulated rain from midnight to the current time or the whole 24 hours if asking for data from a previous day.

There are a few enhancements I can think of that I will be working on.

  • Display the rainfall rate
  • Add a display of the rain for my CoCoRaHS reporting period 7 AM to 7 AM
  • Add some way to tell if the system is up and running

 

 

References:

CoCoRaHS Community Collaborative Rain, Hail and Snow Network https://www.cocorahs.org/

Rain sensor data http://www.ocrslc.net/sensors/rain.php

Posted in Alternate Energy, Amateur Science, DIY, Electronics, environmental monotoring, Nature, Software | Tagged , , , , , , , , , | Leave a comment

Laser Cut Gaskets

Now and then I need gaskets for one of my projects. Of course I could cut a gasket out of a sheet of gasket material with scissors or X-acto knife and use punches for the holes but using a laser cutter would make a nicer gasket and I would have a record of the design that I could re-cut anytime I needed another.

One of my current projects is building a filing machine from castings. It needs a gasket for the crankcase cover as the crank runs in an oil bath. It was easy to design a gasket for the filing machine as the necessary dimensions are available in the filing machine drawings. Using the dimensions I drew up the gasket in Fusion 360. There are CAM (Computer Aided Manufacturing) tools in Fusion 360 which even includes laser cutting. There is also available a post processor for Fusion 360 to output G-code for the Merlin software my laser cutter uses.

It only took a few minutes to draw up the gasket and output the G-code. I did a test cut on some printer paper to make sure the design was correct. I had to scale it up a bit to get it to fit just right. (The cutter probably isn’t calibrated quit right.)

The final gasket was cut out of Fel-Pro gasket material 1/32″ thick. I used three passes of the laser. Two probably would have done it but I wanted to make sure it was cut through. The gasket material comes in rolls and the biggest problem was getting it to lay flat in the cutter. From now on I am going to store the material flat.

Here is the completed gasket sitting on the cover it goes to.

Next I have to make a couple of gaskets for my lathe spindle bearings.

I haven’t tried it yet but another approach for a more complicated gasket like a small engine carburetor gasket would be to take a picture of the old gasket or mating surface then use Inkscape to  generate a path and then G-code for the cutter from the photo. I have done this with Inkscape but not for a gasket.

References:

https://jimhannon.wordpress.com/2017/01/10/cnc-laser-cutter-engraver-build/

Posted in CAD, CNC, DIY, Machine Shop | Tagged , , , | Leave a comment

CoCoRaHS sign

I have wanted a sign for my weather station for some time. Signs for CoCoRaHS has just become available so I ordered one. They made the sign with room at the bottom to put your station number. This article is a description of how I made the ID number and attached it to sign.

My home built laser cutter cuts vinyl nicely so I used it to cut the vinyl for the station ID number. Inkscape was used to draw up the lettering. Some test prints were made to get the letters the right size to fit on the sign and then a Inkscape extension was used to generate a gcode file for my laser.

Above is the laser cutting the letters. I used a Cricut mat to hold the vinyl. The speed of the cutting is adjusted so that it will not cut the back of the vinyl or harm the cutting mat.

Above is the cut out letters after they have been weeded. Also show is a piece of Peel and Stick which I use for transfer paper.

Above is the letters attached to the transfer paper and the backing removed.

Above I have applied the letters to the sign and have partially removed the transfer paper.

Above is the completed sign attached to my weather instrument tower.

Above a view of the entire tower. It was snowing when I put up the sign.

Issues:

I cleaned the sign with alcohol before applying the ID. The alcohol started to dissolve the blue. It would be better to use glass cleaner.

I was not careful and got the letters on a little crooked. Take your time and do it right.

I did not have any white vinyl to match the sign so I used yellow.

I am sure the sign would be destroyed by the wind around here if it were only attached using the two screw holes provided. Luckily where I mounted the sign I could use four screws near the corners.

I used Oracal 651 vinyl. They say it is good for 6 years. Time will tell.

References:

Inkscape https://inkscape.org

CoCoRaHS https://www.cocorahs.org/

CNC Laser Cutter https://jimhannon.wordpress.com/2017/01/10/cnc-laser-cutter-engraver-build/

Posted in CAD, Crafts, DIY, environmental monotoring | Tagged , , , | Leave a comment

Bandsaw Stand

I have had a 4X6 inch horizontal bandsaw from Harbor Freight for years. It works reasonably well. I have cut a lot of metal with it. The stand that came with it however leaves a lot to be desired. It is made of thin sheet metal and has become bent and broken. It is too short to use with my roller stands to support long work. It is also too short for me to use comfortably.  You are supposed to be able to lift the saw and pull it around on the wheels attached to the stand but it drags unless you lift it very high. I got busy building the new stand and forgot to take a picture of the old one. If you have one of these saws I am sure you know what it looks like.

Now that my new shop is operational it is a good time to build a better stand for the bandsaw. The legs of the stand are made with some 1 inch square steel tubing. I made a U shaped frame that fits up into the base casting of the saw and attaches to the saw with the same bolt holes as the old stand. Then the legs were welded to the frame at the same angle as the old stand.

Above is a picture of one of the leg assemblies clamped to the welding table. I made a wood pattern to align the legs to the correct angle.

Above is a picture of the leg assembly being test fit into the base of the saw.

Once the leg assemblies were built and temporarily attached to the saw I welded some 1 inch angle to the legs to serve as bracing and to support a pan to collect the chips. At the motor end of the saw a piece of 1/2 inch rod near the bottom serves as the bracing and an axle for the wheels. At the other end of the saw a piece of 1 inch square tubing serves as the bracing and a place to attach the handle for moving the saw. The old stand had a lift up handle but I made this one a pullout handle. Two 5 inch lawn mower wheels serve to make the saw portable.

Above is a picture of the completed saw stand. I can see from the picture I missed a couple of spots in the final painting. The handle is show in the pulled out position. It can be pushed in to get it out of the way. I used an old bread baking pan to collect the chips. It looks a little spindly but the wheels are mounted out and give it a wider stance. One thing I noticed after using the saw on the new stand, it is much quieter, the old sheet metal stand acted like a sound board for the motor noise. All in all a nice little welding project.

Posted in Machine Shop, Metal Working, welding | Tagged , , , | 1 Comment

Mill Clamping

Now that my shop build is finished I can get on with some projects. Some of my upcoming projects will need a way to hold small irregular parts in the mill/drill. Several home shop machinists on the web describe making a mini pallet system to hold parts in the mill.

A mini pallet is a metal plate that can be attached to the milling table or held in a milling vice. The plate has an array of tapped holes that allow toe clamps to be attached to the plate with screws where needed.

I found a roughly 5″ X 14″ X .75″ 6061-T6 aluminum plate in my stock pile that was just the right size for my pallet. Four counter bored holes at the ends allow the plate to be attached to the mill table with cap screws and Tee nuts. The counter bored holes let the top of the pallet be clear of any obstructions. The rest of the plate is drilled and tapped 10-24 on a 1″ grid. Even with the holes drilled for a 40% thread it was very difficult to tap the holes all the way through so I drilled the holes over half of the depth from the back to clearance size. Even so the tapping takes a lot of time, backing up several times for each hole. My plan is to only tap a few of the holes and tap the rest as needed.

The other thing I needed to make were the clamps. These were machined out of 5/16″ X 1/2″ cold rolled 1018 steel. A tapped hold in one end allows a screw to be inserted to adjust the height of the clamp to suit the part being clamped and there is a slot for the hold down screw. I made two sizes 2″  and 1.5″ long.

One thing I wanted to try out was putting a nice surface finish on the clamps. Something that would help keep them from rusting. I hear a lot about Parkerizing (manganese phosphate)  for firearms but not so much for tools. It seems like most steel tools that are black are black oxide treated. To me manganese phosphate is a good choice for a surface treatment. You can get ready made Parkerizing solution but of course I had to mix up my own. To get the parts ready they were sanded on the belt sander then sandblasted. That was the first use of my new sandblasting cabinet. Then I soaked the clamps in the hot Parkerizing solution for about 10 minutes at a time taking them out to inspect and clean based on several tutorials on the web. There really was not much to clean off the parts and I think it would have worked better if I had just let them soak for about an hour or so. This was my first attempt at Parkerizing and I was happy with the results. I do think a bit more attention to surface preparation and a longer soak would have given better results.

One of the suggestions I found on the web was to use a case to store the screws and clamps. I also included an Allen key for the screws in the case.

The picture above is an example of how the mini pallet works. The part is a standard for a Stuart model steam engine. You can see that would be difficult to hold in a vice. The standard needs 4 holes drilled into the feet.

References:

My pallet attaches to the table directly rather than in a vice and has a square 1″ hole grid rather than a diagonal grid.

My Toe clamps a mostly the same as these except for 5/16″ thick instead of 1/4″.

https://www.milsurps.com/showthread.php?t=43247 Contains formula for solution and some how to.

Posted in DIY, Machine Shop, Metal Working | Tagged , , , , | Leave a comment

Eclipse 2017

I was not up to driving over a 100 miles in hope of finding clear sky in the path of eclipse totality. So I decided to make the most of what could be observed at home where we had about a 90% eclipse. Of course it was cloudy.
At my location Longitude: 91,39.26W Latitude: 42,11.90N the eclipse timing was about: start 11:45, max 1:12, end 2:36. There are a number of atmospheric sensors logging data here and it is interesting to see what effect the eclipse had on each of them.

The most obvious thing to look at was the sunlight intensity. This is a plot from my pyranometer which records the total visible light intensity of the sky. The red plot is the calculated intensity for a totally clear sky. The blue plot is the actual intensity. The effect of the eclipse can be seen as the small dip between 12:00 and 14:00. Roughly looking at the plot there is a 10:1 reduction in intensity during the eclipse. The cloud cover stayed relatively constant during that time. Of course just after the eclipse the sky cleared momentarily around the sun.

Above is a plot of the temperature and relative humidity. One would expect the temperature to drop during an eclipse and it did. It is hard to tell how much is due to the eclipse but I would say somewhere between 2 and 3 degrees F.

Above is the UV index plot. The dip in the index is quite clear.

Above is a plot of the infrared sky temperature. The red plot is the air temperature for reference. Comparing the sky temperature with the air temperature will give an indication of the cloud cover. A cloudy sky will have a IR temperature close to the air temperature. A clear sky will have a much lower IR temperature. If calibrated the clear sky IR temperature will indicate the amount of precipitable moisture in the air column. For some reason the IR data gets noisy when the sun is up. The plot shows less noise during the eclipse. The big signal after the eclipse is the sky clearing for a bit.

Above is the barometric pressure plot. I had read that an eclipse could affect the pressure and there is a dip during the eclipse time. But given how much it is bouncing around, who knows.

Above is the wind speed and direction plot. Nothing obvious here but the speed did drop during the eclipse.

Above is the Geiger counter data. I did not expect to see any effect due to the eclipse. There are however two radon washout events ( the increases around 6:00 and 21:00) due to the rain we had at those times.

Above is about all that I could see of the eclipse through the cloud cover. You can see that the sun is not round.

Posted in Amateur Science, environmental monotoring | Tagged | Leave a comment