Restoring an AAG rain gauge #2

I’m pleased to say that the rain gauge is now in place and all connected up. It appears to be counting properly (unlike it did when I had it on the desk for testing), but I’ll keep an eye on it.

Posted in Environment, Projects | Tagged | Leave a comment

DIY Stevenson screen #4

I’ve been meaning to post this for a while. Just a photo of the Stevenson screen, as complete as it’s going to get for the time being.

Posted in Environment, Projects | Tagged | Leave a comment

Swimming, 28th January 2020

Same set again, and by contrast with yesterday I had the pool to myself for a fair part of my session.

Today went pretty well. My times were probably quicker on average throughout the 50m reps than they have been for quite some time. I did have one unfortunate stoppage where I skipped a rep however. After about ten reps I decided my jammers needed tightening, but the cord became knotted as I undid it. I tried to swim another rep as they were, but it wasn’t going to end well, so I had to skip a rep to undo the knot and tighten them.

With the 25m reps I was also doing pretty well, but I ran out of time to complete them and had to finish after ten.

Posted in Swimming | Tagged , | Leave a comment

OWFS on a Raspberry Pi

I have an old Raspberry in my Stevenson screen and I’d quite like to hook it up to my 1-wire weather sensors rather than running the 1-wire connection into the observatory to my desktop system there. OWFS looks like it might be a sensible way to get access to the data from all the devices, but it has taken me a while to work out how to get it all set up under Raspbian 10. I have owfs working on my Mint 19 64-bit Intel desktop, so I didn’t think it should be too hard to get set up having done it once.

For the moment I just have a DS2490R plugged in on one of the RPi USB ports. I thought I’d try to get it to show that then I’d be in a good place as regards connecting up all the sensors.

I installed all the owfs packages just using

sudo apt-get install owfs

and then had to get my head around the /etc/owfs.conf configuration file. The syntax is a little unexpected in that it allows the specification of values that apply to all of the OWFS components (owserver, owfs, owhttpd, owftpd) or specifically one of them, or all but one of them, but once you’ve got your head around it then it’s not too bad.

No matter what though, I couldn’t get owserver to start. After much grovelling in search engines I found that the solution was to edit the systemd configuration for owserver using

systemctl edit owserver

and enter the following to override the existing configuration:

[Service]
ExecStart=
ExecStart=/usr/bin/owserver -c /etc/owfs.conf --foreground

[Install]
Also=

That effectively removes the existing ExecStart setting and recreates the same line with the addition of the “–foreground” parameter. I’m unconvinced the “[Install]” section actually does anything, but it doesn’t seem to harm anything either.

This allowed me to get owserver running with

systemctl start owserver

When I started owfs in a similar way, I discovered that in the filesystem it created I had multiple copies (sometimes I managed up to four!) of the device node for my DS2490R. Eventually I guessed that owfs must be reading the configuration file multiple times and processing the device once for each, or talk to the server multiple times with the same result. Looking at the common actually running, the parameter -c /etc/owfs.conf did indeed appear multiple times on the command line when it was only present once in the systemd configuration. To clean that up I edited the configuration file:

systemctl edit owfs

And entered:

[Service]
RuntimeDirectoryMode=0755
ExecStart=
ExecStart=/usr/bin/owfs %t/owfs
ExecStop=
ExecStop=/bin/umount %t/owfs

to remove the reference to the configuration file altogether. The last two lines correct the umounting of the filesystem on exit as the default configuration called /usr/bin/umount, which doesn’t exist.

Restarting owfs then gave me what I’d been hoping for in the first place:

$ ls /run/owfs
81.0F9C3A000000  bus.0  settings  statistics  structure  system  uncached

(the first entry being the device node for the DS2490R).

Now I need to start thinking about how I’m going to set everything else up, but for a start I could just connect the 1-wire kit into the DS2490R and see what happens.

For reference, the configuration lines I have in my /etc/owfs.conf file now are:

!server: server = localhost:4304
owfs: allow_other
http: port = 2121
ftp: port = 2120
server: usb

The allow_other option should allow non-root access to the device files. I have also edited /etc/fuse.conf to add

user_allow_other

which I believe is also required.

Posted in Computing, Linux, Raspberry Pi | Tagged | 2 Comments

Swimming, 27th January 2020

Same set as last week today, but in a far busier pool. I wonder how many are on their post-Christmas fitness binge and will run out of steam over the next couple of weeks…

Another improvement on my previous session, with my first and only failure of the first part of the set on rep sixteen, and then I managed ten of the 25s before my arms just gave out and I just couldn’t produce power any more.

Happy with the improvement. Hopefully it will continue tomorrow.

Posted in Swimming | Tagged , | Leave a comment

Summary of Robert Brown Arduino dew controller build

Overall I’m very happy with this project. It seems to work very well and is a huge improvement on not having dew straps. Generally it’s a pretty straightforward build with nothing really that much more taxing than making sure LED polarities are correct and so on.

Over the last couple of days I’ve built a third controller that I’m in the process of testing. My next step is to build some focuser controllers, but I do also intend to build one more dew controller to go with my travel kit. Depending on my experience with the focuser controllers I might actually make single box containing focuser controllers, dew controller and RPi to reduce the number of things I need to carry around, but without an LCD display and probably the dew strap LEDs. It will probably be wise to keep the fan as my travel kit often goes with me on summer holidays and even in France it can be as much as 30C overnight.

I think I will probably also swap my first controller from the 6P4C connectors for the temperature sensors to GX12 plugs, but there’s no real hurry for that.

Another thing there’s no urgency over is the possibility of an improved design for the temperature sensors themselves. The ones I have (which I believe are the ones recommended) have the sensor inside a metal barrel about 60mm long and 8mm in diameter, which isn’t always the most convenient shape to use on a small OTA. I’ve been wondering if I could use the DS18B20 case style that’s used for the board temperature sensor and perhaps epoxy it to a small piece of stainless steel sheet. With the wiring I think the entire sensor end need only be about 10mm by 30mm which might be more practical for small OTAs.

Actually, that’s probably something else worth mentioning… Attaching the temperature sensors. I’ve no idea what the best way to do it is, so what I have at the moment is a strip of thin camping mat long enough to go right around the OTA. The sensor goes underneath that, and it’s all held in place with a velcro strap, just behind the dew heater itself.

Posted in Astro Equipment, Astronomy, Projects | Tagged , | Leave a comment

Swimming, 24th January 2020

Yes, same set again 🙂

Today I didn’t fail on the first set until rep fourteen, so again an improvement on the previous session, despite feeling tired again. Sadly the 25s were again a disaster. As long as I keep improving though…

Posted in Swimming | Tagged , | Leave a comment

Robert Brown Arduino dew controller build, step by step #18

So, testing…

I downloaded the Arduino code from Sourceforge and unzipped it to find a directory called “Tests”, which seemed quite straightforward. In the documentation there are a list of tests n the order they should be run, but I think it actually works out that the subdirectories of “Test” are arranged so that they’re in the correct order when listed alphabetically. The first was “TestBlueTooth” which I skipped as I didn’t build the Bluetooth interface and moved straight onto the second, “TestBoardTempSensor”.

I’m a Linux user and I had the default set of Arduino tools already installed on my Mint 19 desktop system. There is a “Readme.txt” file in the Tests directory that talks about where to put the various library files for Windows, but no information for Linux so I decided that initially I’d just try compiling things and see what happened. I plugged the dew controller USB connection in, set the correct board type in the tools and made sure the device name was /dev/ttyUSB0, but even so what happened was a horrible mess of errors. That led me to download the latest version of the Arduino tools from the Arduino website and try again. Better, but still no cigar. It did create a subdirectory of my home directory however, called “Arduino/libraries”, so that seemed a reasonable place to put the library files. I copied all the subdirectories of the unzipped “myDewController Libraries” directory into that and tried compiling again. Success!

From the Arduino IDE tools menu I opened the serial monitor and uploaded the sketch. In the serial monitor I was rewarded with:

I followed the same process for “TestDHT”:

and “TestDSB1820TempProbe”:

(I’ve just noticed that is in fact out of sequence). From then on it’s a little more complicated, and requires that the 12V supply be plugged in and switched on.

“TestFanandLEDs” runs the fan at various speeds and sets the RGB LED to each of its possible colours, so that’s a visual check. At first this didn’t work for me and after checking continuity of the connections, close inspection of the PCB showed some soldering I wasn’t happy with. I so hate having old eyes 🙁 I redid the soldering and it worked once reassembled.

“TestLCD” displays a message on the LCD screen. The display I used for this build worked perfectly first time, but on my first build I had to adjust the brightness using a small adjuster on the back of the display. It’s the blue component in the top right here:

When it’s right, you should see this:

If you’re nervous, disconnect the power and USB, adjust it and then reconnect everything. Or use a plastic-bladed screwdriver to adjust it. Or, like me, just go for it with a normal small steel-bladed screwdriver and be very careful not to short anything out.

The last test I ran was “TestPWMOutputs”, which sets the dew heater outputs to 0%, 100% and 50% in turn. The dew strap indicator LEDs should change brightness at the same time. It’s quite hard to tell that they’re lit in this photo, unfortunately.

With all the tests passing I set the controller up on the mount and connected everything up, including a USB connection to my pier-top computer which allowed me to run the Linux “myDewControllerPro3L” application to monitor the controller and adjust the settings.

After my first night using the controller I noticed that dewstrap 2 was on according to the LED, but not warm. I brought the unit inside again and found that even with that channel full on and the LED lit, there was no voltage across the dew strap connector. As the LED and dew strap are connected directly together on the PCB that pointed to a connection problem between the PCB and socket. I opened the case up to discover that the socket I’d plugged into the PCB for the dew strap connector had one of the pins pushed back out of it so there was no connection. Clearly I’d not put it in properly the first time. I made sure this time, replugged it and now everything is working as it should. I’ll put it back on the mount tomorrow.

Posted in Astro Equipment, Astronomy, Projects | Tagged , | Leave a comment

Robert Brown Arduino dew controller build, step by step #17

To complete the testing I need to make up the temperature sensor plugs. This wasn’t a major problem. The black connector part unscrews from the metal body revealing the pins for connecting the wires, so it’s just a case of loosening off the cable clamp, feeding the metal body onto the cable and then soldering on the wires. I found it necessary to add a couple of turns of insulating tape around the cable to give the cable clamp sufficient to bite on, but otherwise reassembly is just a case of screwing the metal body back onto the black plug (hold the plug so the individual wires don’t get twisted inside and perhaps touch each other or get damaged) and doing up the clamp once again.

And here’s one I made earlier.

Posted in Astro Equipment, Astronomy, Projects | Tagged , | Leave a comment

Robert Brown Arduino dew controller build, step by step #16

I’ve now finished making all the other connectors, so it’s time to start testing. I have already plugged in the 12V supply and the magic smoke didn’t come out, so that’s a good start.

Posted in Astro Equipment, Astronomy, Projects | Tagged , | Leave a comment