• Welcome to The Forum for Gauge 3 Model Trains.
 
The Gauge 3 Society       2.1/2 inch Gauge Association       Cookies and privacy HOW TO JOIN: to request forum membership please click here

Gauge 3 Society members must be logged in to view the Society section
  G3 Clubroom

Welcome to the G3 Clubroom. This is the friendly online forum where members share ideas and inspiration, suggestions and advice, modelling tips, pictures and drawings, and general chat about our fine hobby of Gauge 3 railway modelling. A warm welcome, and enjoy your visit here today.

Brushless Axle Hung Motor System

Started by IanT, Jan 08 2018 17:36

« previous - next »

0 Members and 1 Guest are viewing this topic.

IanT

An interesting choice of prototype Doddy.

I see the TX/RX system is bi-directional but that you can also control six auxillary items directly too. What sort of technology are you thinking of using in your homebrew controller - and I assume that these are six 'brushed' motors too?

Regards,

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

Doddy

I will be using the 6 outputs to control direction and lighting as well as activating non-automated sounds like air horns and whistles. The DC brushless motors will be powered by battery using a modified 4QD controller interfaced to the Revolutions Receiver. The 4QD controller can be cascaded for double (or triple) heading via a connecting control bus. It also alleviates control issues for HST, Blue Pullmans, ICE and Acela train formations.

A separate interface board will take a feed line from the Revolution Receiver and activate an appropriate sound bank from the sound card. Thus allowing gentle changes in engine tone or thrashing engines dependant upon the users throttle changes. Thus bypassing the acceleration and braking characteristics and the soundsets embedded in the Revolutions receiver. It will also be able to take a standard R/C PWM input as its source of control.

Given that when somebody is successful in developing a multi-channel Brushless Motor Control System for railways, then my I/O card will be able to integrate into that technology as well.
"You don't know what you don't know"

IanT

Very interesting Doddy.

I've just had a look at the 4QD site (and their current range of controllers) but they seem to be all for brushed motors at the moment. I did notice that their smallest controller (SST 30A) was "programmable" via it's Picaxe micro, currently just with open loop PWM but apparently with closed loop (e.g. sensored motors) coming soon.

Are your motors sensored?

The Picaxe is programmed in a form of Basic which could "easily" (always a relative term) be ported to the much more powerful Micromite if it was useful to do so (but obviously not for a 4QD device). Interestingly 4QD make their Picaxe programmes available for download (and modfication by their users) so I will have a look at what they have done just out of curiosity. Unfortunately there's nothing "brushless" there (at least for now).

Regards,

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

IanT

Very quick update on my progress - as the cable I ordered has just arrived. I've not received the level shifters yet but may be tempted to just rely on a 5v tolerant Servo pin..

The reason being that I've found this video which seems to answer many of my questions with regards to what kind of ESC the "Red SK" versions are. This guy seems to confirm that they are 'straight' .tgy types but with an older version of the SK firmware. He then flashes it to the latest (2015) version as a test - and this is the source version I've been looking at. Although he doesn't alter anything - it should then be very simple to set the 'reverse' option and at least get the ESC driving forward and backwards. I'm very pleased to have found this, as it removes a layer of uncertainty (in an area that already has more than enough mystery from my point of view.)

So if anyone is curious - this is the process I will be trying to emulate as soon as I've got everything set up (and of course I haven't had anything running in either direction yet!! - but more small steps... )

https://www.youtube.com/watch?v=5WQfVI8v7aw

Regards,

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

Gavin_B

Hi Ian,


I am still working on it but 3d printing has taken over.  I have been meaning to comment on your posts on the forum but never got around to it.  I have progressed from the video but still not got a complete solution yet.


The plan was to use a nodemcu to replace the arduino uno you see in the video to get wifi control.  It turns out this is not that simple.  I use the arduino to generate a sine wave (well 3 waves) and then the triple half bridge to amplify this.  This works well until the wifi part of the arduino intrupts and pauses the sine wave generator for a fraction of a second, leading to stuttering of the motor.


I have got over this by using a master/slave arduino,   one to do the wifi and one to just control the motor.  This works well and is thinking about it a better solution as it will allow for more expansion allowing lights and sounds etc.


I have a working solution I just need to replace the UNO with something smaller to make it small enough to fit in a loco.  I tried a tiny85 but that was to hard, next step is 2 nodemcus which will be around the same size as the rivo board.


Am more than happy to share code and ideas.


Gavin

IanT

Thanks for responding to my PM Gavin.

I've been tied up with other work the past few evenings but just about have the test rig ready - unfortunately my oscilloscope has just died (it was very old) and I probably can't fix it.  I will try some test runs anyway - but I am expecting to see 'cogging' at very low speeds. I think I have to further explore my original 'Option 1' a bit more before moving onto 'Option 2' - which is very much where you already are it seems.

Having said that, I have purchased some cheap Hall effect latches and have been pondering how best to fit them - as I feel that 'Sensored' drivers might prove to be the way to go for really slow speeds. However, I've seen a Sine Wave generator used elsewhere for BLDC and it was on my list of things to look at - as well as a current limiting approach. If I can keep it simple (and cheap) then that would of course be preferable.

I've a Uno R3 sitting around idle but for this, I would probably go straight to a cheap Blue pill (STM32 ARM) - half the size of the Uno, much faster and cheap. It can be flashed to handle Arduino code of course, although mine are running Mecrisp.

Whether I end up using a commercial ESC or a custom MPU - my general idea is to have a single chip (MMB) 'central comms controller', watching the motors, various sensors and driver commands. I haven't really looked at this layer yet but do know that others are using ESP2866s under MMB (my preferred HLL) - although they are using CFunct Serial Libraries for speed. This doesn't sound too different to your approach - and Doddy seems to have a similar idea brewing but with a proprietary R/C controller...

And - yes please.  I would very much like to see the details of your current set-up (hardware & listing) - although perhaps we should spare others here the dreadful detail ...   :-)

Regards,

IanT

P.S. For those who are following this thread in more detail, Gavins' very interesting video can be found here:

https://www.youtube.com/watch?v=wXZXCIT3-Ok

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

LankyTank

I look at the words - individually I probably know what 98% of them mean, then you go and put them all together and that's it, you might as well be speaking Swahili or Serbo-Croatia - I know, it's a magic spell, you've been talking to J K Rowling....?

No, oh, OK, it's to do with motors and that magic electric liquid stuff - Keep going lads, but...... it'll never fly.

Pmsl
Barry

IanT

That's the problem Barry - in our case we don't want them to "fly" - very much the opposite in fact.    :-)

But just suppose we could give you a simple wiring diagram, a couple of eBay links (for parts) and then a nice fellow member was willing to wave a 'wand' over one of the bits for you - and then all you had to do was find somewhere to install everything in (or near) your 'bogie' - would that be less intimidating and more useful?

Regards,

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

IanT

And talking about "understanding only 98%" Barry - I had to Google 'PMSL'

Must be my age...   :-)

Regards,

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

Gavin_B

Hi Ian,

With apologies to everyone else this may get technical!!

For the "loco" end I am using a nodemcu esp8266 (brilliant little chips) for the wifi control.  This will then use i2c communication to currently an arduino uno that does the motor control  this will be replaced with either a arduino nano or another nodemcu.  This then runs though a triple half bridge amplifier which is mounted on a L6234 Breakout Board.  The motors are 2208 gimbal motors that allow very slow speed control.  I have modified them to allow a 3mm carbon fibre shaft straight though the motor.  There are some motors that are hollow shaft that can connect onto a 6mm slaters axle. 

This allows forward and backwards speed control with a reasonable turn of speed and good slow speed power as per the video.  it also allows a brake affect as the L6234 board allows this.

For the hand end I am using any mobile phone that can run a web browser to connect to a home automation hub running on a Raspberry Pi3 running openhab2.   This then connects to to the nodemcu via MQTT.  It is complete overkill for 1 loco but when you add signalling in as well it becomes very powerful.  There is another video on my channel showing how powerful this can be using amazons alexa to allow voice control for a signal system.

I am working on using the signalling system on Warton Road which will simplify the wiring as only 12v is needed along the whole 100 foot layout.

I cannot attach .ino files will try PM


Gavin_B

Oh I forgot,

I have used this system to drive 2 motors at the same time.  As they use the same sine wave generator they are always in sync, the 2208 motors fit within a 3 foot wheel so perfect for a bogie.

G

Gavin_B

Quote from: LankyTank on Feb 04 2018 16:59
but...... it'll never fly.

Well if we get it wrong it will fly!!!   Some of the motors can spin upto 20,000 rpm.  Put that on an A4 and you could in theory get to over 200 MPH for a guage 3 loco!!

IanT

Quite a bit to think about (and investigate) Gavin - thank you.   :-)

Regards,

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

Doddy

Quote from: Gavin_B on Feb 04 2018 18:39
Well if we get it wrong it will fly!!!   Some of the motors can spin up to 20,000 rpm.  Put that on an A4 and you could in theory get to over 200 MPH for a gauge 3 loco!!

So making a model of a slipping Western Class 52 diesel hydraulic would work well then?

A bit like this one?  ;)

https://www.youtube.com/watch?v=r7gjYXQQN_k  :o

In all seriousness, thanks to the detailed technical postings by yourself and IanT, I looked for and found a Chinese Brushless Controller with FET and PWM control inputs, along with reversible direction capability.

They are on their way and will be evaluated soonest.
"You don't know what you don't know"

IanT

Well that certainly does give a whole new meaning to "wheel slip" Doddy...

Be interested to hear how you get on.

Regards,

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