Jump to content
 

Motor Driver PCB using CAD


Recommended Posts

  • RMweb Gold

Well I've nearly finished my previous project for detecting passing trains using Infra Red Detection, so it's time to start the next project!

 

I have high hopes for this board as:- a/ i've already ran a prototype; b/ it more directly involves trains; c/ has two distict main uses; d/ is far more interesting!

 

This board is a DC controller, in one guise, and a DCC controller in its alter-ego state.

It also, should everything go well AND i am clever enough, be a shuttle unit in either DC or DCC mode.

 

That's quite some spec and I suspect it will take me some time to get all working.

 

OK, first picture is my old prototype for a DC shuttle unit with working signals and sensorless operation - note the diode on the track (one at each end) in place of sensors which stopped the loco in a known position every time.

It was OK but wasn't flexible enough and, after the loco had warmed up, would operate faster than intended. Also, the motor driver IC would only work at very low frequencies which made the loco buzz - not really a problem for the Loco but i've never met anybody who likes the sound of buzzing locos. ie. Like operating a none fitted loco on DCC.

Still, it worked and proved most things enough to allow work to progress to the next level.

 

Kev.

(PS. I sort permission, from a MOD, to continue posting in the CAD area - I was feeling slightly like the 'odd one out' here with all the excellent 3D CAD results. As he said 'he could always move it later'.)

post-12815-0-08654900-1325713835_thumb.jpg

Link to post
Share on other sites

  • RMweb Gold

This next photo is the finished PCB, both sides.

 

Again, I have used the excellent DIPTRACE PCB CAD software from NOVARM - no connection.

 

Kev.

post-12815-0-17946900-1325715489_thumb.jpg

Link to post
Share on other sites

  • RMweb Gold

This photo shows 3 production prototypes that I have built.

 

1/ For software development and is powered solely from a USB port for development on the move - I'm off to Helsinki soon.

2/ For testing at 12 volts. ie. Able to run trains.

3/ The finished unit. Once proven, (and is safe for locos!). This one promised to a friend of mine who wants to run an EM1, in shuttle mode with sound, using my IRD boards for sensors.

 

Kev.

post-12815-0-38987900-1325716939_thumb.jpg

Link to post
Share on other sites

  • RMweb Gold

Wrote a simple ‘ramp-up, cruise, ramp-down, change direction, repeat ad-infinitum’ routine for DC operation and connected the Motor Driver Board to a piece of track.

(No sensors, controls, etc. Just a proving first test, you know, looking for smoke that sort of thing.)

 

Placed a newly acquired 03 371 0-6-0 onto the track and watched it move back and forth in a controlled predictable manner.

 

I then changed the ramp times and speed, and again, things happened on the track as I had programmed.

 

To say “I’m pleased” is an understatement!

I opened a can and then observed things for a while.

 

Observations:-

1/ The 03 moves 2mm more in the reverse direction than in the forward direction each trip.

2/ I like beer.

3/ The 03s cab is lit! This fades in and out depending on the speed at the time.

4/ I’m sure I can program a DC “neutral” AC current to flow which will allow the loco’s lights to remain lit even when stationary – much like DCC does.

5/ Definitely need to add my ‘Infra-Red sensors’ to the design so that things stop and start where I want them to.

6/ Need to add a few POTs to the expansion port so that I can change popular variables on the fly – you know Speed, Ramp up time, Delay, Slow down Time, etc…

 

Kev.

post-12815-0-44737000-1325803691_thumb.jpg

Link to post
Share on other sites

  • RMweb Gold

After several days of testing the shuttle unit, I have some more observations, (and an admission!).

 

Firstly, the admission.

I made two errors on the board. One was I connected the programming port to completely the wrong pins on the micro. Two, I have a POT on the board so that I can adjust things on the fly. Trouble is, I connected it to a digital only input! Doh!

I blame the free beer that was on offer in the hotel where I developed the circuit and PCB.

 

Secondly, my further observations.

That 03 371, I recently bought, is stunning!

After an hour running in on my shuttle service the 2mm extra running in reverse goes away!

I think a further improvement to the circuit would be to add a crawl speed at the end of each run. Thus:- accelerate, coast, decelerate, and then crawl for a short time.

Some of the cheap components I bought are rubbish! Some of the Bridge rectifiers are marked up wrong indicating the wrong +ve and –ve pins! The turned pin socket I have used has lost one pin after just one IC change. Well I suppose I got what I paid for!

 

Still got lots of software development to do but at least I’m running trains now.

Must start thinking about what features to put on the expansion board.

(POTs, switches, LEDs, etc)

 

Kev.

Link to post
Share on other sites

  • RMweb Gold

Well another day another Hotel!

 

But this time I have brought 08 243 and 6 pieces of R600 straight track. (03 371 was too good to risk on the plane!)

(Also brought a laptop, a ‘cheap’ adaptor PSU, (says 12volts dc but I’m measuring 17volts dc! Still, no matter. Just adjust the software to suit.), a PICkit2 (PIC programmer) and myself.

 

I Modified the software to ‘randomly’ extend each run by 0 to 3 seconds of extra crawl speed.

This works exceedingly well. So much so that, with the aid of the diode ‘stopper’, acting as a reference in the ‘off scene’ end of the shuttle line, and extending the run into the ‘off scene’ end by a few seconds at crawl speed to ensure that the loco passes the diode each time then I don’t need any sensors on the shuttle at all as the train always starts from a known position! (No gradual drift towards one end of the line after lots of ‘out and back’ runs.)

 

Observing the ‘350 Shunt’ in operation, on the shuttle unit test track, the return leg always starts off with a “jerkâ€.

Watching this, and thinking about it, I put this ‘jerk’ down to the fact that the loco starts its return, at the minimum speed specified, and ramps up to cruising speed in a specified time.

Trouble is by the time the locos motor has taken up the slack, in the motion and running gear, the loco is already a ways up the ramp curve – hence the initial speed jump from 0 to something a little bit above what I was expecting.

So another software change – I mean feature. One second of crawling at minimum speed, to take up the 'slack', should do it.

 

Another thought has crossed my mind – dangerous I know, but still…

With the shuttle controller connected to my PC, for software development, maybe I could write a Visual Basic program to display the controls of an 08 and then I can drive the train directly…

Hmm…

I know it’s not original, but still tempting.

 

Kev.

Link to post
Share on other sites

  • 2 months later...
  • RMweb Gold

I've decided to improve this cicuit and add some extra features.

 

I've also decided to enter it into this years innovation challenge.

So, for the foreseeable future, you will see developments there.

 

Kev.

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...