PicOx - Open Source Motor Controller

For Light Electric Vehicle PMDC Motors - Part 3 ...

March 2008


Disclaimer - This project is in a preliminary state of development, every effort is being put forth to share it's progress, and note issues as they arise... Though theworkshop.ca and parties noted in the development of the PicOx Open Source Controller are held blameless and without liability with regard to how this information is used.


Section 2 closed with a schematic and a proto-typed circuit that was tested to 16Amps at 24V and had a working current limit circuit that kept the motor within it's operating range of 24V @ 6Amps...

 

 

The PCB layout to the right is the translation of the schematic listed in the previous installment.

With the addition of a second IRFB4110, a third 20200 Diode pair and three 470uF capacitors in place of the single 820uF.

The red lines denote jumper wires that link circuit elements.

 

 

 

 

 

 

 

 

 

The layout process for this board took essentially a full day spread out over 2 (two). The Allegro ACS75x sensors still have not arrived, so rather then wait, the "Home Brew" current sensor that was hacked out of a Hall throttle has graduated to Ver 1.02.

There was a bit of putzing about to get the image out of ExpressPCB, mostly related to having to clean the Laser Printer to get a clean image. 

As an aside the transfer paper that I used was just a page out of "Nuts & Volts" magazine that had no colour ads on it and was a code listing for a project that I know that I'll never have any interest in building... I've had great success since dropping commercial transfer papers and just using pages cut out of magazines that have a light weight paper and glossy finish.

The listing below is of images of the various steps that I take to make a PCB and should be applicable to any such project... Certainly each person has the option to use or disregard the advice listed but it seems to work ok for me...

 

 

 

 

Key points, Scrub board with an abrasive agent such as Ajax or similar powder cleaner and water.

Wipe dry with clean cloth or paper towel...

Avoid touching the copper surface, handle PCB by edges.

Just prior to applying the transfer, wipe the board with isopropyl Alcohol, or equivalent that will dry quickly with no residue.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Set the iron to "High", but ensure that it has no water in it, as you don't want the transfer to swell or start wrinkling before it has a chance to adhere to the PCB.

 

 

 

 

 

 

 

 

 

 

 

As soon as you can handle the board drop it into a pan of COLD water.

The toner is a plastic particle that melts with the heat of the iron, and the cold water is like a thermal fixer of sorts.

The brd can sit for 5 or 10 minutes to soften-up the transfer paper.

 

 

 

 

 

 

 

 

 

I use either a course steel scour pad like the one shown to the right or a softer plastic pad that looks similar.

The pad is applied very lightly just to rough-up the paper and start reducing it to a pulp.

This image is the last of the scour pad. 

 

 

 

 

 

 

 

 

 

 

The pulp is essentially rubbed off by your finger tips, again with very light pressure...

As tedious as this all sounds, I'm talking about 15 minutes tops from the time the brd hits the water till here..

 

 

 

 

 

 

 

 

 

 

 

This is the step I always forget, and typically makes life much harder down the road when I do...

For fast dry-times use nail-polish for touching-up the PCB traces, or  you can use latex or oil based paints, but it will add a couple of hours at minimum of drying time...

 

 

 

 

 

 

 

 

 

 

This board had 6 or seven spots that needed minimal touch-up and I opted to add my initials in a blank part of the brd.

 

 

 

 

 

 

 

 

 

 

 

 

 

The lettering turned out nice and crisp...

Hopefully it comes out in the copper as well.

 

 

 

 

 

 

 

 

 

 

 

 

 

Personally I feel that since we can't legislate common sense, similarly we should not be able to litigate on the premise of stupidity...

To that end; Please read all labels, warnings, MSDS material that relates to your chemicals and handle per their directions...

 

 

 

 

 

 

 

 

 

 

After 15 minutes...

 

 

 

 

 

 

 

 

 

 

 

After 30 minutes...

 

 

 

 

 

 

 

 

 

After 45 minutes...

Once you think that it's done as much as it's going to... Wash thoroughly with cold water.

 

 

 

 

 

 

 

 

 

 

 

 

 

I used to scrub the toner off the copper at this point...

...but have learned the virtue of "Patience" and have been repaid with superior solder joints as the copper is not corroding in the air and from excessive handling.

 

 

 

 

 

 

 

Each hole is lightly punched to create a dimple that the drill-bit can start into without skating an 1/8 of an inch before breaking off at the chuck.

 

 

 

 

 

 

 

 

 

 

 

 

Initially I like to drill every hole with a 0.020" or 0.025" drill bit and then scale-up to what ever is needed for larger parts and hardware mounting.

 

 

 

 

 

 

 

 

 

 

 

 

This is only the second time that I've opted to transfer a parts mask to the a PCB...

I found that the first time saved some hassles and questions about parts placement, so I figured I'd try it again.

It's easier to apply the transfer after the holes are drilled, and it will last longer as it won't be abused by the drilling process.

 

 

 

 

 

 

 

 

 

If I was a real keener I could have added the part#'s as they correspond to the schematic to really save time...

Over-all though it looks good, it's obvious where the IC's go, and the like...

 

 

 

 

 

 

 

 

 

 

 

Any holes that had to be enlarged were...

And all over-sized parts are test fitted to the PCB, and/or fabricated as needed.

 

 

 

 

 

 

 

 

 

 

 

 

 

The heatsink is just a small slab of 1/4" aluminum that is cut to size, drilled and tapped.

 

 

 

 

 

 

 

 

 

 

 

Now you can scrub down the toner and see that shiny fresh copper for the first time...

I have all my parts and misc supplies ready to start soldering immediately after the copper is exposed...

 

 

 

 

 

 

 

 

 

 

 

This board was stuffed and soldered in about 3 hrs...

Bear in mind that I have very poor eyesight, so 45 minutes wouldn't be unrealistic if this wasn't your first time...

The bottom line is that it should be done as soon as possible after the copper is exposed...

Soldering half on a Sunday night and the other half a week later is a really bad idea (I know...)

 

 

 

 

 

 

 

 

Assembled...

 

 

 

 

 

 

 

 

 

 

 

 

The Power connectors were fabricated out of a small length of used household 1/2" copper pipe.

It's not that an energy apocalypse or economic Armageddon are on the horizon (which they are...) but rather that I couldn't find a suitable source locally or via the web that could have the finished part in my hands in under 15 minutes at near zero cost.

 

 

 

 

 

 

 

 

These are a couple of 30A thermal breakers that I picked up from a supply house...

Actually I bought all that they had (the hording has already started...)

The mechanism is a concave tab that pops up at a predetermined temperature.

These are a TruFlex B150R material that has impressive specs available on-line.

 

 

 

 

 

 

 

 

 

After the success of a "Home-Brew" pre-charge circuit for the BFx controller, I built this unit exactly the same way and added the 30A breaker at the top of the circuit closest to the Battery V+ lead.

This resolves a minor issue that I didn't want to mention on the previous page as I hoped that this would do the trick.

The pre-charge of the caps also keeps the motor from doing a quick jump as the PicAxe power's up and the Fet's conduct for a split second.

Essentially a soft-start for the controller electronics. 

 

 

 

 

 

 

 

Basic operation is hold the RED button down for 5 Sec and flick the "Mains" switch up...

If some one has a hard time with instructions as simple those, perhaps they shouldn't be driving an electric vehicle (though you may want to keep that safety helmet on them...)

 

 

 

 

 

 

 

 

 

 

 

Finally I have the gear assembled with fresh AWG#8 wiring that is crimped and soldered, equipment has been moved from the office to the shop and set-up on a bench.

This the most nerve wracking part, powering up for the first time...

All goes well, the initial waveforms from Section 2 all scope out properly prior to attaching the MY68 motor.

 

 

 

 

 

Even with the motor attached it spins-up and runs under no load to full speed at 24V just like in the office...

With a locked rotor the current limiting function is not working as before... I anticipated this as the sensor was moved from below the IRFB4110 between the Source leg and ground, up to being in direct line with the Motor.

 

 

The copper coils on the sensor are 4 turns of AWG#18 wire times 2.

The wire was doubled-up to handle more current, while the number of turns was reduced to get a broader scale of amperage readings.

So the CurrADC will have to be re-calibrated in the software.

I started to do just than when I found that the current readings were pretty screwy...

 

 

 

 

The Motor had an analog meter wired in-line that would read 3, 5, 8, 10 amps in a linear fashion as the throttle was advanced, but the pc was returning 2, 6, 0, 1 amps or any combination randomly of similar numbers.

 

 

 

With a 5V/div voltage scale, there is a pronounced negative going 20V spike on the ADC output of the UGN3503 that is feeding the PicAxe processor...

Surprisingly the picaxe did not heat-up, but just offered consistently random readings...

 

 

 

 

 

 

 

 

 

The simplest solution was to see if there would be enough Magnetic field off the single conductor to the motor ground to provide a CurrADC value.

In reality I don't need to have even single amp precision, 5 Amp resolution would be good if it was reliably consistent.

The torroid is hot glued to the Hall sensor and the power terminal to avoid mechanical vibrations from disrupting the ADC readings.

 

 

 

 

Unfortunately I can't report that this is a functional configuration...

Since the current limiting routine was non-functional, it was commented out of the code and the PicAxe updated, so that I could try and determine the new CurrADC scale. In the course of making numerous measurements I was able to run the current on the Analog amp meter up to 20amps at full throttle.

Initially I would try brief periods of 5 secs, 10 secs, 15 Secs with smooth ramp-up and down of the current... certainly the tiny MY68 was getting hot and was reading 45C on it's outer shell, but otherwise was holding up.

As I was letting it cool down, I tried ramping up the current in short fast snaps of the throttle from 0 to full. when something strange happened.

The PicAxe locked-up... 

 

 

 

I knew immediately that it was locked as the terminal that I use as a data log from the controller displayed garbled ASCII as it's last entry.

Power-down, back-up and all is well...

After a few tries it locks again.

If I hold the throttle pinned on with a slow ramp-up after about 20 sec the processor locks.

This is a real problem, especially considering that twice the picaxe locked at full throttle... 

The implications of not resolving this problem at this point would be akin to playing Russian Roulette.

 

 

There are several days of work to this point and I'm pretty bummed out... After disconnecting the CurrADC line from the PicAxe and numerous other trouble shooting procedures I turned to the Endless Sphere EV Forums for some ideas...

Over the course of the evening a few folks replied, and the response pointed toward ground noise.

I had considered that there could be a ground problem, but it seemed impossible that certain portions of the ground plane were noisier than others. Up to this point I thought that all points along a conductive path would be at the same electrical potential as every other point along the same plane.

But that is for an ideal conductor under ideal circumstances, and unfortunately this is reality...

 

 

 

This the source of the noise, a negative going spike that measures approx 5 Volts directly off the Source leg of the FET that is closest to the section of the ground plane that services 7 or 8 logic level components in the control electronics section.

After looking at the PCB layout, and literally having it pointed out to me, I'd created a long serpentine path for the noise to service virtually every part possible BEFORE being clamped by the bank of capacitors.

 

 

 

 

 

 

 

The short term solution, or more accurately "Proof" was to add this 820uf capacitor with heavy AWG#14 solid copper legs to clamp the noise as close as I could at the source, which ironically is the "Source" lead from the MosFet...

 

 

 

 

 

 

 

 

 

 

 

The Noise has been tamed to a semi-manageable level of 1.5V at the Grd connection of the LM317 regulator...

There is no amount of throttle snapping that can lock the PicAxe now, similarly the motor has sustained 20Amps @ 24 V for 30 Secs with no ill effects beyond the predictable heat rise...

So in closing this section, it would appear that I've accomplished very little beyond getting an education in PCB design and the associate problems with noise.

 

 

 

 

Since the next logical step is to either add a larger motor to draw more current or bump the voltage up to 36V, it's obvious that more and more capacitors would be need to be added to mitigate quite possibly a text-book example of the worst noise management design of the circuit at hand...

So over the next few days the PCB will be completely revised to place the Large Capacitor Bank as close to the FET ground plane as possible with the logic level circuitry on the other side.

 

Support theworkshop.ca

PicOx (Open Source Digital Motor Controller), 2, 3, 4


Back to Energy

Disclaimer (an unfortunate necessity)
All Rights Reserved theworkshop.ca © September 06, 2008