Author Topic: Brushless Axle Hung Motor System  (Read 5117 times)

0 Members and 1 Guest are viewing this topic.

Offline IanT

Brushless Axle Hung Motor System
« on: January 08, 2018, 05:36:32 pm »
Well this particular project is still in the very (very) early stages but I'll start here as the 'motors' arrived today.

I'll state straight away that others here have already trodden this particular path, including Gavin_G and Doddy. Tim has also published details of his very interesting brushless design in the Summer 2017 NL. However, Tim's design didn't really fulfil my current requirement and I am still looking for something that is essentially an 'Axle-Hung' design - because that what my prototype had. I will also state quite clearly here that I am not an electronics or mechatronics expert, so I'm afraid this will be very 'suck-it-and-see'.

As Tim states in his NL article, one way to measure (size?) brushless motors is by their Kv value, which in very simplistic terms gives their RPM/volt. As most of these motors are designed to be used in drones these days, they tend to have high Kv values but for our needs a lower Kv is preferable. My other criterion was cost, as if this doesn't work out, then I didn't really want to have spent too much money finding out I'm as dumb as I think!

So I looked around and most of the lower Kv motors tend to be quite large and also quite expensive. Tim's are 620Kv but many of the cheaper ones are 3500Kv units. Then I happened on a DIY 'Drone' site where the builder was using smaller BLM's that would fit my application size requirement well but were (only) 1000Kv. He recommended them and stated that purchased directly, they were very affordable and in reality exactly the same as branded products from the leading "manufacturers". I checked and was very surprised by what I found.

Suffice it to say that I've just purchased Qty x4 1000Kv motors with fittings (and propellers) for £11.79 - including delivery. They were ordered on the 4th January and arrived this morning. So for less than £12.00 I have my 'experimental' motors. Purchased locally (in UK) they seem to cost about 3-4 times that each. As there is no duty or VAT on items under £15.00 as far as I can tell - this seems to me to be a wonderful bargain. Only time will tell.










Regards,

IanT
Nothing's ever Easy - At least the first time around.

Offline Peaky 556

Re: Brushless Axle Hung Motor System
« Reply #1 on: January 08, 2018, 08:23:42 pm »
Excellent Ian.  Please keep us posted.  These motors do look interesting as they seem more like the “normal” motors we use in that the outer casing is fixed and the inner rotor and shaft spin; unlike mine which is an “outrunner” design.  May we ask your intentions in terms of gearing?  Those shaft adaptors look useful too; could I just ask the shaft diameter please?  The drone market is so huge that developments there are going to be a rich source of low-cost opportunities for us. 
Keep up the good work (maybe an article for the new editor’s consideration?  ;D).
Regards, Tim

Offline IanT

Re: Brushless Axle Hung Motor System
« Reply #2 on: January 08, 2018, 09:08:04 pm »
I'm afraid not Tim - they are Outrunners - commonly referenced as A2212/13T and available from a number of different sources it seems, although one suspects they all originate from the same Chinese factory. The spindle diameter is 3.2mm - the motor diameter is 28mm and total overall (spindle) length is 40mm. There is plenty of room to fit within a G3 wheelset.

They have a max power rating of 150W, although hopefully I won't have to use anything like that. These motors are intended for use in a drone (and not a G3 loco) and we have very different requirements. Drones need high speed, high torque and lightness but have plenty of air-cooling available. They draw high currents for a relaively short period. We need fairly high torque but at much lower speeds and cooling may be a problem. Weight is normally not an issue for us and longer battery life is also desirable.

I've started on a first pass of the CAD and I'm using a single stage gear-set using M0.75 gears (60t x 15t) to give a 4:1 reduction, which I think will be sufficient provided the controller can help things out. In terms of the unit size, I needed a shorter frame to fit two units inside the chassis back-to-back but the wheels are a bit larger than most DMUs for instance. My initial design is 90mm from axle-centre to the back of the motor/gear frame but they could be made more compact depending on gearing and final frame design. The motor itself is very small for the potental power - I just need to feed it appropriately - but that's for another post...

Regards,

IanT   
Nothing's ever Easy - At least the first time around.

Offline IanT

Re: Brushless Axle Hung Motor System
« Reply #3 on: January 08, 2018, 09:12:03 pm »
Oops!  Quick correction - that should have been 45mm (not 90mm).  :-)

Regards,

IanT
Nothing's ever Easy - At least the first time around.

Offline IanT

Re: Brushless Axle Hung Motor System
« Reply #4 on: January 08, 2018, 10:01:21 pm »
Just to give people some idea - the Brushless AHMU could end up looking something like this.

It's just a first-pass draft and already a few improvements suggest themselves but it's still more compact than my previous AHMU efforts. Hopefully they will eventually be of use to other G3 folk too....  but that's enough for one evening I think.

 


multiple image hosting


Regards,

IanT
Nothing's ever Easy - At least the first time around.

Offline IanT

Re: Brushless Axle Hung Motor System
« Reply #5 on: January 09, 2018, 06:10:17 pm »
Tuesday is always a busy day for us - and especially so this week as the monthly MERG meeting is tonight. We (well the others) have been building a small ATC demo system (in N gauge) to explore how the MERG kits work in this area. It's proving to be more complex than I thought it would be but seems to be getting there. The next project is a similar 'demo' layout but using CBus kits - which is the area I am mostly interested in. We are blessed with having some very clever people in our local MERG section who fortunately seem to know a great deal about electronics generally and MERG kits in particular. Just as well, as I certainly don't yet.

But, back to a BLDC Axle Hung Motor Unit - I'll just call it the BLMU (Brushless Motor Unit) I think, as the technology can also be applied to other forms of drive. However, my reference to 'system' was appropriate as it's already very apparent to me that the 'mechanical' aspects of this BLMU are relatively simple compared to the electronic/system requirements. We are all generally very familiar with "ESC"s but these have traditionally been for brushed motors. As far as I know, all of the commercial ESC's (for model railway use) are brushed ESCs (although someone may be able to correct me). So this is the next area to explore and there are a number of possible ESC approaches that I am currently aware of (although my knowledge in this area is still very limited). I'll try to headline the main ones but will only describe them very briefly for now.

1) Low cost 'drone' ESC's. A suitable one for the A2212 would be one of the inexpensive 30A ESCs (about £2-5 each). They are designed to be air-cooled but their biggest problem is that they ARE designed for Drones. As such their firmware has many features that are good for drones but not for traction engines, not the least being that they are not reversible. However, others have 'hacked' them and re-flashed their firmware to suit their needs. There are also relatively low-cost "Boat" ESCs - which are reversible and have a water-cooling facility. These can be obtained in the £7-10 range. All of these ESCs use a servo connection to receive commands.

2) Separate 'Driver' & 'Logic' solutions, whereby the amperage is delivered by a power board controlled by a separate processor (typically Arduino). This has some attractions but most of the examples I've looked at so far (and I've not been looking that long) are fairly simple and probably do not offer the facilities I'd really like to have (and be able to develop). On the plus side, I could use my preferred MCU and software to develop the firmware - which is really going to be the heart of any ESC solution.

3) And currently the most promising - it turns out that others have walked this path (for different reasons) before [hardly a surprise] and that a seemly very sophisticated ESC solution already exists in the form of public domain hardware and software. This solution has many of the features I know I'd like to have (plus many that I hadn't even thought of). On the downside, it is quite complex, costs are hard to estimate at this point and it involves a completely new 'tool-chain' (to me that is) as well as being hosted on Linux (again a foreign place for me).

So I think that's an overview of where I am with ESCs at the moment. Any model using brushless motors has got to have a suitable ESC/control system specifically designed for it to work well. If my 'travels' in the area are of interest to folk here, then I will provide more detail and provide links to various source information. If anyone here has useful hints/tips for me in return , then I'd be very interested in hearing them.

For those of you who are not interested in all the 'tech', then don't despair. I'd like to get to the point where anyone can download some firmware, flash their 'chip', connect their motors and have a usable BLMU (or maybe buy them from the G3 Shop?). I'm not sure if I'm the person who will deliver on this but if not me then I'm sure someone else will eventually - and I'll have had fun trying.

Anyway, time for dinner and then perhaps a rather rainy/windy drive to the meeting.

Regards,

IanT           
Nothing's ever Easy - At least the first time around.

Offline Peaky 556

Re: Brushless Axle Hung Motor System
« Reply #6 on: January 09, 2018, 07:12:13 pm »
Ian,
This is all very interesting but I fear that you are presenting the study as unnecessarily complicated.  That is if all you want is variable speed and direction on demand, as we generally do with brushed motor drives.  There is a big ‘however’, however, and that is that you need some more features or outputs, hinted at but not so far divulged.  If one of these is a drive to a sound card, can’t one just take an output from the receiver speed channel via a ‘Y’ cable to drive it?  What else do you need?

The simple and non-specialist way was as I described in the Newsletter last Summer, that can be assembled by an electro/mechanical numbskull like me. This is to use a cheap drone ESC (your No. 1) and fit a reversing relay to a second channel.  I know this isn’t the only way, and I applaud your diversity of interest into MERGs, CBus, Arduino, etc, but it’s not a field that I will dissect.

One tip, as you have probably already realised, each motor will need its own ESC.  This is because there is feedback from the motor to the ESC so that it knows when to send the next pulse, so several motors on one ESC is going to be a recipe for sound and light effects! You will need ‘Y’ cables to connect several ESC to one receiver output.

As for cooling the ESC, don’t worry there won’t be a problem.  Each motor and ESC is only going to pass around 1-2 amps max as you are using multiple motors for a train. Just leave a bit of fresh air around them.

One problem for me was finding a suitable drone ESC to give acceptable low speed performance, so I wish you well in this field.  As these ESCs are so cheap it’s worth experimenting with several.

Keep up the good work.

Offline IanT

Re: Brushless Axle Hung Motor System
« Reply #7 on: January 09, 2018, 11:34:12 pm »
Hi Tim,

I was thinking the same myself as I drove over to MERG.  :-)

I guess my reasoning is that I have a number of 'hobby' activities (Home Machinist, Railway Modeller, Computing etc) and that they already over-lap to a greater or lesser extent. When I built my first Z80 CP/M system (late '70s), it used to be called "Home Computing" but these days my interests are directed towards what is termed 'embedded' computing. So I already have some knowledge in this area (but by no means a great deal of expertise) and I already have various 'micro toys' that I play with. However, after a while you start looking for real world applications to try them on. So that's what is going on here to some extent but I do hope that others might find it interesting and (eventually) useful too.

It's getting a little late now but I will touch on a couple of your other points very quickly.

I do realise that a relay will do the trick but I could probably also have squeezed a smaller brushed motor and gearbox into the space - there are always many ways to do things. In the short term, using the cheapie ESC may well be the way to go but even if I do, I'm already pretty certain that my set-up won't have relays. I know that there are different ESC types out there but I also know that some (those with an Atmega-8 MPU) can be re-flashed with new firmware to enable reversing and change other key parameters. For many here, that might be all they want or ever need.

But you are also correct to surmise that one of my longer term objectives is to move away entirely from using 'Flight' R/C technology to control my engines (and their interaction with my layout). I'd prefer to use other technology, enabling for instance control via tablets, phones or other intelligent controllers (e.g. RPi) - and all sorts of other functionality too. Just a pipe-dream of course but that's fine, provided I enjoy the trip - then that's all that really matters.

BTW - I am very pleased to hear that heat should not be a problem. I was worried that these little beasties might warm up too much and melt down if I wasn't careful with them!

So, I'm still going to look at all the options. As I go, I'll try to explain what seems to be available 'out there' and which way (and why) I finally decide to do - and of course how I get on (or not!).

Returning to my New Year thought - I hope others will start to describe their G3 'adventures' here too...

Time for bed.

Regards,

IanT
Nothing's ever Easy - At least the first time around.

Offline IanT

Re: Brushless Axle Hung Motor System
« Reply #8 on: January 10, 2018, 08:13:46 pm »
Just a short post tonight (you will no doubt be relieved to hear....) - but a little bit more about 'programming' 30A drone ESCs.

As I understand things, most drone owners 'mod' their ESCs via either coding sequences (from their R/C transmitters) or via proprietary 'card' programmers. Whilst these methods could be used, I'm not convinced that this is the best way to tune them for our use. However, it does seem that Atmega based ESCs can be re-flashed using public domain firmware referred to as "SimonK" (after the Author - Simon Kirby).

This YouTube by Robert Cowan describes the process very well:   https://www.youtube.com/watch?v=MQQX7IIdAtI and also gives some very useful links (for anyone who wants to research further).

Robert also gives a long list of suitable ESCs - however it wasn't obvious that the cheap 'yellow' ESCs available here from chinese sources were included. However, I then found some 'red' ESCs which are described as having "SimonK" firmware pre-installed. Since SimonK seems to only flash onto Atmega chips - it would seem these should be suitable for hacking - I mean re-programming.     :D

Anyway - I've ordered a red one and once I've had a better look at it (by cutting off the shrink-wrap) - I'll let you know more. It may be a week or two before it arrives though.

Regards,

IanT
Nothing's ever Easy - At least the first time around.

Offline MikeWilliams

Re: Brushless Axle Hung Motor System
« Reply #9 on: January 10, 2018, 09:24:34 pm »
"I hope others will start to describe their G3 'adventures' here too..."  Me too Ian.

Must admit that I understand about every other word of your recent posts, but I may benefit indirectly from them one day so thanks for doing all that work.

Mike

Offline IanT

Re: Brushless Axle Hung Motor System
« Reply #10 on: January 10, 2018, 09:49:42 pm »
Hi Mike,

Like all modern technology, what's hidden inside is often very complex but that complexity usually comes in layers and hopefully we won't have to dive in too deeply here. A few people out there probably understand ESC 'tech' very deeply (Simon Kirby being one of them I assume) but sometimes we only need to know just enough to get where we want to be - and hopefully (for me) that will be the case here.   :)

But - however complex something may be inside, as long as that complexity is well hidden away and people can actually use the (modified) device easily - then that's all that really matters.

And yes, I'd prefer not to be the only one 'adventuring' here.... 

Regards,

IanT 
Nothing's ever Easy - At least the first time around.

Offline Peaky 556

Re: Brushless Axle Hung Motor System
« Reply #11 on: January 11, 2018, 10:51:30 am »
I’m already interested Ian if you are going to try and tweak SimonK firmware ESCs, as 12A versions of these are what I have ended up using!  Currently the start up and slow running is ‘reasonably’ smooth, but if that’s an area that can be tweaked for more progressive ramping-up then so much the better. 
If that could happen with a centre-off and reverse then that would be a bonus too, but I’m not holding my breath.  Reason? By dividing up the usable range of the controller into forward and reverse, the sensitivity to allow smooth starting in either direction may suffer.  I’ll be very impressed if you manage it!
Regards, Tim

Offline IanT

Re: Brushless Axle Hung Motor System
« Reply #12 on: January 11, 2018, 02:11:25 pm »
I don't really know what's possible yet Tim - I'm learning this stuff as I go along.

The video by Robert Cowan clearly shows how to set some of the top level parameters (such as 'reverse') within the assembler listing. These soft 'switches' should be fairly easy to experiment with but anything beyond that would require diving deeper into the main programme. This will require knowledge of the Atmel dev tools and Atmega assembler - and I've only used Microchip tools thus far (and on PIC chips). So whilst I know some of the theory - putting that into practice will be an altogether different problem.

I haven't looked at what is involved with using Atmel tools yet either, although they are now owned by Microchip. So some convergence may already be underway I assume - perhaps in terms of their IDEs (Integrated Development Environments). I was briefly using the MPLAB (Microchip) IDE a couple of years ago but have been playing with other (high level) languages on PIC and ARM most recently, so will have to re-boot my skills again I guess.

This was also one of the reasons I felt it was worth looking at other ESC solutions - because (in the longer term) it might make sense (at least for me) to be using my preferred tools and chips if I am going to develop a more integrated system. However, that is all in the pipe-dream stage at the moment - and I think we can get something much simpler, much sooner with a bit of effort.

With regards "sensitivity" this may be a function of several things - not only the ESC capability, but also the R/C being used to generate the servo pulses for it. My understanding is that R/C Tx/Rx's have to be set-up to match their ESCs - as they both have a 'range' which requires matching (or calibarion). This may be something that can be 'tweaked' at the ESC software switch level for our needs - but we will have to see. Longer term I want to go to straight digital logic and move away from traditional R/C tech completely - but one step at a time for now.

Regards,

IanT

Nothing's ever Easy - At least the first time around.

Offline IanT

Re: Brushless Axle Hung Motor System
« Reply #13 on: January 11, 2018, 11:28:21 pm »
Hi Tim,

Was thinking about your 'sensitivity' problem earlier (whilst repairing a leaky shower tray - not my favourite activity  :(  ). I was thinking that this might also be linked to the multi-motor issue too - although you've already mentioned using a 'yoke' to divide the PWM pulse to two motors. I am currently planning to fit a motor per axle (in my case 4 axles) although with the power available that may not be really essential.

"If that could happen with a centre-off and reverse then that would be a bonus too, but I’m not holding my breath.  Reason? By dividing up the usable range of the controller into forward and reverse, the sensitivity to allow smooth starting in either direction may suffer."

One idea has occurred to me that might help in this area and also possibly be a useful step towards my longer term goals. Assuming I can get a 'workable' ESC/Motor without needing to dive too deeply in - I will still have to drive multiple ESCs using PWM (although newer ESCs are starting to use different firmware & drive protocols it seems - perhaps for this reason).

However, it might be fairly simple to place a device between the ESCs and the Rx - it would look at the incoming signal (and in the main) just repeat it out to the ESCs. I think there are a number of benefits to this idea. The first is that it immediately enables other 'Rx' options to be explored over time (e.g. Wi-Fi & Bluetooth). The second is that with some simple feed-back directly from the motors to the device (hall-effect or opto) it could co-ordinate the axle speeds, for instance eliminating any wheel slip (OK - I know hardly a problem in G3 but maybe an issue with independently driven bogies/axles). It might provide an easier way to 'calibrate' the Tx/Rx to the ESCs too and perhaps other things - but that will do for now.

Probably sounds complicated & expensive - but I'm pretty sure a "blue pill" would handle this with ease - and the ones I purchased last year cost about £2.60 each. For that you get a small 70Mhz STM32103 ARM CPU board which can be taught to speak Arduino or Forth (Hallo Ralph!). Looking at the Rx pulses coming in and echoing them out should be a fairly easy starting point. It's a kind of half-way house between my options 1 & 2.

I have been researching ESC firmware btw - and the more I learn the more I'm thinking that it might make sense to 'black-box' it - in other words, get a workable ESC/Motor combination and then do everything else in the 'layers' above that...we'll see.

Anyway - just a thought for now but maybe a possible next step... assuming we can get past the basic ESC issues...

Regards,

IanT
Nothing's ever Easy - At least the first time around.

Offline Peaky 556

Re: Brushless Axle Hung Motor System
« Reply #14 on: January 14, 2018, 10:15:13 pm »
Ian, I assume you know of the American “Monocacy” system using Bluetooth 4 to control HO scale Trains? Currently it seems to be limited to about 1 amp and not many volts, but maybe they are developing something heavier-duty.
Regards, Tim