I really like the Airspy HF+ SDR. Mine came with firmware 1.0 and I found it a bit of a puzzle to upgrade to the latest version 1.5 dated 2018-02-22.
First, you get the firmware (with flash bat file) not from the Download page but oddly right down the bottom of the Products page here. (I learned this from the excellent discussion group).
Second, you must be running Microsoft Windows to flash the firmware. This seems like a poor choice given that Airspy have made good choices in other areas such as open sourcing the drivers on GitHub here and providing a build of spyserver for the Raspberry Pi and similar ARM boards.
You can see what version of the firmware you have in the Source tab in SDR#.
Mine is now showing R1.5 but originally it was showing 1.0.
Because of a bug in 1.0 the simpler flash procedure outlined in the README doesn't work and you must open the box and short two contacts labelled Erase. You can see them here in this picture with the back off just below the shielded area (click image to enlarge):
I won't reproduce the README here as it might change but the process works and you see firmware update progress bars and as I said when you run SDR# it shows the new version.
Friday, February 23, 2018
Thursday, February 22, 2018
Low cost carry bag for Elecraft KX3
The KX3's front face controls makes it vulnerable to damage when being carried with other items. In the past I've put it in a solid case but it's rather large. This week I found a camera bag for $20 that fits it very well. It's a Manfrotto shoulder bag, Amica 25W.
These bags are $20 at Fletchers Fotographics in Chatswood. The price seems better than online so perhaps they're running down the stock.
Pockets on the side can carry mic and a small end fed antenna.
It's a snug fit and won't allow operation while inside the bag.
I've been using 3S LiPo batteries from a quadcopter and one of these might almost fit in a side pocket.
These bags are $20 at Fletchers Fotographics in Chatswood. The price seems better than online so perhaps they're running down the stock.
Wednesday, February 21, 2018
First electricity bill after installing solar PV
Just over five months ago we installed 3.3kW of solar electric panels on the house. I've just received the first bill for a three month period with panels.
Our usage compared to the same period in the year before was down 46% plus we got a feed in credit of $82.
Last quarter our bill was $318, this time it's $226. Note that the included supply charge is $76.
We spent $6,000 on the system so at this rate it will take 15 years to pay for itself if electricity stays at the same price and you don't count interest on that amount.
Our usage has changed over summer in that we've used air-conditioning more on hot sunny afternoons where it's now virtually free and that's an improvement in comfort. I expect that the quarter we're in now will have a more dramatic saving as it includes the hottest part of the year here.
This graph shows usage and generation on a typical sunny day:
A battery would dramatically increase the amount we use directly but at current prices I can't see it paying for itself for decades by which time the battery's life would be over.
Despite the long payback time of our system, I'm happy to have it and feel that it will add to the sale price of the house when the time comes.
Our usage compared to the same period in the year before was down 46% plus we got a feed in credit of $82.
Last quarter our bill was $318, this time it's $226. Note that the included supply charge is $76.
We spent $6,000 on the system so at this rate it will take 15 years to pay for itself if electricity stays at the same price and you don't count interest on that amount.
Our usage has changed over summer in that we've used air-conditioning more on hot sunny afternoons where it's now virtually free and that's an improvement in comfort. I expect that the quarter we're in now will have a more dramatic saving as it includes the hottest part of the year here.
This graph shows usage and generation on a typical sunny day:
This graph shows a series of days of generation and direct usage:
A battery would dramatically increase the amount we use directly but at current prices I can't see it paying for itself for decades by which time the battery's life would be over.
Despite the long payback time of our system, I'm happy to have it and feel that it will add to the sale price of the house when the time comes.
Saturday, February 17, 2018
A AU$200 CNC milling machine
When Peter, VK2EMU, showed an amazing CNC milling machine at the recent ARNSW Home Brew group show 'n tell meeting and then mentioned the price was just $200 I couldn't resist ordering one.These are on eBay for AU$203.99 including postage.
You get a box of parts and a tiny CD-ROM which a bunch of files in Chinese and English including a word document that passes as instructions on how to put it together.
The instructions are terse.
Like other home constructors, I went down several false paths including using the wrong lengths of aluminium. It's all there but somehow not sequenced as clearly as it could be. The other frustration is the captive nuts that look like they should be able to be inserted sideways and then turn to lock in place. Perhaps it's poor manufacturing tolerance but I had to undo parts of the machine to slide in more at various times.
It took me about two hours to complete the job. Here's the components as they came.
The controller is a custom Arduino board with stepper motor drivers. The software on this board is GRBL 0.9 and to send commands to it (over the serial port) you need version 1.x of Candle available here.
So far I have confirmed that servos work and can send it instructions to draw a 1 inch circle. There is lots to learn.
For the money, it's a bargain. A beautiful machine. Some corners have been cut, there are 3D printed parts in there that probably reduce accuracy. Certainly this is a good way to have a tinker.
What I'd like to be able to do is have it etch the copper to make a prototype circuit board.
Friday, February 16, 2018
Vanlife: A ten day trip
Following on from the test night out at Cattai National Park, I've just returned from a ten day trip in northern NSW.
I stayed at Patonga, "The Ruin" Booti Booti, Wauchope's "Timbertown", Dorrigo, Coffs Harbour and Gosford.
Along the way I enjoyed some lovely country and met some friendly people. In the last few days however it became uncomfortably hot and humid and I ended up in a motel.
The van went well although I'm still optimising where to store frequently used items. It's important to park in the right orientation so that the van shields me from the late afternoon sun which gets low enough to get under the awning.
There was a little ham radio activity although I got told off for hanging a "clothes line" up in one location.
On the last day the van was difficult to start. The starter battery had trouble turning the engine over. The van has always started easily but my volt meter showed that the voltage was low. I headed for a battery shop who tested the battery and found it at about 20% capacity. It was manufactured five years ago so I replaced it for $160. Hopefully that's the last mechanical repair for a while.
I stayed at Patonga, "The Ruin" Booti Booti, Wauchope's "Timbertown", Dorrigo, Coffs Harbour and Gosford.
Along the way I enjoyed some lovely country and met some friendly people. In the last few days however it became uncomfortably hot and humid and I ended up in a motel.
The van went well although I'm still optimising where to store frequently used items. It's important to park in the right orientation so that the van shields me from the late afternoon sun which gets low enough to get under the awning.
There was a little ham radio activity although I got told off for hanging a "clothes line" up in one location.
I struggled to put up the awning on my own. Only after serval nights did I realise that the extra poles were for the sides, even so it was hard. One night my neighbour had a similar awning he'd put up on his own. He was missing a leg from bone cancer. We had a beer and an entertaining chat.
There are amazing vans around, this "teardrop" trailer caught my eye. It was built by a boat builder. Early models suffered from water ingress while in motion. This was fixed by adding a scoop that causes positive pressure while moving.
In the distance here you see the crowded powered sites while my area, the unpowered sites, is nice and clear.
People are friendly in caravan parks, particularly in the unpowered sites. I waved at a nearby couple who were setting up a small tent, plus various bits of gear including small stoves and lights. As the sun was setting they came over to say hello. They had cups of tea, I was slightly embarrassed to be sipping whiskey. "We're not a couple" she said almost immediately, "that must be challenging in that tent" I commented.
I slept very well, going to bed as the sun set around 8:30pm and rising early to watch the sunrise.
Dorrigo:
Coffs Harbour:
Lovely Repton for a quick visit on the way back:
On the last day the van was difficult to start. The starter battery had trouble turning the engine over. The van has always started easily but my volt meter showed that the voltage was low. I headed for a battery shop who tested the battery and found it at about 20% capacity. It was manufactured five years ago so I replaced it for $160. Hopefully that's the last mechanical repair for a while.
Sunday, February 04, 2018
QRP by the harbour - a lovely day
Today's QRP by the harbour event in McIlwaine Park at Rhodes was a lovely day and a fine collection of visitors.
I strung out an end fed from the top of the shelter to a 6m squid pole held up by a new 1m garden stake. At the transmitter end there's a home brew 9:1 Unun and it tuned up on 40m perfectly.
We had a CW station and 2m operations with a magnetic mount on the roof of the shelter.
Conditions on 40m were not good and my best contact was with Henry during the VK2WI callback.
No hail this year and the predicted rain held off. After a few pleasant hours of contacts, local chat and some sandwiches we packed up and headed to the Kokoda cafe about 150m away.
I strung out an end fed from the top of the shelter to a 6m squid pole held up by a new 1m garden stake. At the transmitter end there's a home brew 9:1 Unun and it tuned up on 40m perfectly.
We had a CW station and 2m operations with a magnetic mount on the roof of the shelter.
Conditions on 40m were not good and my best contact was with Henry during the VK2WI callback.
No hail this year and the predicted rain held off. After a few pleasant hours of contacts, local chat and some sandwiches we packed up and headed to the Kokoda cafe about 150m away.
Saturday, February 03, 2018
Vanlife: Radiator coolant warning light mystery solved
Since the day I bought the van the coolant warning light has shown from time to time. Usually it would come on when I started driving and eventually go out. The previous owner had mentioned it and said not to worry about it. Being a little concerned I topped up the coolant expansion tank but it quickly overflowed the first time I parked.
I asked the service folks to check it out, they reported no leaks in the radiator and suggested that the coolant level sensor might be faulty. This week, I parked after a reasonable drive and noticed a stream of green coolant running down the road. The expansion tank was definitely empty. Back to Jason at the service centre.
It turned out that the radiator cap, which has some sort of pressure release mechanism, was faulty and this explains the behaviour. Kindly they only charged me $12 for a replacement cap. No more warning light - I won't miss it.
I asked the service folks to check it out, they reported no leaks in the radiator and suggested that the coolant level sensor might be faulty. This week, I parked after a reasonable drive and noticed a stream of green coolant running down the road. The expansion tank was definitely empty. Back to Jason at the service centre.
It turned out that the radiator cap, which has some sort of pressure release mechanism, was faulty and this explains the behaviour. Kindly they only charged me $12 for a replacement cap. No more warning light - I won't miss it.
Thursday, February 01, 2018
Car jump starter for portable ham radio power? Unfortunately no.
There are some interesting car jump starter battery packs available that claim to have amazing capacity and flexible charging and power supply options.
While designed to supply huge current briefly to jump start a car, this one claims to have almost 90AHrs of capacity and also offers USB power, laptop power (at switchable 15 or 19V) and even a strange torch.
I thought this might be a great power source for portable operation at this weekend's QRP by the harbour. It arrived partly charged and I measured 15V at the output. The giant clip leads were removed and an Anderson Powerpole connector added but when I charged it and connected the KX3 it quickly complained that the voltage exceeded 16V and turned itself off. Nice feature there Elecraft!
These gadgets are basically a LiPo battery wrapped in some charging and voltage regulating electronics. I'm sure the 16V output is the result of 4*3.7V cells in series directly connected. One thought is to use an adjustable buck converter to efficiently bring this down to 13V but switching noise might be an issue.
The torch is rather fun but looks rather too much like police lights I think.
Update - built the voltage reducer
I have set up a buck converter to reduce the voltage to 13.8V. Here's the raw board.
This buck converter isn't rated for much current. I can see a clean AM carrier transmitted but the voltage drops from 13.8 to 13.6 under that load. I'll try this on Sunday (but take alternate power).
While designed to supply huge current briefly to jump start a car, this one claims to have almost 90AHrs of capacity and also offers USB power, laptop power (at switchable 15 or 19V) and even a strange torch.
I thought this might be a great power source for portable operation at this weekend's QRP by the harbour. It arrived partly charged and I measured 15V at the output. The giant clip leads were removed and an Anderson Powerpole connector added but when I charged it and connected the KX3 it quickly complained that the voltage exceeded 16V and turned itself off. Nice feature there Elecraft!
These gadgets are basically a LiPo battery wrapped in some charging and voltage regulating electronics. I'm sure the 16V output is the result of 4*3.7V cells in series directly connected. One thought is to use an adjustable buck converter to efficiently bring this down to 13V but switching noise might be an issue.
The torch is rather fun but looks rather too much like police lights I think.
Update - built the voltage reducer
I have set up a buck converter to reduce the voltage to 13.8V. Here's the raw board.
Boxed up with sockets for input and output the KX3 radio seems happy and there is no obvious noise audible. These buck converters run at 180kHz and don't seem to produce much noise.
This buck converter isn't rated for much current. I can see a clean AM carrier transmitted but the voltage drops from 13.8 to 13.6 under that load. I'll try this on Sunday (but take alternate power).
Vanlife: A disconcerting squeaking / scraping from the back
The van is lovely but I'm still working through mechanical problems before I head off on a longer trip.
So far I've had to replace the differential and rear bearings. I noticed that the radiator coolant warning light would come on after starting for a while and asked the guys at the garage to check it out - they said they couldn't see a leak.
Last Sunday, driving back from Dural with John, VK2ASE on board, there was a noticeable squeaking sound from the back. It stopped after a while but when it started again I drove to the service place and took a bloke for a drive to demonstrate.
It turned out that a rubber dust seal had come lose and was rubbing so nothing major happily. No charge so that was nice. The next morning they rang and asked me to bring the van back as someone was worried that he'd forgotten to tighten something.
Today I noticed radiator coolant leaks each time I parked. No overheating according to the temperature gauge. I had topped up the coolant quite a bit when the light was coming on so perhaps I'd over filled it but today I see that the overflow tank is empty.
I'll call my very close friend now, Jason in the morning for a chat about that.
Good news, the electrical box is gone
You might recall there was a rather large box containing two dead batteries and a bunch of mysterious wiring when I first got the van.
Inside was a mix of some very nicely done wiring along with some very poor wiring. There was also a cable from the starter battery and a relay that should let the alternator charge the living area battery when driving. Turns out that the inline fuse has blown so that wasn't working. In the end I moved my 150AHr battery under the bed and have completely removed the big box.
Lots more space now but I miss the switches. For now I'm happy to simply plug things in to the Anderson Powerpole box I've mounted on the wall but later I'll mount switches somewhere for convenience.
So far I've had to replace the differential and rear bearings. I noticed that the radiator coolant warning light would come on after starting for a while and asked the guys at the garage to check it out - they said they couldn't see a leak.
Last Sunday, driving back from Dural with John, VK2ASE on board, there was a noticeable squeaking sound from the back. It stopped after a while but when it started again I drove to the service place and took a bloke for a drive to demonstrate.
It turned out that a rubber dust seal had come lose and was rubbing so nothing major happily. No charge so that was nice. The next morning they rang and asked me to bring the van back as someone was worried that he'd forgotten to tighten something.
Today I noticed radiator coolant leaks each time I parked. No overheating according to the temperature gauge. I had topped up the coolant quite a bit when the light was coming on so perhaps I'd over filled it but today I see that the overflow tank is empty.
I'll call my very close friend now, Jason in the morning for a chat about that.
Good news, the electrical box is gone
You might recall there was a rather large box containing two dead batteries and a bunch of mysterious wiring when I first got the van.
Inside was a mix of some very nicely done wiring along with some very poor wiring. There was also a cable from the starter battery and a relay that should let the alternator charge the living area battery when driving. Turns out that the inline fuse has blown so that wasn't working. In the end I moved my 150AHr battery under the bed and have completely removed the big box.
Lots more space now but I miss the switches. For now I'm happy to simply plug things in to the Anderson Powerpole box I've mounted on the wall but later I'll mount switches somewhere for convenience.
Raspberri Pi desktop computer with uBitx radio interface
At the recent ARNSW Home Brew Group meeting I showed ADS-B decoding and even ran the slide show on a Raspberry Pi. (It is a big sluggish running a LibreOffice slide show though). Stephen, VK2BLQ wasn't there but when I visited today he showed me his magnificent Raspberry Pi desktop.
It's all boxed up somewhat like a Commodore 64 or Apple II of the old days. The screen is a little one meant for a car. On the right is a beautifully boxed up uBitx and in between is a home built audio interface with transformer isolation and VOX.
Here you see it running Fldigi quite well (although the screen resolution doesn't seem to make best use of the hardware). Great work Stephen and thanks for the home baked chocolate cake made with chocolate milk.
It's all boxed up somewhat like a Commodore 64 or Apple II of the old days. The screen is a little one meant for a car. On the right is a beautifully boxed up uBitx and in between is a home built audio interface with transformer isolation and VOX.
Here you see it running Fldigi quite well (although the screen resolution doesn't seem to make best use of the hardware). Great work Stephen and thanks for the home baked chocolate cake made with chocolate milk.
Sunday, January 28, 2018
ADS-B plane tracking on raspberry pi
An enjoyable meeting of the ARNSW Home Brew Group at Dural today. Along with the general social catch up, sausage sizzle, cups of tea and cordial, there was a trash and treasure. I came away with a nice big Ammeter that might do well in the van.
I presented about tracking planes' ADS-B locations using an RTL-SDR dongle the fantastic Malcolm Robb fork of dump1090 running on a Raspberry Pi. It looks like he hasn't updated it since 2014 but it sill builds and works well on a Pi.
A fresh install of Raspbian comes with all the developer tools needed and you only need to install rtl-sdr and librtlsdr-dev to get what you need to make dump1090.
In my presentation I demonstrated a build and run of the software. The shed at Dural is rather well shielded and we only saw a few planes using the indoor antenna.
Peter, VK2EMU, showed a fantastic looking 3D CNC machine from China that he's building that costs about $200 and might be suitable for PCB fabrication. (Note that it's too early to tell if this is actually a good deal).
Great to see everyone and thanks to John, VK2ASU, for the photo of me above.
I presented about tracking planes' ADS-B locations using an RTL-SDR dongle the fantastic Malcolm Robb fork of dump1090 running on a Raspberry Pi. It looks like he hasn't updated it since 2014 but it sill builds and works well on a Pi.
A fresh install of Raspbian comes with all the developer tools needed and you only need to install rtl-sdr and librtlsdr-dev to get what you need to make dump1090.
In my presentation I demonstrated a build and run of the software. The shed at Dural is rather well shielded and we only saw a few planes using the indoor antenna.
Peter, VK2EMU, showed a fantastic looking 3D CNC machine from China that he's building that costs about $200 and might be suitable for PCB fabrication. (Note that it's too early to tell if this is actually a good deal).
John, VK2ASU, is turning into a C programmer and showed a touch screen controller for a rig he's building.
Great to see everyone and thanks to John, VK2ASU, for the photo of me above.
Friday, January 26, 2018
Vanlife: Power system sorted - bigger battery
The challenge with this van is to have enough power to run a small fridge full time with available power for a bit of ham radio. So far, with the two batteries that came with this van, the system hasn't really been up to it.
In the last few days I disconnected both batteries that came with the van and attached a 150AHr battery I've been using in my shed's solar system. This has done the trick. Gone are all those deep dips in voltage when the fridge was running without full sun and it now looks much better.
Note that in the plot above I set the fridge to 8C over night then in the morning, when the sun came out (actually it's quite overcast today), I lowered the temperature to 4C which is why you see the downward voltage movement at about 9:30.
Along the way I learned that the solar charge controller doesn't get on with the fridge. If I connected the fridge to the "load" terminals on the controller it would flash the load symbol which indicates a short circuit. I guess the initial inrush of the fridge is high enough to trigger that protection so I've had to connect directly to the battery. Fortunately the Waeco fridge has its own low voltage shut down so it won't over flatten and damage the battery.
The 150AHr batter is big and my plan is to mount it under the bed and remove the big battery box that rather fills the space behind the driver's seat.
All good fun learning about this but beware that batteries that come with campervans may well have been mistreated. The Arduino voltage logger has been a great tool for figuring out how the system is performing.
Power consumption of a fridge is dependant on multiple factors including: temperature difference between the air and the internal setting and temperature of liquids placed into the fridge. I've seen it work hard after having a full load of room temperature beer added.
In the last few days I disconnected both batteries that came with the van and attached a 150AHr battery I've been using in my shed's solar system. This has done the trick. Gone are all those deep dips in voltage when the fridge was running without full sun and it now looks much better.
Note that in the plot above I set the fridge to 8C over night then in the morning, when the sun came out (actually it's quite overcast today), I lowered the temperature to 4C which is why you see the downward voltage movement at about 9:30.
Along the way I learned that the solar charge controller doesn't get on with the fridge. If I connected the fridge to the "load" terminals on the controller it would flash the load symbol which indicates a short circuit. I guess the initial inrush of the fridge is high enough to trigger that protection so I've had to connect directly to the battery. Fortunately the Waeco fridge has its own low voltage shut down so it won't over flatten and damage the battery.
The 150AHr batter is big and my plan is to mount it under the bed and remove the big battery box that rather fills the space behind the driver's seat.
All good fun learning about this but beware that batteries that come with campervans may well have been mistreated. The Arduino voltage logger has been a great tool for figuring out how the system is performing.
Power consumption of a fridge is dependant on multiple factors including: temperature difference between the air and the internal setting and temperature of liquids placed into the fridge. I've seen it work hard after having a full load of room temperature beer added.
Sunday, January 21, 2018
Vanlife: Sorting out the power system
The van came with a 100W solar panel on the roof and a wooden box containing batteries and wires. The seller told me that it had 200AHr of capacity and a good quality relay for charging from the alternator when driving and the starter battery was full.
It did seem to work OK but when I spent a night out and used power for a transceiver as well as the fridge the voltage dropped faster than I had expected and it was time to investigate.
Here's the contents of the magic battery box.
On the right is a Century 65AHr deep cycle battery. Connected in parallel on the left is an Exide 90AHr conventional lead acid battery. I know it's a bad idea to simply put two batteries in parallel but it's definitely a bad idea if they are different types of battery as in this case.
I disconnected everything - which means I now understand the wiring - and charged the deep cycle battery for a day. In the morning, with no load, it had self discharged quite a bit. My theory is that the first battery started to lose capacity and a previous owner simply added an extra battery.
So, I've removed the first battery and simply wired in the second, larger capacity battery. The box looks like this now.
I let this battery charge, which it did quite quickly in full sun, and then turned the fridge back on. A great benefit of keeping notes for myself on a blog is that I found this post that shows my source code for an Arduino based voltage logger.
I left it sampling battery voltage every 10 seconds for over 24 hours and produced this graph.
During the first afternoon it looks like the voltage was swinging pretty wildly up and down as the battery charged and then discharged to run the fridge but after few hours it settled down and now looks pretty good (although I think I need to use heavier wire to reduce resistance under load from the fridge).
Crisis: Clouds
The next day was overcast and the voltage dropped to the point where the Waeco fridge (correctly) stopped running. It does this to avoid fully discharging and damaging the battery. In the plot below you can see the spike down below 12V until I noticed and then turned the fridge off all together.
This has prompted me to do the right thing and re-wire so that loads in the van come from the output of the charge controller so that it can take care of switching off all loads in the event that the battery falls below a set threshold. (As it came all loads are connected directly to the battery).
Ever since I put in this new controller, a cheap "no brand" model from an eBay seller, it has mysteriously flashed the battery symbol rather than acting as advertised in the manual.
I took this opportunity to mount it horizontally, so the display is easier to read, and attach cables with bullet connectors. This removal from power seems to have reset the thing and now it's acting as it should and I've been able to correctly set the battery type. Here's how it looks now:
Today is still rather overcast so I'll leave the fridge off until we get back to full charge and give it another go. It may be that the second battery is also degraded but we'll see.
Update: The other battery isn't up to it either
After charging with the fridge off, I re-connected it. Here's a voltage plot showing a peak of charging and then a rapid decline into under voltage when the fridge was turned on.
Next step is that I've moved the 150AHr battery from my shed into the van and am now running the fridge. We'll see how that goes. As an aside, drawing these graphs with a time axis took me a little tinkering so here's the latest code using matplotlib in python 3.
Crisis: Clouds
The next day was overcast and the voltage dropped to the point where the Waeco fridge (correctly) stopped running. It does this to avoid fully discharging and damaging the battery. In the plot below you can see the spike down below 12V until I noticed and then turned the fridge off all together.
Ever since I put in this new controller, a cheap "no brand" model from an eBay seller, it has mysteriously flashed the battery symbol rather than acting as advertised in the manual.
I took this opportunity to mount it horizontally, so the display is easier to read, and attach cables with bullet connectors. This removal from power seems to have reset the thing and now it's acting as it should and I've been able to correctly set the battery type. Here's how it looks now:
Today is still rather overcast so I'll leave the fridge off until we get back to full charge and give it another go. It may be that the second battery is also degraded but we'll see.
Update: The other battery isn't up to it either
After charging with the fridge off, I re-connected it. Here's a voltage plot showing a peak of charging and then a rapid decline into under voltage when the fridge was turned on.
Next step is that I've moved the 150AHr battery from my shed into the van and am now running the fridge. We'll see how that goes. As an aside, drawing these graphs with a time axis took me a little tinkering so here's the latest code using matplotlib in python 3.
import csv import datetime import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib.dates as mdates timeFmt = mdates.DateFormatter('%H:%M') INFILENAME = 'DATALOG.CSV'VOLTSCALE = 0.017676767676768 datareader = csv.reader(open(INFILENAME,'r'), delimiter=',') values = [] times = [] for row in datareader: if len(row) > 1: # eg: 23/01/18 13:12:49 timeStamp = datetime.datetime.strptime(row[0], '%d/%m/%y %H:%M:%S') times.append(timeStamp) volts = float(row[1]) * VOLTSCALE values.append(volts) convertedTimes = matplotlib.dates.date2num(times) plt.plot(convertedTimes, values) plt.gcf().autofmt_xdate() plt.gca().xaxis.set_major_formatter(timeFmt) plt.ylabel('Volts') plt.show() plt.savefig('voltgraph')
Subscribe to:
Posts (Atom)














































