Itinerant Ham

Enter your email address to follow this blog and receive notifications of new posts by email.

Advertisements

Some Boat Electronics Projects

At the end of 2017, my 400Ah of gel batteries on the bot gave up the ghost and I replaced them with 540Ah of LifePo4. This was a significant change for us since the very many benefits of LiFePO4 came into play.

However, these cells need to be treated with respect and protected from ‘user abuse’.  Most systems have a ‘Battery Management System’ implemented to protect the cells from overcharging and over discharging but many also implement (wasteful) cell balancing,  a feature that I wasn’t keen on having.  The only system that met my needs was a home-grown system but unfortunately the engineer had been offered a job with a commercial company to take it to the market and it was consequently no longer available.

So I decided to roll my own…  Quite a challenge since I don’t really have too much experience in electronics design and especially not in power management.

I produced a prototype board for the autumn of 2017 and found many errors that had to be hard-wire corrected.  It was truly ugly but it worked!  With an ESP8266 monitoring the cell voltages, the board provided the switching to allow the batteries to be isolated in the event of an excursion outside the programmed parameters.

20180130_1903401

I’ve spent some time developing the project and putting it all together on one board which arrived today.

20180820_124313

This board is powered by an ESP32 and is an amalgamation of voltage monitoring, temperature monitoring and reporting that was previously done by the ESP8266 and the switching functions provided by the earlier board.

I’ll be building this board up over the next few days and will post some pictures as and when… In the mean time, if you have any questions about the project, please post them below…

 

Advertisements

Mailbag

20180820_131506

So I got a big box in the mail today.  Mostly from JLCPCB and LCSC in China but I also got some juicy mosfets from Arrow Electronics since they had a 30% off sale at the end of July.

So I have all the components and most of the boards for my v3.0 LiFePO4 Battery Protection System (BPS), a board to smarten up my ‘dumb’ Volvo alternators, and an ideal diode battery isolator rated at 300A – watch this space as the experiments continue!

Day Visit to Shenzhen

We visited Shenzhen in China yesterday. It was an afterthought really and so I hadn’t planned it thoroughly but since we were travelling through Hong Kong, why not!

My main interest was to visit the electronics market centred round the Huaquiang Road. As it happened, the DC power jack of my Dell laptop failed a few days ago so I decided that the main emphasis would be to have a look around and purchase a new jack assembly and the tools to fit it.

Planning

There are many resources that are helpful in planning the trip. I’ll not repeat the information here but I will add a few wrinkles as they occur. Google is your friend (but the Google maps satellite overlay is awful).

I used Youtube videos and a variety of web sites listed below. Please note that some of the sites you might find on Google are out of date and you’ll need to check for the latest information before you go.

 

The most concise and up to date site I found.

https://www.travelchinaguide.com/cityguides/guangdong/shenzhen/

MTR Map

Seeed Maker Map of Huaquiang

20180419_081254We travelled from Hong Kong to Lo Wu on the MTR East line. You have to buy 2 single tickets one outwards, the other return – total cost HK$40 per person (concession for HK$20.50 available) from our station Hung Hom. The trains run very regularly (every 6-8 mins) and the journey takes about 45 minutes. (Tip: if you haven’t planned where to stay in HK, consider not staying on the island as its a pain to get to Hung Hom from there and the traffic is pretty bad at peak hours).

On arrival at Lo Wu, you just follow the signs for Shenzhen. You exit HK through the usual electronic passort gates. If you need a visa, the fun begins now!

Arriving in China

Cross the bridge and stay to the right. Follow the signs for Foreigners. As you approach 20180419_091728the Immigration gate area, look for an escalator on the left and go up one floor. You will see the visa office (Useful picture) but on the left you will see 2 photo booths covering up the once useful ‘Visa Process Flow’ poster. Enter the visa office and take a number from the machine to the left of the door. Now leave the office and get your free picture taken at the photo booths. Exit the booths and fill in a visa application found on the shelf to the right of the booths. You might as well take a seat in teh office and do it at leisure as you’ll have plenty of time if your experience is anything like ours. (During our 45 minutes they processed 9 visas or so).

Keep an eye on the LED screens above the officials’ booths looking for your number to come up. (Tip: We were lucky – another applicant gave us a spare number and we didn’t have to wait nearly as long as our initial ticket indicated. So keep a look out for discarded numbers that are greater than the number of the current applicant at the desk.) When your number comes up, go and submit your paperwork.

Then you have to pay. Unfortunately, I had read an article on the visa process that told me you could only pay in Yuan. I therefore changed money at the desk at the top of the escalator as advised. I can’t advise this. Total rip-off. Jusdging by the age of the signs in the Visa office, you’ve been able to pay by credit card (even American Express) for some time – I chose to save my ‘expensive’ Yuan for later and to pay by credit card – it worked fine.

Then you have to wait for your number to appear at the collections desk. I noticed some people becoming impatient and approaching the desk to enquire – they were very firmly told to go away and sit down! When visas are issued, they seem to come in batches. I suppose we waited about 15-20 minutes aftere applying for it to come.

Then you have to go downstairs and turn hard left where you will find an arrival form to fill in! Yes, more paperwork! And an automatic fingerprint machine for you to play with. Then, and only then, can you join a queue to see if you will be admitted to China! Happily we were (after being fingerprinted again)!

Expect your bags to be X-rayed and then finally, you’ll be in Shenzhen!

Getting to Huaquiang Road

Getting to We chose to travel to the Huaquiang Rd on the underground train (Line 1 – Green). A ticket is 3 Yuan each way. (Hint, get some small Yuan notes when you get money since the ticket machines only take coin, 5 or 10 Yuan notes). Put in the money and get a green token in exchange.

The green coin token is an RFID that you have to scan to go through the barrier to the train. At the exit, you have to put the ‘coin’ into the slot and it disappears to be recycled. Huaquiang Rd is the 5th stop.

Now it gets a bit more difficult. We exited at the wrong exit (albeit in the right direction – north). We ended up going through a shopping mall that happily had toilets (Hint: these were normal western i with toilet paper and hand washing facilities – I’d read that most toilets were of the squat type and you needed to take your own paper and hand sanitiser.)

The Market Area

Anyway – now to the market. You’ll have read that its a market and it really is! I liken it to any normal market I’ve ever been in except for the scale! It can be busy, although on a Thursday morning it didn’t seems so – it got noticeably busy about 3 in the afternoon.

Most noticeable was the noise of packing tape being used. It was everywhere! Stuff being boxed up and dispatched with runners. (Hint: If you’re crossing one of the streets that cross Huaquiang Rd, look carefully! It seems that runners on electric mopeds have zero traffic rules and will go anywhere they need to ant any time irrespective of the traffic lights! As an aside, when you’re out and about at lunchtime, expect to see frequent drone passes – some might miss you by inches – they’re very nimble pilots!

I got my Dell part on the 4th floor of the Electronics Market (#6 on the map) from a very helpful lady who translated her mandarin using an app. Since I had no roaming data on my phone, I used a notebook. I scored a success when I got the part for my laptop and the tools to open it up for less than the price of the part on Ebay – more importantly, I had it now rather than in 2 weeks time!

I had a shopping list but to be honest, it was hard to find everything I wanted simply 20180419_114515because of the huge number of stalls. My Fitbit says I walked 11 miles around the markets – it felt like it too! We got my wife’s Samsung Galaxy 7 screen replaced for 500 Yuan – I’m sure you can get it cheaper by going a few streets back but they did it in less than an hour and it works great. It would have been 3 times that price back home and in the USA, 4 times.

Refreshments!

We found the Royal Tea stand on the west side of Huaquiang Rd did really nice fresh fruit juices and very good price too! Similarly at lunch time, we went a bit further north – out of the electronics area to a normal shopping area and under the Burger King sign on the East side of the street was a great stall serving fresh fruits by weight. 20 Yuan for a filling box full.

I’m not going to go into too much detail about the markets itself except to say that its a really fun place to visit – the people are very amenable and nice to deal with. You can but reels of SMC, yards of LEDs and even have cable assemblies made to order. We saw only a fraction of it in our time but we were worn out by the intensity of the place. A nice touch, when we bought some LED scrolling name badges, was to be offered tea and, if I could speak Mandarin, a chat! As it was, we thoroughly enjoyed our visit. We found it was not, as described in some articles, overpoweringly smelly, hot and sweaty – in fact there wasn’t a whiff of BO all day!

Departure

Another 3 Yuan each to get back to the border on the train. Then follow the signs for Honk Kong and don’t as we did, miss the signs for foreigners. You’ll need to fill in a departure card and queue up to be processed and scanned again. Then an arrivals card at the HK border and finally join the throng getting on the trains back to town.

Well, that’s it – I hope that you can do this trip. I like to think we came out ‘cost-neutral’ in that we saved on phone repair and I got my laptop part. But that wasn’t the aim – It was my first time in China and it was a lot of fun. What a fun trip to a very modern and clean city. I’d definitely go back but I’d probably stay a night or 2 in Shenzhen itself and venture further.

If you’re making the trip and have any questions, please let me know and I’ll try to answer them.

C6APY – Ready to Go

Ok – well, we’re all ready to go!  The boat is ready and all the equipment assembled.  The current plan is to leave Nassau very early on Friday morning, only a few hours after @M1ACB and @M0VFC arrive, in order to make the most of the weather.  A look below and you’ll see what I mean.

c6apy_weather

So we have a little challenging weather and a few ‘Plans B’ – either way, if we can keep an antenna up in the air, we’ll be QRV!

Amateur Satellite Ops

Ok, I’m a bit remiss for not posting this a bit earlier.  This year I will be active on the FM satellites from the Bahamas. 


I expect to be active from FL15, 14, 13, 23 and possibly 24 and 22. In addition I will be part of the C6APY DXpedition to NA-054 the Berry Islands (FL15) during early March. They (we) will be active on FM and some linear sats from there. We will also be doing much (we hope HF and HF digital modes).

Keep an eye on my Twitter account @itinerantham for updates.

73 and hope to hear you!

On a Stormy Day in the Bahamas

So we had a strong cold front recently – with winds in excess of 30kt and some torrential rain.  So it was a day for being indoors – even although we never saw the winds that the forecasters said would be in excess of 50kt!

As we set out for our trip to the Bahamas this year, our Raymarine E120 chart plotter failed.  Well, the backlight to the LCD failed – the repair shall be the subject of another blog sometime but suffice it to say that the interim repair is satisfactory.  However, it got me thinking about backups – and the inclement weather got me thinking about it even more.  You see, our chart plotter and instrumentation is outside at the helm rather than inside where, if the weather’s bad, its warm and cosy. Ideally, I want to be able to monitor the conditions outside from my bunk or perhaps the saloon rather than popping outsinde in the rain.

Now, I’ve been playing with something called Node-Red for a while now as I develop sensors and a Hovercraft instrumentation system and other stuff. Its a great tool for ‘wiring’ data  together. With a little inspiration from Peter Scargill’s blog, I discovered the Steelseries guages that would allow me to display the wind (and other navigation) data on my phone or tablet.

The result is here:

AppWind.pngIts a fully animated apparent wind display.  I had to amend the Steelseries guage javascript file to declare a new (and very small) pointer type in order to ‘hide’ the second pointer. Another few lines of code added a parameter ‘windspeed’ that re-purposes the lower LCD segment to display the wind speed to a single decimal place.  In all, only a few lines of code.

I use a cheap ($2) RS485 adapter to read the data off my NMEA bus directly into Node-Red (running on a Raspberry Pi) and then display the Steelseries guages in Node-red dashboard. (For details on the ‘how’ – its documented well on Pete’s blog).

Of course, by the time i’d got it all figured out the cold front had passed and it was time to get back to everyday tasks. I’m not sure whether to fork the Steelseries or push my amendments to the original – perhaps some of you would like to chip in and give a thought on that?

In the mean time, I have a few more ideas brewing as well as the need to expand my displays to give a full ‘virtual’ chart plotter information display. (Updated code here)

Node red Template code:

/myjs/tween-min.js
/myjs/steelseries-2-min.js

var windDir1;
(function(scope){
scope.$watch(‘msg’, function(msg) {
if (typeof(msg.value) != “undefined”) windDir1.setValueAnimatedLatest(msg.value);
if (typeof(msg.ave) != “undefined”) windDir1.setValueAnimatedAverage(msg.ave);
});
})(scope);

var sections = [steelseries.Section(10, 45, ‘rgba(220, 0, 0, 0.3)’),
steelseries.Section(45, 150, ‘rgba(0, 220, 0, 0.3)’),
steelseries.Section(315, 350, ‘rgba(220, 0, 0, 0.3)’),
steelseries.Section(210, 315, ‘rgba(0, 220, 0, 0.3)’)]

windDir1 = new steelseries.WindDirection(‘canvasWindDir2’, {
size: 292,
section: sections,
lcdVisible: true,
titleString: “Wind Direction”,
degreeScaleHalf: true,
pointSymbolsVisible: false,
lcdTitleStrings: [‘Latest’, ‘Speed’],
windspeed: true
});

windDir1.setFrameDesign(steelseries.FrameDesign.BLACK_METAL);
windDir1.setBackgroundColor(steelseries.BackgroundColor.LIGHT_GRAY);
windDir1.setPointerTypeAverage(steelseries.PointerType.TYPE17);
windDir1.setPointerType(steelseries.PointerType.TYPE1);

<canvas id=”canvasWindDir2″ width=”292″ height=”292″></canvas>

 

Hovercraft Instrumentation

At the request of Julian and Dave, here’s a post on what your ‘Friday’ started – Dave!

I’m an engineer and not much of a writer so here goes 🙂  I’m involved with a charity called Hoveraid.  I help them out with practical stuff like when they’re out with the ‘craft doing demonstrations at public events in the UK. Here’s a short video and you’ll see why they captured my imagination.

They do great work in enabling other agencies to bring relief and aid to those who live in areas that are ‘unreachable’ by conventional transport – have a read of their site – there’s some great work going on!

So I was chatting to Andy about my Fridge controller and he asked if I could help him with a project for the hovercraft (craft).  These craft are essentially very simple, agricultural machines (and that’s one reason that they do so well deployed in the field). The instrumentation is simple too with the minimum of gauges etc. But when things go wrong, there can be no warning.  For example, Andy told me that it would be very useful to be able to monitor the temperatures of the bearings of each of the fans – the River Rover has 3 fans – 2 for thrust and one for lift ad they each have 2 bearings. Well, I said, I can measure temperature!  And so the project was born.

A project like this is only possible when things come together!  First there was Hoveraid’s need and I know I could build a system that would measure temperature.  I know also that I’d need to display it and the River Rover dashboard lends itself to the use of 7in screens – conveniently available!  Now, I could have used a simple controller like and Arduino but that meant running wires the length of the craft so decided to use an ESP8266 – after all its wifi, more ram and more power than an Arduino anyway.

At the display end I was looking for a robust solution that would be somewhat resistant to the  dust and humidity of Madagasacar – or anywhere else in the world.  I initially thought of using a PI as a hotspot to collect the MQTT’d temperature data and display it using node-red and node-red dashboard but as it turned out the PI was an unreliable hotspot – I couldn’t connect more than one of my ESP8266s to it whereas they would all connect to any other routers.

And then it was Friday and Dave CJ posted this on the Node-Red Google group.  So I tried it on my phone and it worked.  I now had the display and router solution.  With my phone configured as a wifi hotspot, and with an MQTT broker and node-red running on it, I saw the potential of having a robust display which gave me a 2-component but very expandable system with the potential of multiple modules all over the craft supplying data via MQTT to node-red and its dashboard. (Pete Scargill has a few great articles on node-red and other matters – well worth a read).

So after reading all that – here’s a nice video to remind you what its all about 🙂

 

The Tech Bits

This project is so simple its not true.  An ESP8266, a pullup resistor and as many DS18b20s as you need.  Add, Nick O’Leary’s pubsubclient for MQTT messaging to the DallasTemperature library and you have all the essentials.  I chose to poll the sensors (powered – not parasitic) every 2 seconds and publish each sensor’s data as an individual topic.  This makes for easy configuration (and made the most sense since I don’t have the Javascript skills to allow me to process the payloads in node-red).

So here’s the box.  (I’m just off to Screwfix to get a bigger one since I had to swap out my cheap Chinese power supply for a more robust potted one that is a bit bigger).

20161009_083527

The magic happens in node-red.

screenshot-from-2016-10-09-08-57-17

When the ESP system starts, it publishes a list of the sensor IDs to outTopic. This allows you to make a node for each sensor and assign a function to it.  Then you can assign the appropriate dashboard element to each temperature.  The function is a simple heartbeat that puts the current time into the payload every time a temperature is received. (Hint: it would be so nice for that to be an optional element in each dashboard item :))

20161009_090943.jpg

River Rover 7 in screen

I didn’t have a 7in tablet to test and deploy this on but one of the wonderful things about working with a charity is that some of our supporters use social media so Andy asked if anyone had an old Android 7in tablet. Then the next wonderful thing happened!  Within a matter of hours we had a new tablet!

With Andy CJ’s instructions and some hints from Peter’s blog comments I soon had an MQTT broker and node-red running (although I’m still having trouble getting it to start up as a Wifi hotspot and then to run node-red automatically). I use the default Android browser in kiosk mode – (ask Google :)) It works well!

So there you have it! Its a really simple, expandable system made possible by the contributions of so many.  Its impossible to mention everyone but I’m very grateful for your efforts in making this possible!

Of course, this isn’t the whole story.  This is only the prototype.  We are in the middle of putting a new engine into the Griffon 1500 – a much larger craft.

g1500-blackpool

This has a larger cockpit so I’m envisioning 10 in screens in here with all sorts of performance parameters. The new engine will have CAN so that will be another integration challenge.  This project is moving slowly as refurbishment is an expensive process and since we depend on donations and volunteer labour it moves forward as and when funds and people are available. We’re always looking for help so if you would like to be involved, take a look here and here 🙂

I’ll update this article and or write more shortly. Andy is taking the ‘system’ out to Madagascar in the next few weeks for field testing so I’ll let you know how it goes!

History

October 2018
S M T W T F S
« Aug    
 123456
78910111213
14151617181920
21222324252627
28293031