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.



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

Posted in Amateur Science, DIY, Electronics, environmental monotoring, Imbedded Software, Nature | Tagged , , , , , , , , , , , , , , , , | 1 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

1/9/2019 Just add a rain sensor. This sensor reports when it is raining. See

https://jimhannon.wordpress.com/2019/01/01/rain-sensor/ for details.




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

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

Rain Sensor https://jimhannon.wordpress.com/2019/01/01/rain-sensor/


Posted in Alternate Energy, Amateur Science, Electronics, environmental monotoring, Nature, Software | Tagged , , , , , , , , , | 2 Comments

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.



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.


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.


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.


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

Grillin’ With Wood

My vintage Weber grill is rapidly approaching the end of its usefulness.

There is a hole rusted through the bottom, one of the vent covers has corroded off and the lid handle is about to fall off. When we lived in town one of the neighbor kids used it for target practice with his BB gun.
I have been looking for something to replace the Weber and I also got to thinking, why am I paying for charcoal to grill?

So I started looking for something that would burn wood. For some reason most everything that burns wood is on the ground like a fire ring or a grate over a fire pit. Now I really don’t like to bend over to grill so this was a problem. Then I thought about the grills you see in parks. I think they are really intended for charcoal but they are open and you can easily burn and tend a wood fire in them.
Turns out there is a company right here in Iowa that makes park grills Pilot Rock.

Their grills are intended to be permanently mounted in concrete but I really want mine to be moveable. Instead of putting the base in concrete I welded the support tube to a plate welded to a truck brake drum. That brake drum weighs more than the grill. The next thing to figure out is where/how to store some firewood and keep it dry.

First burgers on the grill.

Posted in Cooking | Tagged , , , , , | Leave a comment

Simple Scissor Lift

In building my shop I spent some time thinking about how I was going to put the ceiling up. Metal pole building sheets were my choice for covering the ceiling. They are light weight, fireproof and already painted. The problem is the ceiling is almost 12 feet high and the panels are 3X10 feet. So how to get them up and hold them while attaching the panels.
I finally decided that a scissor lift would be a good idea. After looking at a number of commercial scissor lifts on the web I was coming up with all sorts of complicated designs. Then I remembered the saying KISS “Keep It Simple Stupid.
What I finally came up with consists of 8 8′ 2X4’s for the frames and some more bits of 2X4 for spacers. I used screws to attach the spacers making it strong and easy to take apart.

The center pivots are 3/8″ bolts, elastic stop nuts and washers. The end pivots are also used for the come-along to raise the lift so they need to be strong. I used 1 inch steel rod for this. There is also a safety chain to prevent the lift from collapsing completely if the come-along or its straps should fail. Your arms are inside the lift when working the come-along and a failure could easily break an arm or two.

To use it I drag it in place and slide a panel on top of the partially lowered lift. Operating the come-along raises the panel until it is in place. The position of the panel can be adjusted by dragging the lift or pushing the panel around. The panel is then attached to the rafters.

The only inconvenience with the lift is that the come-along is slow and fiddly to lower under tension. It takes twice as long to lower the lift than it does to raise it.  When I am done with the ceiling the lift will be taken apart and the pieces salvaged for future projects.

The lift has done its job and the ceiling is done.

I have posted a video on YouTube showing the lift in operation putting up ceiling panels. https://youtu.be/w5AClCLYUk0

Posted in DIY, Machine Shop | Tagged , , | 1 Comment

CNC Laser Cutter / Engraver Build

I see a number of articles on the WEB about using a blue laser around 2 watts for cutting and engraving. A lot of times the laser is attached to a 3D printer. Now I have a 3D printer but I wanted a cutter that was a bit larger and did not want to bother with swapping the laser for the print head. So I built a carriage for the laser based on  reprap Prusa technology.

The usable area of the bed is about 16″ by 16″ (400 by 400 mm). Unlike the 3D printer the laser is moved in both the X and Y directions rather than moving the bed in one direction and the laser in the other. A piece of 3/4″ plywood serves as the base and it sits on rubber feet so I can get my fingers under it to pick it up. The carriage and gantry move on 8 mm rods with dual linear bearings. I used two steppers to move the gantry in the Y direction to provide even force at each end of the gantry. There is no Z axis as the laser can be refocused for different height materials. There is a piece of sheet metal on the base that serves to protect the plywood from the laser.

Parts like the motor mounts and bearing supports are 3D printed and are based on the Prusa parts. For the electronics I used the Arduino mega with the ramps 1.4 interface. Since I have 2 steppers for the Y axis the Z axis driver on the ramps was used as it has two stepper connectors. To get this to work I modified the pins.h file in the Marlin software to swap the Y and Z axis.


The laser is turned on by use of the fan circuit in the ramps board. This is really handy as the circuit provides the 12VDC needed by the laser and there is  Gcode functions to turn the fan on and off.

There is a bit more work to do on it. The cables need to be properly dressed. Then there is all the safety issues. It needs a lockout switch and an enclosure to prevent any stray laser beams and control the fumes.

Repetier-Host works well for testing and for sending the Gcode files to the cutter. The manual mode lets me move the carriage around and turn the laser on and off.  The first test I did was using handwritten Gcode to cut a 20 mm square. For generating more complex designs I have settled on using Inkscape for drawing and have tried both Gcodetools and J Tech Photonics Laser Tool extensions to generate the Gcode. So far I have had better luck with the J Tech tool.

Here is a short video showing cutting the fabric.

I did a number of tests to see what materials could be cut with this laser cutter and what cutting speeds to use. Regular paper cuts very easily. The cuts don’t even have a burnt looking edge like thicker material. Card stock cuts nicely with a slightly slower cutting speed. Cereal box cardboard would take a slow cutting speed and several passes to cut. Normal thickness cotton fabric cuts easily. I haven’t yet tried other types of fabric. Cricut vinyl cuts and you can adjust the cutting speed to cut just the vinyl and not the support material. It will mark wood with nice clean lines.


Above is Cricut vinyl cut with the laser and below is after it has been weeded.


Below is a piece of pine that has been engraved with the laser.


I see many interesting uses for this laser cutter especially once I get better at using Inkscape.

Posted in 3D printing, CAD, CNC, Crafts, DIY, Electronics, Machine Shop, Software | Tagged , , | 4 Comments