Weather Station Code

Here is the code I used for the weather station that connects the wifi network, then to a mysql database to save data. I think most of it is self explanatory, change a few passwords and login details as well as the database and table names and it should be good to go.

sprintf(INSERT_SQL,”INSERT INTO weatherstation.SensorData VALUES ( ”, now(), now(), ‘%d’, ‘%d’, ‘%d’, ‘%d’, ‘%d’ )”,temp, humidity, pressure, heatindex, dewpoint);

This line might look a bit odd, 8 elements but only 5 variables, the first table element is a primary key that auto increments, the next 2, now() inserts the server data and server time followed by the 5 variables. These need to be in that exact order when you create the database table.

 

Facebooktwittergoogle_plusredditpinterestlinkedin

On Second Thoughts

After some tinkering and some testing i found out what the culprit was, it was the Barometric pressure sensor that went tits up and was causing the code to crash and reset the micro. The RTC clock also went belly up as well, well it still tells the time, but its the wrong time and for the life of me, i cannot get it to reset. On top of all that, its only been 7 weeks or there abouts outside and the chinesium oxide is taking over everything.

So, a total rebuild is the order of the day and lots and lots of conformal coating to try and mitigate the corrosion problems. One positive is that the solar charging system and batteries are in really good order. 7 weeks outdoors and the battery voltage was 4.17v so I cannot complain at that.

I do not have a spare pressure sensor so its going to be a few weeks to get parts out of china to fix it. In the mean time, the code is working at least and that is something.

Facebooktwittergoogle_plusredditpinterestlinkedin

It DIED :(

So I connected to the weather station the other day to be greeted with SD Card not detected. Poo, is about all I think about that. I am not sure yet if it was the card that died, or if it was the card reader that died. So I figure that its time to make some hard decisions and do what I probably should have done in the beginning and that was use a MYSQL database and just send the data across the home network or across the interwebs to my webserver that hosts this blog. Which kind of sucks because I have been putting off having to learn SQL or PHP for a long time.

So off to google to do some google foo and I find that there is a nice MYSQL library that takes care of all the drudgery, which is good as it will save me a lot of work.

First step was to jump on the webserver and make a new database and a table to save the data to. Job Done!

Next up was to write some code to connect to my home network and then connect to the database. Job Done!

Fire it up and it connects to the network and the database and sends the data just fine. Now all i have to do is pull the weather station down, bring it inside and upload the now modified code as well as fix the problem i was having with the rain sensor. It kind of sucks that I have lost all or most of the Febuary data, but it is what it is and I should never have relied on an SD card to do the job long term. Less moving part, less things to go wrong, oh well, i know for next time.

Facebooktwittergoogle_plusredditpinterestlinkedin

Cannot Trust Ebay Adaptors

So after coming home from the beach aka an activation, i put the uBitx on the bench and gave it a bit of a test out. Seems it needed some calibration work, the audio was way to tinny, so a bit of BFO fiddling was in order and a little LO calibration was needed also as it was way off frequency.

Well, I do want to say this about the uBitx calibration routines, they suck. There is no real way to get the radio any closer than 50hz off frequency. This is not good enough really and I know i can do better, but I am going to have to do a lot of code reworking so i can make the changes I require.

Anyway, thats not the point of this post, while i was sitting here trying to diagnose how I bricked the uBitx for the 4th time, i found out the lack of RF was a broken adaptor. Seems the arse fell out of it and there was no antenna thus no RF. Yeah Me 🙂

Facebooktwittergoogle_plusredditpinterestlinkedin

uBitx First Run

So i got busy today and wired up the uBitx. Turned it on and tuned around a little to find some signals, well there was not much going on anywhere but I did manage to find this one ZL on an other wise dead band. Its good to know that the receiver works, now i just have to wire up a mic and check its working on transmit. But that is going to be another day.

 

 

So I recorded a little video from tonight’s 7.130 dx net. I have been giving the receiver a good workout to see how I like it. So far, to be honest, I think i prefer the Bitx40 over the uBitx. Though, it might be I just need to play with the IF and BFO settings to move the bandpass around a little to where I think it sounds better.

Facebooktwittergoogle_plusredditpinterestlinkedin

Its CNC Its Dynamite

I got rather excited this arvo and setup the mini cnc mill and went and bought some 1mm aluminium sheet with the grand idea to cnc out a front panel for the uBitx, because lets face it when it comes to cutting a straight line I suck big time. So i got on the computer and fired up Aspire Vectric and laid out a front panel with all the mounting holes etc being peck drilled for me to drill out to the right size later on the drill press. Things were going quite well until i realised i made it 100mm too short. Oh well, its now a tomorrow job.

 

Facebooktwittergoogle_plusredditpinterestlinkedin

QRP L Match With SWR Bridge

So with the new year comes new projects, I am not going to set out what my overall plans and goals are as I have started way to many things and never bothered to see them through or to complete them. So with that in mind, I am building a L match

Its hard to make out, but you can just see the LED glowing, the signal is 10v p-p from the signal generator, the load is a decade resistance box. At infinite swr there is 1/2 the p-p voltage at the junction of the rectifier and capacitor. As swr approaches 1:1 the voltage drops to a point where the LED turns off. Its simple and its a winner.

It will get paired up with the sotabeams switched inductor and a 8-370pf air capacitor. as an L match. Should be good enough for the kinds of girls i go out with. Below is the schematic I am following for this project and a link to the authors site is at the bottom of the page. In the final build I will use 3w 50ohm resistors and the diode i used was a Schottky, i don’t recall the numbers it was just something i had in the parts box, I used the Schottky for its lower voltage drop, though that is probably not all that critical seeing that LED’s are current limited, not voltage.

Link to authors blog post: HERE

 

Facebooktwittergoogle_plusredditpinterestlinkedin

VK4FFAB Weather Station Up And Running

So the VK4FFAB weather station is all systems go. Well, kind of. I still need to put the front door on the box and make sure all the code is working and I also am still waiting on the water depth sensor for the rain fall gauge. So now the serious testing begins as I want it fully functional before the new year for data collection.

Once this is all done, I want to add environmental data monitoring for things like light intensity, UV, gas levels, dust levels and the like.

 

Facebooktwittergoogle_plusredditpinterestlinkedin

Thieving Bastards

So the other day while out shopping, we came home and a neighbour from up the street informed up that some woman was casing camper trailers and carvans up and down the street looking for easy targets. He got her rego and reported to police, but I thought i better upgrade security here just in case the bitch comes back. Added a new wheel clamp, and a bolt and lock on the tow hitch to go with the existing chain thought the wheel trick. It wont stop them, but it will slow the bastards down.

Facebooktwittergoogle_plusredditpinterestlinkedin