Relay Driver - Finished

by Ivan Hamilton 5/5/2009 12:45:00 PM

As briefly mentioned before, I need a way to take the CNC4PC C10 breakout board's output signal (5V@24μA) and switch higher currents and voltages. After the 4 pairs of step & direction signals, the C10 board still has another 4 outputs (spindle, coolant, etc). CNC4PC do sell the C15 (a nice opto-isolated dual relay board). I should just buy two of these (they're quite reasonably priced), but this is about the journey, not the destination.  

In pursuing modularisation I think that opto-isolation belongs on separate modules, so my quad relay board won't have it. All that's required is a few transistors to step up the current, some relays capable of 240V@10A, LEDs for diagnostics and supporting passives (current limiting resistors and fly-back diodes).

With the new X axis coupling, the board drilled and milled without losing position. The only issue was the double-sided tape holding the board down gave up during the final board shape routing (hence the lack of squareness). The isolation ran at 60mm/min and took about 30 minutes to run (I really need to find a way to get 30,000rpm instead of 1200rpm).

To make it easier to place the components, I printed the overlay on paper and stuck it on top of the PCB (using a needle to pierce the lead holes). The Ø1.2mm pads on the diodes & resistors were a challenge to solder (it was very easy to bridge across the milled 0.2mm isolation channels). In the future, for manually soldered boards, I should make both the pads and the channels larger (the board design didn't need such small pads -  Ø1.5mm should be fine).

If you're interested in the tool-chain: Altium Designer for Schematic & PCB layout, CopperCAM for Gerber to GCode, Mach3 for Milling.

 
PCB design


Milled & Soldered PCB


The top overlay and components

 

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

CNC | Electronics

Mill Panel - Rewiring

by Ivan Hamilton 4/30/2009 10:48:00 PM

In my quest to add E-Stop control to the PC & Servos, and PC spindle switching I had already created a new mill panel front and relay holding PCB. All that remains it to rewire the panel.

The only wiring that will be kept is the 240V motor supply & switching (to respective relays), all other wiring will be removed and replaced. I've already removed the control wiring (most of it relating to the dubious "tapping" feature) and need to plan the final wiring (hopefully I can reuse some of the spade terminated wires).

 

 It's fairly straight forward (I'm not showing the 12V supply, or 240V neutral line). You can see the 5 spots that the PCB will need to link into the 240V wiring (well 6, 1 more for neutral). This will give me a very good idea of the wiring links required, and should allow for a well planned and neat job.

After some concentrated effort, here is the result:


Rewired Panel

You can see the the new relay circuit board hanging from the bottom (it will be mounted within the box). I must have had too much time as I even colour coded the wires (and heat shrink!). I had several pieces of the original harness left over, but what remains is much more functional. The next step is a relay driver board to take the signal from the CNC4PC C10 breakout board (5V at 24μA) and deliver 12V to a 320Ω relay coil (38μA). A little transistor is in order here. I think I might mill up a PCB...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

CNC | Electronics

A couple of my favourite electronics books

by Ivan Hamilton 4/30/2009 12:08:00 PM

I thought I drop a quick note on the lumps of tree I've found useful in my electronic escapades.  

Electrical Engineering 101 - Darren Ashby

This is a great book for all those little practical ideas around electronics that you missed when you first learned it. Great for the basics. Read it cover to cover.

The circuit designer's companion - Tim Williams

So now you're actually going to design and build something? What about all those little gotchas in the real world?

This book is filled with how to deal with the real world. It covers the theoretical "ideal" situations, and then shows how to handle the realistic "practical situations".

Wiring, grounding, distortion, interference, heat sinking, etc.

Read it by the chapter when you're thinking about those things. Not for the beginner, more for the novice designer.

The Art of Electronics - Paul Horowitz, Winfield Hill

If there was a book that was seen as the bible, this is it. 1125 pages of detailed information.

Personally, I find it too detailed to just read through, and will read a subsection on the particular item of interest.

An invaluable reference, but fairly full on for novices.

 

 

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Electronics

Mill Panel PCB - PCB Milling

by Ivan Hamilton 4/28/2009 11:47:00 AM

My new mill panel needs both rewiring and new components to allow the PC to switch the spindle on & off. This includes 3 new relays (1 x 240V for "on" latching, and 2 x 12V relays for FWD+REV). Whilst I could just wire them up, it would result in an unstructured mess. I really wanted a nice PCB to mount them.

I had previously fallen in love with the idea of milling PCBs. With etching PCBs, after all the messy chemicals and issues with brokens tracks, etc... you still had to (manually) drill them anyway. I wanted to CNC drill the boards, and being able to isolation route them as well would make PCB creation a single "tool" process.

For about $20 AUD on eBay I bought 5 x 60˚ V-Shaped Carbide Engraving Bits. At a depth of 0.25mm these 60˚ V bits create a Ø0.29mm path at the surface. All you need is some software to create the milling G-code from the PCB's Gerber definition.

I tried a demo of CopperCAM (others have mentioned CircuitCAM, and also exporting as DXF to vector tools for manual manipulation).

After exporting the Gerber & drill files from my PCB software, I imported them into CopperCAM. CopperCAM produces the final G-code, with tool-change commands for swapping thru different engraving, milling and drilling bits. This G-code was then run in Mach3 (blank PCB was held down with double sided tape).


Milled PCB

Unfortunately my mill is designed for heavy work and 1250 RPM is the spindle's top speed. So I used a very slow feed speed of 60mm/min (~0.05mm/rev). I may be able to go faster (maybe 120mm/min) but not much more. I do plan to find a way to mount a high speed rotary tool to my mill to allow for such needs. The slots are a bit sloppy, but I did those under manual control with the V bit as I don't have a small enough endmill - yet.

I'll solder it up today, and look to mount it in the mill's control box. Once again... I'm very happy with the result of my latest mill experiment.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

CNC | Electronics

Mill Rewiring

by Ivan Hamilton 4/2/2009 10:42:00 PM

The ZAY7045 I have has an interesting "feature".

Normal operation:

  • To start: Re-arm the "E-STOP", switch it to "Drilling/Milling" and press the "Start" button (spindle turns clockwise)
  • To stop: Switch it to "Stop" or press the "E-STOP" (spindle stops)
  • To restart: Re-switch to "Drilling/Milling" and/or re-arm the "E-STOP", and then press the "Start" button again (seems a little redundant).

Tapping:

  • To start: Switch it to "Tapping" and press the "Start" button (spindle turns clockwise).
  • To reverse out: Lower the quill until it triggers the bottom switch (spindle suddenly turns counter-clockwise).
  • To stop: Raise the quill until it triggers the top switch (spindle stops).
  • To restart: Press the "Start" button (spindle turns clockwise).

I can see that if you were tapping at the same Z height all day, that this could be a handy option. But the setup to get the quill switch to engage at the right point would be far too fiddly for small jobs.

This is achieved with 1 switch (SPDT centre off), 2 micro-switches (SPDT), 2 buttons (1 NO & 1 NC) and 2 relays (with 5 NO & 1 NC each).

 

So, what's wrong with current controls?

  • The tapping feature was of little use, and will be of less with the CNC conversion.
  • The spindle start is onerous, requiring switching and start button.
  • Spindle stop is uncomfortable (flicking around a flimsy switch).
  • It didn't allow a manual way to start the spindle counter clockwise.
  • The E-STOP doesn't stop CNC servo movement.
  • The spindle doesn't start and stop under CNC control.

What's the answer?

  • Change the spindle switch to CNC-Off-On
  • Create a new independent E-STOP line that cuts power to the spindle and servos, and informs the PC on E-STOP button or axis limits.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

CNC | Electronics

DIY Servo Controller - Initial Mill XY Test

by Ivan Hamilton 9/13/2008 7:35:00 PM

After months of putting it off, I jumped in and slapped two motors on to my mill.

I've already identified that the XY mechanisms on my mill aren't going to be up to the task (they have excessive backlash in both the bearing mount & the nuts).

Therefore, it's not worth spending too much time on the installation, as I'll need to redo it when I upgrade the mechanisms. I still hadn't done a "real world test" on my DIY servos & controller, and was keen to see the mill's table move.

Enter the angle grinder, 2 short pieces of RHS and some hose clamps...

So, what did I learn?

Keyboard: The wireless flexible keyboard I got is great. Chuck it where you need it.

Current Draw: It's not unusual in my 1:1 setup to see the motors draw 10A @ 12V. Hopefully this should drop when we switch to 36V. w

H-bridge Temperature: The H-bridge chips got hot. Real hot. I couldn't keep my finger on the heat sink, hot. Since pairs of H-bridges share heat sinks, I swapped the Y axis onto a different pair than the X axis. Then they both got hot... How hot? Not that hot: 57°C. I put a small fan near and let it continue to run: 32°C (ambient was 25°C). Not neccessary, but a larger heat sink or small fan would keep it cool.

PID Tuning: The inertia & friction of the table's screws changed the tuning requirements quite dramatically.

Encoder Inputs: Since I only used 2 of 4 servo channels on my controller, the other 2 encoder inputs were left floating. Phantom transitions on these lines fire interrupts and unnecessarily consume controller time.

Limit Switches: This was a simple test, and no limit switches were installed. Luckily, the flexible coupling slipped when it attempted to go beyond the table's travel. Limit switches are a must.

DIY Flexible couplings: OK, small length of hose with hose clamps. While there is some twist in the soft hose I used, when you consider the 0.2mm of existing screw backlash (@ 3mm/rev) equals 24°, the <10° of hose twist & <6° of servo error is quite acceptable (for now).

The Z axis hasn't had anything done yet, but that's OK. Baby steps. Although it would be easier, I don't want to automate the quill since it's got a lot of play in its rack & pinion setup. I should get moving on the ball screw upgrade and automate the column.

Even with only the X & Y axes done, the machine is transformed. I'm happy to perform any required Z movement manually for the time being.

All in all... I'm pleased, and it's quite exciting (chips will fly soon).

Currently rated 3.8 by 5 people

  • Currently 3.8/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

CNC | Electronics | Mechanics

Quad H-Bridge Design - Ideas

by Ivan Hamilton 9/4/2008 1:36:00 PM

I'm thinking about the quad H-bridge board I want to build to match my quad DC servo controller.

Standard thinking is a discrete bridge built from four MOSFETs and a pair of half-bridge drivers: 4 x IRFP260 @ ~$5 + 2 x IR2184 @ ~$3 = 200V 30A ~$26
But for lower voltages STMicroelectronics make the VNH3SP30-E a "Automotive fully integrated H-bridge motor driver": 1 x VNH3SP30-E = 36V 30A ~$8

These are used by the H-bridge boards I've currently got (packing a lot of power in to a small space). I was initially scared by SMD devices like this, but having seen people achieve amazing results without specialised equipment, I think it's worth the effort.

The only feature I feel is missing is current limiting. The VNH3SP30-E has internal thermal, over-voltage and over-current protection, but that won't stop it delivering 30A to your stalled 2A motor. Dropping a resistor between the VNH3SP30-E and GND would allow you to determine the current by measuring the voltage at VNH3SP30-E's GND pins and combining that with your knowledge of the resistor's value.

Let's use a low 0.01Ω resistor:

  • V = IR = 30A x 0.01Ω = 0.3V
  • P = I²R = (30A)² x 0.01Ω = 9W 

Therefore, for a 30A draw to show 0.3V, a 0.01Ω 9W current sensing resistor is needed: let's say 2 x 0.02Ω 5W resistors in parrallel.

For low current systems (<3A), the 0.03V drop may be too small to adjust. Let's use a slightly higher (but still very low) 0.1Ω resistor:

  • V = IR = 3A x 0.1Ω = 0.3V
  • P = I²R = (3A)² x 0.1Ω = 0.9W

A single 1W 0.1Ω current sensing resistor could be used in low current situations to make the drop more pronounced.

Add an LM339 to compare the 4 drops against a reference voltage and pass that thru a 4081 quad 2-input AND chip with the PWM signal for the H-bridge.

Piece of cake!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

CNC | Electronics

4 Channel Servo Control - v0.1 Assembled

by Ivan Hamilton 8/29/2008 3:35:00 AM

Well, it's done. I now have a self "contained" version of my 4 channel servo controller.

I've made PCBs for the controller, encoder & driver boards and mounted them all with the CNC4PC break out board I bought.

  • Controller Board (Top Left) - This was my first DIY PCB, and the design is a bit rough (no nice mounting holes, board shape, etc). The firmware can be updated via serial, so I didn't add an In System Programming connector (uC is in a ZIF socket in case of fuckup).
  • PC Break Out Board (Top Right) - This is a CNC4PC C10 Bidirectional Breakout Board. It's a basic BOB with buffered I/Os. Gets data from the PC into the servo controller.
  • Driver Board (Bottom Left) - It takes the 4 PWM+DIR signals from the controller and maps those into 2 dual H-bridge Pololu boards. I've added a couple of heat sinks to the H-bridge driver chips, which should help their cooling.
  • Encoder Board (Bottom Right) - Simply takes neat 4P4C modular connectors into jacks.

The final product is a neat little package... at least for my first attempt.

What comes next?

  • Finish the firmware - Add a few more features I'd like (obey & control e-stop line, output override, set speed, boot-loader CRC checks)
  • Finish the tuning software - Add a few more features I'd like (current status display, general UI cleanup)
  • Mount the meters nicely - The voltmeter & ammeter are just loosely connected at the moment.
  • Load testing & tuning - Does its performance match my original goals? Are there areas in the firmware that need attention?
  • Mounting motors on real milling machine - What's the real world like?

For the first time, I would happily pick it up, move it, and feel confident about it working when reconnected (little coloured bits of heat-shrink reduce confusion).

Currently rated 5.0 by 3 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

CNC | Electronics

Toner Transfer PCB creation - Attempt 2 Assembled

by Ivan Hamilton 8/23/2008 11:27:00 PM

If you've seen my latest PCB creation attempt, you'll know I'm ready to try and assemble my servo controller.

This is the ultimate test of my newly acquired PCB layout and fabrication skills. A good "looking" board will show its true colours when assembled... and I learned a few things.

  • The fill (leaving most of the copper in place and only etching enough to isolate the required tracks) caused problems during soldering. There just wasn't enough clearance for my rough soldering skills. The minimal clearance gap used to allow tracks to weave between the 0.1" pitch pads was too small to deal with when soldering every pad. I dragged solder from pad to fill a number of times, and had to grab the wick. I don't mind taking the extra care when needed, but on every pad? I'll increase this gap in the future.
  • The physical clearances around header sockets and the ZIF sockets were a little tight... I should check such things a little more thoroughly. A sharp knife made them fit.
  • The resistor lengths weren't checked... the carbon films I used were longer than the default I'd selected. They fit with a little inward bending.
  • Repairing tracks is best done with a strand of copper wire laid & soldered along the broken track. A more elaborate method I tried (cutting a new track in the fill) only made things worse.


The assembled controller board

I fired it up, setting the current limiting on my adjustable supply very low to protect the circuit in case of a short. It didn't consume more than a few 10's of mA which was all good. I plugged the serial plug into my machine and powered it up. Boom! Fizz!

Nah, just kidding. The boot-loader showed its startup message and then it all appeared fine. I couldn't properly test it, since my ad-hoc board has all the encoder inputs & driver outputs wired in (as can be seen here), and this new board doesn't. My plan includes making another board (or two) which takes the 10 pin header from the controller and breaks it out into the 4 channels with separate connectors. Given the relative ease with which I've made this one... I'll pump out the extra board in no time.

I think its fair to say, that I'm a little pleased with myself.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Electronics

Toner Transfer PCB creation - Attempt 2

by Ivan Hamilton 8/22/2008 6:24:00 PM

In my previous attempt, removing the paper after ironing was an issue. The Inkjet Photo paper I used had a thin, yet tough, film on the glossy side that stuck between tracks. Removing it was a slow process as any rough attempt would lift the toner track. Also, the paper would bubble and lift when dropped in the water... taking the toner with it. From the web, I knew the results depended largely on the paper, with everyone having their favourite paper. What you need is something smooth (glossy) to transfer a clear image, and easily removed with water.

An idea I had seen was using pages from colour magazines or brochures. The paper is glossy and easily breaks down in water. I looked thru my bin for some junk mail and found a Kmart catalogue: smooth & glossy - yup, disintegrates in water - have you seen these after rain?

I also filled the unused area of my PCB. This will give extra toner to hold the paper down, and also gives the etchant less work to do.

I'm pleased with the result...


The result

The shadow you can see was from my first attempt. This was using the inkjet paper, but chunks of toner pulled up when getting the last of the paper up. I removed it was acetone, but the outline remained. The dark spot at the top right is from lighting, and not really visible (except in this photo).

The outcome was: two bridges & 1 broken track. The bridges were easily fixed with a knife, and the break was repair with some light wire.

The bridges may have been from the toner transfer (I'll look closer next time), and the broken track I think is where I (once again) didn't apply enough pressure near an edge.

Now I'm going to try drilling (not looking foward to that job) and soldering it together.

If I can iron out the bugs from this PCB creation method, it'll open new doors into custom circuit creation. 

We live and learn.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Electronics

Powered by BlogEngine.NET 1.3.1.30
Original theme by Mads Kristensen

About the author

Name of author Ivan Hamilton
"My inner nerd can beat up your inner nerd."

E-mail me Send mail

Adsense

Calendar

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar

Recent posts

Recent comments

Tags

None

    Entropy

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2010

    Sign in