Jump to content
 

SMART Power Board


SHMD

Recommended Posts

  • RMweb Gold

I’m going to propose a “SMART Power Boardâ€.

 

It’s a PCB, with a Power Amp on it which will be controlled by a micro controller.

The parts are pretty standard and readily available but the clever bit is that it’s totally programmable. (The little chip is much more powerful than my first computer!)

 

 

Ever bought a train controller or shuttle unit and thought “I wish they had done this bit this way� Well now you will be able to!

 

 

Just some of the boards applications could be:-

 

DC (PWM) controller – up to 2 Amp PWM

DC Shuttle controller – up to 2 Amp PWM

DCC controller – 2 Amp

DCC Shuttle controller – 2 Amp

Loco running in controller – Test track/Rolling road

Turntable controller – 2 phase stepper drive, 2 Amp per phase

Sector plate controller – 2 phase stepper drive, 2 Amp per phase

Filament lamp controller - PWM

 

 

The unit will have a PIC Micro Controller as the “SMART†bit and a L298 dual ‘H’-Bridge as the power bit.

Although I have said 2 Amps for the DC/DCC Controllers you can actually double-up the ‘H’-Bridges to increase the current but in this case 2 + 2 only equals 3.5Amps!

 

The PCB will have flexibility and expansion built in so that even more applications can be realised.

 

But, and there is always a but, designing, building and testing the PCB may seem daunting to some but the real hard bit that will take up all the time will be the writing of the software.

Also, anyone building one for themselves will require a programmer. (definitely recommended.)

 

I’ve just thought, it won’t do all of those things, mentioned above, all at the same time! You choose which application and program the controller for that one.

 

 

Some of you may have seen some of my previous efforts and may even see similarities between what I propose here and what I have previously built.

Those have only inspired me to go further.

 

Kev.

Link to post
Share on other sites

  • RMweb Gold

First draft of the circuit.

 

Positions of the connectors and link combinations have to be sorted/added.

 

One initial problem I have is that the basic compiler I have does not (yet) support the PIC Micro I want to use.

(PIC16F1847)

 

Kev.

 

First draft of the circuit.

 

Positions of the connectors and link combinations have to be sorted/added.

 

One initial problem I have is that the basic compiler I have does not (yet) support the PIC Micro I want to use.

(PIC16F1847)

 

Kev.

post-12815-0-05135900-1332071453_thumb.png

Link to post
Share on other sites

  • RMweb Gold

More work done on the cicuit today

 

Added optional POTs to the Current_Sense circiuts.

Tweaked quite a few resister values.

Neatened up the circuit diagram and added extra annotation.

 

I intend to work on the circuit for another couple of weeks and then to start "laying out" the PCB. A further week, or two, of circuit "improvements" can also be achieved during this time. After that only component value changes can be accommodated, on the PCB, without having to resort to cutting tracks and adding wire links.

 

On the software side.

I have updated my Pickit2 programmer so that it can now work with the proposed micro, (PIC16F1847), but I haven't got anywhere with the Basic Compiler yet.

If I cant get the Compiler to work with the micro then I will have to change it to one that will.

 

Kev.

post-12815-0-85023000-1332193304_thumb.png

Link to post
Share on other sites

  • RMweb Gold

Laptop playing up now so less work done.

(Spent all yesterday evening backing-up!)

 

Added Links for single or dual H-Bridge operation.

Moved the (sometimes) redundent IO not used when dual H-Bridge is selected to the expansion port.

Continued to improve the schematic documentation.

 

The circiut 'may' be nearing completion.

 

Kev.

post-12815-0-99239000-1332366329_thumb.png

Link to post
Share on other sites

  • RMweb Gold

More work done on the schematic but only a little as it is nearly finnished.

I will start work on the PCB layout next week.

 

The biggest concern i had, regarding my Compiler not supporting the chosen Micro Controller, has gone away as there is an update available which now supports it. ;-)

 

That's the good news. The bad news is that my laptop has expired - but it at least had the good decency to limp along for an extra day while I got all the data off. Now I just need to transfer all the licences over.

 

I am still on course for having the PCBs made in 2 or 3 weeks but, as I have said before, the real work for this project will be in writing the software so that this one design will be able to fulfil so many different functions.

 

Kev.

Link to post
Share on other sites

  • RMweb Gold

Just arrived in Shanghai and I must stay awake for at least 8 hours!

 

So my challenge entry will benefit from the time available.

(Incidentially, and totally irrelevent, I was going to use the long flight, to Shanghai, to work on the entry but they upgraded me to Business Class and it was so comfy that I slept for 7 hours straight!)

 

Below it gives an indication of the work involved in 'laying out' a PCB Artwork.

This shows the PCB after some initial 'rough' placement. (15mins.)

The schematic CAD has updated an exisiting PCB, but what's left will also have to be deleted anyway leaving the Whole board to be manually 'layed out' by hand. (Well me really using CAD!)

 

And, as I happen to be in Shnaghai, I will be able to get the PCBs made quickly and cheaply.

(Must brush-up on my Mandarin. "Zi li yi bei? Xie xie.)

 

Kev.

post-12815-0-60331600-1333111701_thumb.png

Link to post
Share on other sites

  • RMweb Gold

I've arrived in China Friday.

I now know that the whole of China is on holiday until next Thursday (Ching Ming festivel - Ancester holiday or something)!

Why don't people talk/ask/inform me before i arrive/set off? God knows they are paying through the nose for me!

Now I have 5 days of doing nothing except modelling design projects in CAD... ;-) OK, a day and a half already wasted but still...

 

I've thought of a new function to add to the list in Post 1 er, (Post zero that is):- Loco Decoder. OK it's a HUGE Loco decoder {roughly 3" square!} but it will handle 3.5Amps! It will be at the cost of adding 2 resisters to the PCB's real estate - thus making the PCB even bigger. (Resister cost is irrelevent, 100 resister cost in China {30p} is irrelevent, extra PCB {space} cost is irrelevent {cheap!}, "RESISTANCE IS FUTILE..." - sorry! Anyway worth 2 resisters I think.

 

Also! A Heavy Duty (a 3.5Amps or 2x2Amp) function decoder aswell!

Hmmm... A lot of saftware to write after the PCBs are made.

 

There. Easy to say now lets work towards it...

 

Kev.

Link to post
Share on other sites

  • RMweb Gold

First of all I must say thanks to Suzie and Keith - you know who you are.

They have helped immensely by providing 'links' with a wealth of info freely available - Thanks and much MUCH appreciated.

 

 

The "Smart Driver Board", when complete should NOT be considered a finished 'Shop Bought' product.

It should be more considered as a platform on which to experiment. A motor experimentors board, if you will.

The hardware IS designed to facilitate many differing variants of motor control with just one PCB - but with a definite bent towards model railwary layouts. (The useful bits - that we all wanted and thought were easy - until they were tried. Still WILL be difficult but this PCB makes it that little bit easier.)

 

Needless to say that here is yet another version of the circuit:-

 

Kev.

post-12815-0-19618400-1333464493.png

Link to post
Share on other sites

  • RMweb Gold

Hi The Nth Degree,

 

Yes SDB1 will be able to drive/control a Stepper Motor.

 

That's why this design has two 'H' Bridges - one for each Phase. (or 2 dc motors, or 1 big dc motor, or 1 motor + 1 'magnetised' coil, or...)

(A 'H' bridge is a group of 4 controlled 'switches' which usually have a high current requiring coil inbetween them.)

 

SDB1 will drive Steppers up to 2A / Phase with a voltage range from 5volts to 46volts - BUT NO CHOPPING CIRCUIT TO LIMIT THE CURRENT for over voltage driving applications!

Sorry to 'shout' but that last bit is very important but can be 'got around' by ensuring that the stepper used specifies a working voltage (say 5v or 12v) at a current of 2Amps or less / phase. (Current 'Chopping' limiting maybe available later!)

 

A typical Stepper Motor (envisaged) would be 5volts, 0.8Amp/Phase, 200steps/rev, 1.8'step angle...

Uses - Accurate, (needing a 'calibration' mark and start-up registration procedure), would be 'Turn Table' and 'Sector Plate' control. (reduction gearing definately recommended/required!)

Uses - Simple, (needing simple limit switches to indicate the limit of travel), would be mechanical signals, level crossings, simple mechanisation projects like shed doors, etc...

This really is one of the "exciting areas" of this "2012 Challenge".

 

My design priority/phylosophy is:-

DC Motor control proving and applications,

Stepper Motor control applications,

DCC applications.

 

This is mainly due to the time required to write 'generic application's let alone to interpreting strict standards!

 

Kev.

Link to post
Share on other sites

  • RMweb Gold

Today I've done 'lots' of work.

More changes to the schematic, added missing components to the libraries, and started the PCB by placing all the components on the 3 inch square area I want the finished PCB to be.

 

Kev.

 

I don't just fear that there will be many many mods done to the PCB - I know there will be!

post-12815-0-09363200-1333882264.png

post-12815-0-48374400-1333882321.png

post-12815-0-99406700-1333882344_thumb.png

post-12815-0-74280700-1333882370_thumb.png

post-12815-0-95098700-1333882438.png

post-12815-0-93692300-1333882469.png

Link to post
Share on other sites

  • RMweb Gold

More development. I'm happy with the PCB artwork but at some stage you just have to stop tinkering!

 

Everytime you look at the board you see some possibility or refinement.

Not stopped tinkering yet!

 

Attached is the PCB CAD file as view from above and then a 3D representation of the finished PCB.

The NOVRAM PCB CAD software really does a good job of this!

 

Regards,

Kev.

post-12815-0-58007000-1334232021.png

post-12815-0-42123500-1334232044_thumb.png

Link to post
Share on other sites

  • RMweb Gold

I'm nearly at the stage where I will be submitting the GERBER "artwork" files to the vendor for manufacture. (I'm guessing £70 for 15 boards.)

(They only speak Chinese and I English, well a dialect thereof, and a smattering of Mandarin. Its always a trial but they now know my PCBs are bog-standard! This helps a lot.)

 

But I still have the opportunity to "tinker" with the artwork.

Although I have put "© KNS" on the PCB I really don't think this means anything, and besides, I want as many people to benefit from the 'generic design' as possible. (Full schemic diagrams and CAD files to follow. - Promise!)

I have no intention of producing this commercially. With this in mind I was wondering whether to put on the PCB "SBD rev1" or "SBD RMWEB 2012 Challenge Rev 1."?

 

Regards,

Kev.

Link to post
Share on other sites

  • RMweb Gold

More tinkering - this part of PCB layout is very addictive, and for me, therapeutic!

 

Below is a 3D representation of the finished PCB.

After receiving the 'nod' I have included the words "RMweb 2012 Challenge" on the PCB.

I quite like how that looks!

 

Kev.

post-12815-0-00855900-1334321252.png

Link to post
Share on other sites

  • RMweb Gold

Thanks The Nth Degree. I am more than happy to give advice in areas I know.

It's the rest that you need to be wary of!

 

 

Big thanks Stuart-AU, I will definately look to this supplier in the future. Very cheap! How have you found the quality? - Registration of layers and copper layers marks/missing copper? What about shipping, (around the world that is)?

 

 

Regards,

Kev.

Link to post
Share on other sites

  • RMweb Gold

Some of you may already know that I like to visit the local electronics markets where ever I go and today was no different.

Went down to Xi'An's Xian's Xians, (I prefer XiAn!), market an bought some test motors for the SDB.

The Stepper Motor is a small 5volt (I don't believe it), 1.8' 2 phase, 0.59Ohm/winding, 6N/cm unit of size ~30*30*16mm.

The DC motor is 6volts.

The Servo is amazing at 180' travel and its main body size if ~7*17*13mm.

Costs:- £6.00 for the stepper, £2.00 for the Servo, and £0.30 for the DC Motor! Amazing!

I might have to get some more of these little servos! The're cheaper than Seep's!

 

I've also been thinking about the Power Supply options on SDB.

I think I will have to seperate the Vin and the Vdc supply lines. Unfortunately, this will mean that I will have to run another (thick 0.050") track across the (finished - sic) PCB.

I will also think about remove link20 and just use the connectors and an external wire if I want to power the board that way.

What it really comes down to is "do I want the board to power motors in the 5 to 46 volt range OR in the 5 to 24 volt range"?

 

I will think and then tinker some more...

 

Kev.

post-12815-0-15725900-1334419014_thumb.jpg

Link to post
Share on other sites

  • RMweb Gold

Below is the latest version. Very close now.

Changes to the schematic were to the PSU (motor supply options), changes to the LCD optional j14 connector (making it clearer), and changes to the PCB - many (track and clearance changes, Better annotation to several connectors).

 

I like to include as much info on the PCB as possible. (I hate refering to schematics when the info could have been included on the PCB for free!)

 

Enjoy!

Kev.

 

post-12815-0-39974100-1334668451.png

post-12815-0-41830100-1334668477.png

 

This next '3D' view is of the underside of the PCB showing extra info on connector assignments - useful for when you are underneath the layout, upside-down, in the dark, under pressure, with a sore back and cursing loudly! (Even more info on the top side of the PCB!)

 

post-12815-0-02699000-1334668501.png

 

Note! All the ground planes, that have been added to aid EMC compatibility and also heat distribution.

Though for serious work, (2 amps and above), heatsinks will be needed.

Link to post
Share on other sites

  • RMweb Gold

Very interested to see how you go with the stepper motor. How many microsteps do you have on your controller?

 

Hi The Nth Degree,

 

Err.. zero. No wait, there's at least 1. Wait! Er. Possibly 2 if I disable one side of the H-Bridge and Half-Step it. - No wait again, the L298 has commoned Enables. Plus there is control for seperate supply voltages.....

 

 

Sorry....

No. Microstepping was never a part of the spec of the project. (The L298 Dual H-Bridge driver IC just does not support it) And I really didn't think that the extra accuracy was required as I thought the end gear reduction would not only increase torque but would also reduce step size - but at the cost of speed!

However, there is no limit to the number of steps that your stepper motor actually has!

Thus a cheap and nasty - but useful - 32 step/rev deomo motor or an industry standard - 200steps/rev - stepper would equally be happy connected to to SDB.

 

The key is, as I keep saying, is in the software. This PCB build is the easy bit.

 

Kev.

By the way, whay is your end application?

I could possibly include/steer/advise at this stage of the project?

Link to post
Share on other sites

By the way, whay is your end application?

 

I have an idea to save space in an already cramped loco by using a stepper motor which would then not require a gearbox, providing the controller provided enough micro steps. Eight steps would be an absolute minimum on a bipolar motor of the size I'm thinking of, but ideally 16. I can't find anything ready-made that would do the job. Ideally, a DCC/stepper motor combined controller would be perfect, but it would have to be very small indeed; 15mm x 10mm x 5mm. That would leave me enough space for the motor and some mass.

 

What do you think? By the way, I'm only choosing DCC because the stepper controller needs a constant supply to 'listen' for commands.

Link to post
Share on other sites

  • RMweb Gold

Hi The Nth Degree,

 

I've not replied for a while whilst I mulled this one over.

There is plenty to think about here.

 

I've looked into MicroStepping and in theory, at least, my circuit does support it - without me even knowing it! (Its a side effect of being able to read the windings actual current.)

It all comes down to current control, which my circuit does support, but under software control - that means it will be slow - and possibly, not automatic!

(It's a fast processor it may, I repeat may, be fast enough.)

 

But MicroStepping Drives are not small - you have to physically fit even more components onto the PCB. In your case I would expect the electronics to take up more room than the motor!

 

Again, I ask what is the end application?

It really depends upon whether it is for positional accuracy and holding control OR for speed control.

MicroStepping is rubbish at accuracy but is brillient at smoothing rotaional mechanical noise BUT both at the expense of speed - it will be slow - and steppers are slow to begin with and with low upper speed RPMs!

 

My own circuits' PCB is 3inches square!

Deliberately so, so that peaple with eyes as bad as mine can build it!

 

So, in theory, Yes my circuit can Micro Step - BUT I would like to prove it first. And it will only fit in the largest of Locos!

 

Regards,

Kev.

Link to post
Share on other sites

  • RMweb Gold

I think I meant to say 3" by 3" which give a PCB area of 9 inches square.

 

When I said "3inches square" I meant 3" down each side of the PCB.

 

Hope this clears up any confusion.

 

 

Regards,

Kev.

Link to post
Share on other sites

Archived

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


×
×
  • Create New...