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

0 Members and 1 Guest are viewing this topic.

Offline Doddy

Re: Brushless Axle Hung Motor System
« Reply #60 on: February 17, 2018, 10:53:31 pm »
The language you understand is probably better than the filthy language I used to try and get the forums website to get my text into line with the format in the way that I wrote it.  >:(

Deltang operate their sales model through distributors, so you are likely to see the same or similar designations for that range of products through different channels. From my brief look on the Micron Radio Control website, it would appear to be a similar designation to that of other Deltang dealers.

Personally, I like the faceplate that RC Trains has had printed for the transmitter. They also have a lot more information on the products capabilities - especially for controlling trains.



I do agree with you about the pleasant ergonomic layout, even if I am a bit shaken by the use of Ralph's British Gas style cooker knobs on his transmitter!  ;D
"You don't know what you don't know"

Offline IanT

Re: Brushless Axle Hung Motor System
« Reply #61 on: February 17, 2018, 11:01:16 pm »
I know some G3 folk have already moved away from 'Flight' technology Tim - but the first R/C train systems were quite expensive from what I can recall.  The Deltang units seem to be much more reasonably priced though - and I look forward to seeing how your project takes shape Doddy.

We've had the Grandchildren here, so not too much has happened G3-wise in the last day or so...they are delightful (but exhausting).

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

Offline cabbage

Re: Brushless Axle Hung Motor System
« Reply #62 on: February 18, 2018, 01:54:21 pm »
Robert!

There is nothing wrong with the Davies 1510 control knob. I always use them on everything that I build!!! Given the supplied squishy rubber  things as supplied a good grip either with fingers or in the case of a guitar pedal - toes is far better. If I had wanted something more bizzare I would have used "chicken head" knobs....

Regards

Ralph

Offline IanT

Re: Brushless Axle Hung Motor System
« Reply #63 on: February 20, 2018, 11:48:11 pm »
Well, I’m afraid I seem to have “bricked” the Atmega MPU on the ESC – it’s probably not completely fried but in practical terms it might as well be. Not only that but I’ve spent quite a lot of time getting here, so I won’t bore everyone with all the rabbit holes I’ve been down but will try to mention the main ones...

Going back to where I left off last time, when I tried to use the KKMulticopter flash tool it simply wouldn’t work. It had worked the evening before but the next day it wouldn’t fire up and I couldn’t think why. However, I felt it had to be something to do with the Java RTE (and Win10) and I wasted some time looking in that area – I had already figured out Win10 environment variables by then. Finally, reading (again) through the KKM site, I decided to try the ‘beta’ version of KKM (0.8beta6). So I deleted the official (.77) version and installed the beta – this came up straight away – and had some new features. Although ‘beta’ it dates back to Dec 2014!

So I then tried to re-flash the Esc with SK-v2015 – and AVRdude seemed to be running OK though most of the process but was unable to verify the new firmware and on checking – it appeared that flash had been filled with Hex ‘FF’ (e.g. all ones!). However, the error message “Cannot set sck period. Please check for usbasp firmware update” was also appearing in the dialogue. So more time was expended in this area, until I found a reference to a problem with some “eBay” USBasp’s having old firmware that didn’t recognise AVRDudes speed commands...and of course, I had one of them. More time was spent looking at this, with some folk recommending updating the USBasp firmware and others saying it didn’t fix the problem. A lot more time was spent trying to get to the bottom of this and somewhere along the way – things stopped working on the ESC.

My current understanding, is that some ‘clone’ USBasp’s cannot have their speed set by AVRDude and therefore don’t work with Atmega devices that use the internal clock (e.g. don’t have a faster external clock) and therefore have a (J3) jumper that reduces the USBasp clocking speed. The 30A Esc I have doesn’t seem to have an external oscillator, so I guess it’s internally clocked. So I fitted the J3 jumper but with no apparent improvement. Unfortunately, the more I looked, the more references to these USBasp causing problems to Atmegas I found – as it seems you can screw their “fuses” with poor flash timing.

I will also add that the Atmel ‘socket’ tool has caused me some issues, as I’m not sure it hasn’t sometimes shifted during use and it also makes it hard to do (other) things when one-handed. Tonight (given an apparently dead chip) I’ve soldered wires to the pads just in case (without any change).

Before I forget to mention it, during this evening, I also updated my Arduino installation (which also uses JRE) and KKM stopped working again. I had to re-boot the PC to delete the Java folder and re-load Java – but then KKM did come back. So it appears KKM is very twitchy if anything changes in this area...which may have been the problem with v.77 - KKM probably isn't completely happy with Win10 I'd guess...
 
So, once again it’s getting late, too late to really think straight about “what next?” – so I will sleep on it and see how I feel about things tomorrow.     

Regards,

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

Offline IanT

Re: Brushless Axle Hung Motor System
« Reply #64 on: February 21, 2018, 09:51:03 pm »
Having thought further about what to do next, this morning I ordered a replacement 30A SimonK ESC to continue work on. Basically, I feel that having come this far along the ‘Option 1’ route, it would be a shame not to try to finish this research. I started out ordering four inexpensive BLDC’s just a few weeks ago – and really knew nothing about BLDCs, ESCs or all the other technology required to use them.  I’m still no expert by any means but I now know quite a lot more than I did at the beginning of January.

I know that the motors will at least ‘spin’ and that I can control them with a simple programme. I know that the ESCs have a ‘tgy’ version (2012) of SimonK flashed on them.  I also understand quite a bit more about the GUI utilities (KKM/BLHeli) that let newbies (like myself) access AVRDUDE easily via Windows 10. I’ve learned (the hard way) not to try to use a ‘cloned’ USBasp to programme an Atmega8 chip with just an internal clock available.

So I will explore using another programming device (perhaps the one I should have used in the first place) namely an Arduino with an ‘In-System Programmer’ sketch loaded on it (Arduino-ISP).  If I can re-flash the ESC, then I think I can improve its start-up & slow speed performance a little – but that may be just enough.  I’ve looked at the SimonK source and clearly friend Simon knows a great deal more about driving sensor-less BLDCs than I am ever likely to.

The last ESC took about two weeks to arrive, so this one will likely be about the same. In the meantime, I will get an Arduino set-up and ready to go. I’m still looking at the other options but if I can get a basic ESC ‘driver’ working, then it will be worth doing further work on the mechanical aspects of my design and building the bogies. I can always upgrade the electronics/software once I have a half-useable platform to work with. I’m still not sure whether this will work but if possible I’ll not only get my engine running but also be able to provide a workable ‘recipe’ that others can follow.

Regards,

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

Offline Peaky 556

Re: Brushless Axle Hung Motor System
« Reply #65 on: February 22, 2018, 07:56:38 am »
“ I’m still not sure whether this will work but if possible I’ll not only get my engine running but also be able to provide a workable ‘recipe’ that others can follow.
Regards,
IanT”

Ian, just make sure the recipe is along the lines of “Jamie’s 30-Minute Meals”  :o

Offline IanT

Re: Brushless Axle Hung Motor System
« Reply #66 on: February 22, 2018, 10:07:13 am »
Watched his earlier TV series and they were very good - not watched his later stuff. Took the family to the local "Jamies" when it first opened. A complete disaster, we never went back, so I'm not surprised his restaurants are in trouble.

As for BLDC 'recipies', well if someone else had already come up with one - it sure would have saved me some time and trouble. Frankly, I'm always very happy to use other peoples good ideas whenever possible. In reality, I think most folk will be quite happy to continue with Brushed motors, given their relative simplicity. So the number of people here likely to try BLDCs is probably very small - so some assistance may be possible in any 'hard to do' areas... we'll see.

However, my Shildon prototype did in fact use an axle-hung motor set-up (on all four axles) - and they were single geared at just over 4:1 ratio. So it's kind of appealing for me to use BLDCs that are near scale size and gearing, as well as in practice, needing something that will fit and work. I don't know for sure but suspect that the prototype motors probably had a mix of shunt and series windings which were switched in (or out) as required to get the engine moving. However, I don't think I'll find a small version of one of those!   :D     

Regards,

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

Offline IanT

Re: Brushless Axle Hung Motor System
« Reply #67 on: July 07, 2018, 12:21:11 pm »
Well a quite day on the Forum (getting ready for the big match?) - so a (very) quick update on my BLDC project... and just been looking at my last 'report'..

In the event not too much progress was made in this area (although some Arduino programming did occur) as our eldest son (and family) moved back in for several months whilst between house moves. This was followed by nearly a month in Canada and most recently a week up in North Wales. However, I've been stirred from my lethergy by the arrival of an email from Farnell on Wednesday.

Last year, I spent some time looking at alternatives to 'drone' ESCs and found a number of interesting devices, some of which were only available "in commercial quantities" and others which seemed just a bit too complicated for my old grey cells to comprehend. However, there was a new TI device that seemed to fit my needs and Farnell listed it on their website - although no stock was showing. I ticked the box to indicate my interest and basically forgot about it. Over six months have passed but Farnell now have them in stock and I've ordered a sample.

Essentially, it's an ESC on a chip, complete with power drivers and computer interface - and most importantly - it's reversable. On balance I've decided it's worth changing the direction of my project to look at it in more detail and try to get a test bench running using it.

More to follow - been told I've got to go out now...and it is a nice sunny day.   

Regards,

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

Offline IanT

Re: Brushless Axle Hung Motor System
« Reply #68 on: July 07, 2018, 06:24:55 pm »
Well we got back in time for the game and I'm sure everyone is very happy with the result!  :-)

Back to this thread - and I've spent a few days trying to understand how the new TI (Texas Instruments) chip can be used to help solve my problems. This involved reading the spec sheet a few times and trying to imagine what work/knowledge would be required to implement the chip in practice. In essence I've replaced one set of 'problems' with another - but on balance I think it is worth a change in direction (assuming I can get it to work). The 'drone' ESC tech is probably already obsolete and therefore may not be available (from China) for too much longer. It also required a good deal of work to get the full functionality I required. So whilst it's a 'built' solution - it wasn't one that seemed to have a long life when looking forward.

The TI chip is new and will probably be around for a good while but is only a solution at 'component' level - and therefore needs a lot more development at systems level. However it implements the tricky software that drives the 3-phase motor and removes a great deal of complexity at the physical level (which Gavin clearly understands much better than I do). The other approach would be to look for a fully implemented commercial system (which Doddy has done) but I enjoy playing with this stuff and hopefully can find a solution that fits my longer term ambitions.

So - I'll post this intro/update - and then provide some backgroud techie stuff (for anyone interested) in the next post...

Regards,

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

Offline IanT

Re: Brushless Axle Hung Motor System
« Reply #69 on: July 07, 2018, 06:53:49 pm »
Ok - for those interested in the tech detail (others may look away now!) - the TI chip is the DRV10987. A quick feature summary is as follows:

Motor Operation range -  6.2 V to 28 V
Drive Current: 2-A Continuous Winding Current (3-A Peak)
Sensorless Sinusoidal 180° Commutation Scheme
Configurable Output PWM Slew Rate and Frequency for EMI Management
Initial Position-Detect Algorithm to Avoid BackSpin During Start-Up
No External Sense Resistor Required
Flexible User Interface Options: – including I2C Interface: Access Registers for Command and Feedback
Dedicated SPEED Pin: Accepts Either Analog or PWM Input
Dedicated FG Pin: Provides TACH Feedback – Spin-Up Profile Can Be Customized With EEPROM
Forward-Reverse Control With DIR Pin
Integrated Buck Converter, 5?V, 100-mA
Integrated LDO, 3.3?V, 20-mA
Protection Features – Overcurrent Protection (Phase-to-Phase, Phase-to-GND and Phase-to-VCC Short Circuits
Lock Detection to Detect Rotor Lock Condition
Anti-Voltage Surge (AVS) Protection & Undervoltage Lockout (UVLO)
Overvoltage Protection – Thermal Warning and Shutdown • Thermally Enhanced Package

So in summary - this chip seems to do everything I might need to drive a small BLDC motor and provides some simple ways to control it. Essentially the speed can be directly controlled via a PWM (or Analogue) signal and direction controlled via a single I/O pin or even a simple switch. I had hoped that the I2C comms would let me control multiple motors from one CPU - but it only has a single I2C address, so would need a CPU per DRV/Motor set. However the I2C can be used to configure the internal firmware to tune the DRV to the motor and set things like ramp-up speeds etc. So my current thinking is to use one DRV per motor - with a single MCPU controlling multiple DRV/Motors via seperate PWM 'channels'. I'm more comfortable with this - as I can do this in a high level language that doesn't need to be particually fast and lets me hang other things in there as I develop other facilities.

I will need a PCB to mount these on and have never tried to develop one before - but I'm hoping my friends at MERG (who I know do this stuff routinely) will be able to assist me come up with a basic system. I'm fairly confident that if I can get the basic chip running - that I can come up with the systems to configure and control them...

Enough for tonight  I think...

Regards,

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

Offline IanT

Re: Brushless Axle Hung Motor System
« Reply #70 on: July 12, 2018, 09:36:54 pm »
Well the TI chips have arrived and I was expecting them to be small (from reading the spec sheet) but the actual size knocked me back a bit when I opened the package - they are not just small - they are blooming minute!

I'm going to have to take them to my MERG pals and get some advice with regards working with (e.g. soldering) small Surface Mount Devices - as well as help with PCB design software. Fortunately - I know they can do this. So whilst I'm still excited about the potential of these devices, they are not going to be easy to quickly prototype in quite the same way I'm already used to.

Meanwhile - Ralph is working on his "Brains Onboard" in another thread (using Arduino). As I've already mentioned earlier in this thread - I'm finding Micromite Basic a very useful tool to work with. Apart from writing an 'onboard' control system to drive the DRVs - I also have to write a DRV 'set-up' utiility to write and check the EEPROM settings on the DRVs (to match the BLDC motors being used). This would be quite a task using most 'systems' but fortunately MMBasic supports I2C (the comms protocol required to do it) natively, so it should be much easier. I'll used my MM+ system to do this, as I'm coming to view it as a kind of universal (software) screwdriver. Whilst I write the code on my Laptop, I can also download it with one click - so a bit like an Arduino in that respect. However, I can also edit (and execute) code directly on the PIC chip - so it's very interactive to debug and test (no compile/download/test/edit cycle).

I still intend to use a 28 pin PIC32 (also running MM Basic) for my 'on-board' brains - as it will be quite fast enough and has plenty of memory and I/O for the task. As a cross-platform system MMBasic is very flexible - I have it running on a RPi 3 (with GPIO access) as well as directly on my Laptop (in a DOS Window). There is also a very fast MMB version now available on the STM Nucleo-H73ZI (An ARM 7 based system) but I think the 28-pin PIC is quite good enough for my use - provided of course I can off-load the actual motor drive software elsewhere (which the DRV chip will do for me hopefully).

Anyway - very interesting to see all the different approaches to this challenge - hopefully we can make some progress (albeit in my case - probably slowly).

Regards,

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