Notifications
Clear all

CNC Milling Your Own PCB

Page 1 / 2
 
crustytv
(@crustytv)
Vrat Founder Admin
Posts: 11067

Santa just delivered my Christmas present early, now to get assembling........ Back later with hopefully something that resembles a CNC.

20211218 151304
20211218 152123
20211218 152509
20211218 152530
20211218 152856
20211218 154519
ReplyQuote
Topic starter Posted : 18/12/2021 4:15 pm
crustytv
(@crustytv)
Vrat Founder Admin
Posts: 11067

3hrs 15 mins later, it's built. Time for some nibbles and a drink, then install the software and do  a setup.

20211218 170115
20211218 170122
20211218 170543
20211218 172610
20211218 173940
20211218 174152
20211218 174850
20211218 174853
20211218 183151
20211218 183201
20211218 184614
20211218 183658
20211218 183702
20211218 184133

p.s.

The little controller, allows you to run the CNC free of being connected to a computer. There is an SD card slot on the back, you copy the PCB design you intend to print to it, that contains the CNC commands which are then executed. There is a tiny display screen, yet to see what the menu system is like.

I may make use of this feature, rather than having this on my main workbench. This flexibility allows me to set it up on the bench in the stockroom. I can design on the main pc and then just copy it to the SD card.

ReplyQuote
Topic starter Posted : 18/12/2021 7:42 pm
peterscott, jcdaze, ntscuser and 3 people liked
crustytv
(@crustytv)
Vrat Founder Admin
Posts: 11067

The bulk of the build is done. The CNC was connected to the computer and some tests carried out. There were some bugs to start with, main two were it not automatically finding the machine, and the other was slippage of the baseplate. Just a short video, as I've been at this since 3pm and I now need my bed. I bet my mind won't let me relax, it will be planning the next steps, John will know the active mind problem.

ReplyQuote
Topic starter Posted : 19/12/2021 12:25 am
jcdaze and peterscott liked
crustytv
(@crustytv)
Vrat Founder Admin
Posts: 11067
Posted by: @crustytv

The little controller, allows you to run the CNC free of being connected to a computer. [.....]

I may make use of this feature, rather than having this on my main workbench. This flexibility allows me to set it up on the bench in the stockroom. I can design on the main pc and then just copy it to the SD card.

After making a discovery, I decided to make space for the CNC on my main bench. The off-line controller does not work with the Z-probe, this means I would have to manually set up the vertical home position to the bed/workpiece. Whilst this is no great effort, it is a little more involved, and as I have the Z-probe I might as well make use of it, and the time saving it offers. The CNC sits quite neatly out of the way, and does not encroach on valuable bench space as I thought it might have.

Tasks today, find some 5 mm MDF for sacrificial baseplate protection, then see if I can get something out of it.

20211219 091941
ReplyQuote
Topic starter Posted : 19/12/2021 10:29 am
crustytv
(@crustytv)
Vrat Founder Admin
Posts: 11067

Spoil plates built, one for 4K size boards and a larger one for 12"x7" PCBs.

20211219 162135
20211219 162254

It's going to take me sometime before I'm anywhere near ready to try cutting a PCB on my CNC.

As I stated yesterday and showed in the brief video, it's all built and responds to commands via the provided software. Well, it moved in the X, Y and Z axis. Today I spent many hours looking at Kicad and my brain was frankly nuked by it. From what I can tell from my limited understanding, It does not appear possible using Kicad to just copy a PCB board trace manually.

It looks like you have to first create a project, which contains a schematic and a board, these are now linked. I then have to populate the schematic with components. Not all the components will be in the library, so I would have to create a custom library and then build custom components. When the components are added to the schematic, they are also added to the PCB, they are in effect linked. Once the cct is built, it can then populate traces to the board, you can, I believe, set this to automatic.

If I'm wrong about that, I'm more than happy to stand corrected.

Anyway, there's no way I want to spend ages replicating and inputting the Thorn cct only for it to generate totally different trace patterns. I thought there must be a way to just short circuit their processes and manually create the traces, without the need for populating a schematic. Thus far, I've not be able to find it.

Alternative Idea

My idea of using the Bitmap I have of the 4K boards traces, and milling it on the CNC, is not such a wacky idea. I found on a French forum it can be done, someone has done the exact same thing, not using Kicad or Eagle but CAMBam. They explained how you can mill a PCB with a CNC if you have only the Bitmap of the circuit back. Looking up CamBam, it is an application to create CAM files (gcode) from CAD source files or its own internal geometry editor. This would appear similar to FlatCAM that came with my CNC, ah-ha I thought.

I think I need to approach this from a different perspective, not from designing a PCB in Kicad, but as a plot.

If I forget Kicad, Eagle etc and go direct to the CAM software packages. Give it a bitmap of the trace and then try to figure out how I generate gcode to cut it out. Good If I can forget Kicad, It's not as though I'm going to be designing new PCBs, all I bought this for was to replicate existing vintage boards. As longs as I can scan the old PCB, convert to bitmap, that should be all I need. This is what I already have in Flatcam, I just need to focus on how to then generate the gcodes from the bitmap.

cambam
ReplyQuote
Topic starter Posted : 19/12/2021 10:19 pm
crustytv
(@crustytv)
Vrat Founder Admin
Posts: 11067

A bit of progress, I think!

I've imported the bitmap of the 4K deflection into inkscape. From there, I performed a trace bitmap, then ran it through the “Break Apart” function. This turned all the traces into separate objects, something I've been desperately trying to do. This now renders the file into a Scalable Vector Graphic format, an SVG file.

At this point, I'm not quite sure what the next possible step is, I know exactly what I would like to be able to do. That is to load up flatcam, or CamBam and create a CNC PCB plot job. Then start importing these individual trace objects, with a view to defining the gcode to perform the cut-out, and if possible also generate drill holes.

The first image below shows the imported bitmap of the deflection board, to Inkscape, and after I had run it through “trace bitmap” and “Break-Apart” routines. Now, rather than being one single bitmap image, the traces are all individual objects. The second photo shows me having dragged the left most trace to one side, demonstrating they really are now multiple objects that I can be manipulated around.

20211219 224430 001
20211219 224508

Time to quit while I'm ahead, and pick up tomorrow. I will then be looking to see how I get these objects into one of the other applications, for plotting.

ReplyQuote
Topic starter Posted : 19/12/2021 11:52 pm
crustytv
(@crustytv)
Vrat Founder Admin
Posts: 11067

Back at it and a little more progress, remember, this is all new to me.

Saving the above via Inkscape as an .SVG file, I then went to Flatcam and imported it as a gerber object.

This worked, but it now appears as just one single object again, is this correct, I've no idea. Despite this, the traces now look even better and more defined. I need to see what is what in FlatCam as I'm unfamiliar with the software, maybe this OK, though I doubt it. Possibly I need to save all the individual objects in Inkscape, as separate file and then import to Flatcam. Who knows a? More research needed.

importexpl
ReplyQuote
Topic starter Posted : 20/12/2021 9:27 am
crustytv
(@crustytv)
Vrat Founder Admin
Posts: 11067

More progress.

I'm now convinced that the approach I've been taking now, is the correct one. Meaning, I'm not creating a new board from scratch, where the circuit is created in Kicad, and from that gerber files produced. I'm basically reproducing the pre-existing artwork, in this case the PCB trace pattern of the vertical board, therefore I treat it as just that.

With that established, the process has been to get the scan of the PCB as a Bitmap into inkscape, then running “Trace bitmap” & ”Break-Apart”. This gets the PCB artwork imported, and importantly each trace now as a separate object. Saving this work as a scalable vector graphic, then allows me to import this file into a CNC package. From there I can now select the traces and define the tool-paths, cutting criteria and ultimately generate the Gcode, that the CNC can understand, reproducing the PCB artwork on my blank copper board.

Below, you can see the SVG file in the CNC software and some traces selected to have their attributes defined. This next, and I believe final crucial step, will be the critical one to get right. Defining the cutting tool size, X,Y & Z axis zero points, cutting depth, track isolation etc.

cnc1
ReplyQuote
Topic starter Posted : 24/12/2021 12:14 am
WayneD and peterscott liked
crustytv
(@crustytv)
Vrat Founder Admin
Posts: 11067

Update on CNC progress; Never has my brain so badly ached.

I've spent the last few days beavering away in the FlatCam software. This is a three-step process, loading in the gerber, creating the geometry objects and finally producing the CNC job. Via the gerber, the PCB loaded into Flatcam. I set the plot to the 0/0 position, or the home position, then set about defining the isolation of the tracks. This required me to know three things about the cutter, its shank, angle and tip. Armed with that info, you input that data into the calculator, along with the cut depth. This gave me a value which is then input to the cutting settings.

Previewing showed the traces now all outline for milling with one pass, but this was not enough, so the number of passes was increased, this now looked better (pic1). Next, I generated the Gcode for the CNC (pic2). After that, I had to add the CNC operations for drill holes. Ooops, a problem, no drill hole gerber. I loaded up Kicad and found out how to generate the drill hole file, saved it, then imported that into Flatcam. Defined the drill bit specifications and then generated the CNC gcode job (pic3).  I now have all I need to move over to the CNC.

pic1
pic2
plot

Now I move to the Universal G-code Sender Software, to set up the CNC machine for operation.

The task in hand was to set the X, Y and X axis home and load in the G-code I generated from Flatcam. X & Y axis were easy, Z not so. For setting Z, I bought a Z-probe, but it would not work. Upon investigation, I found that the cheap (CN) Z-probe had awful wires and were not making contact with the plate and clip. I tried tinning the wires, but they were not having any of it. Resorted to scraping off the “copper”, from the wire and adding flux, but still it would not tin. God knows what cruddy wire they used, I've read about this problem on other products before.

I decided to replace the wires with my own. Once done and connected to the CNC, the Z-probe was now detected and set up was possible. With X, Y and Z axis now set, I loaded the first CNC job (see pic below), and set up the camera to record what was to be for me a momentous occasion, my first PCB production. Cue cartoon sound "Wah-Wha-Whaaaaaa......".

cncready
20220103 164039

No sooner had I sent the job to CNC, it appeared to start, a brief jolt from the machine, but no, it failed immediately. The following error displayed in the CNC console screen.

[Error] An error was detected while sending 'M6': (error:20) Unsupported or invalid g-code command found in block. Streaming has been paused.
The communicator has been paused

After all that! [insert swear word of choice]  No idea why at present or how to overcome it. Now looking into that.

ReplyQuote
Topic starter Posted : 03/01/2022 5:54 pm
crustytv
(@crustytv)
Vrat Founder Admin
Posts: 11067

Gentleman, we have life, but not without some initial hiccups.

As discussed yesterday, using the UGS software to load in the Flatcam Gcode, to then send to the CNC, caused the above error. This turned out to be the M6 code. Reading up on this, apparently UGS does not support M6. So I put in an exception rule to ignore it. Now the CNC would continue, and the milling job started. Hang on, I thought, there's something not right here. It was traversing the route and the circuit was appearing on the copper but wait, why is it so quiet, Oh yes, the spindle is not running DOH!

20220104 142506

Looking at the G-code I could see spindle speed was set to 0.0. I've no idea why this was the case. Suspect this might be another problem with either UGS or something I missed in Flatcam. I decided at this point I would switch back to using the software that came with the CNC for interpreting the G-code, that being Candle. It's a little more difficult to use and calibrate compared to UGS, requiring command line input to set up the Z-probe. However, after following a couple of tutorials, I managed to get it set. I ran a test cut of just a one line trace, the spindle started, the cut made, the job ended, happy days.

20220104 150250

I then loaded the same G-code that had failed on UGS into Candle, and to my delight, the job started. Halfway through, I decided to abort the operation, I could see the 7 pass isolation I'd set, was over the top and I would be left with a mess.

20220104 152414
20220104 155136

I'm now going to redo the geometry run in Flatcam and set the track isolation to maybe 2-pass. I'll hopefully be back and with a video of this run.

Very pleased though, after what seems like an absolute age, I've finally got to the stage where I can mill a PCB, now I've got to perfect the process.

ReplyQuote
Topic starter Posted : 04/01/2022 4:47 pm
WayneD liked
WayneD
(@wayned)
Reputable V-Ratter Registered
Posts: 362

@crustytv Yay! Looks like you're making proper progress, Chris.

 

ReplyQuote
Posted : 04/01/2022 6:19 pm
Jayceebee
(@jayceebee)
Noble V-Ratter Registered
Posts: 1700
Posted by: @crustytv

Gentleman, we have life, but not without some initial hiccups.

As discussed yesterday, using the UGS software to load in the Flatcam Gcode, to then send to the CNC, caused the above error. This turned out to be the M6 code. Reading up on this, apparently UGS does not support M6. So I put in an exception rule to ignore it. Now the CNC would continue, and the milling job started. Hang on, I thought, there's something not right here. It was traversing the route and the circuit was appearing on the copper but wait, why is it so quiet, Oh yes, the spindle is not running DOH! Looking at the G-code I could see spindle speed was set to 0.0. I've no idea why this was the case. Suspect this might be another problem with either UGS or something I missed in Flatcam. I decided at this point I would switch back to using the software that came with the CNC for interpreting the G-code, that being Candle. It's a little more difficult to use and calibrate compared to UGS,

Just reading this is making my brain hurt🤪. Glad you’ve sussed it and got things underway.

ReplyQuote
Posted : 04/01/2022 9:51 pm
crustytv
(@crustytv)
Vrat Founder Admin
Posts: 11067

First full run, it worked but can be improved upon. I'm going to have another run, but this time using a 0.8 endmill.

20220105 163717

ReplyQuote
Topic starter Posted : 05/01/2022 5:11 pm
Jayceebee, jcdaze, WayneD and 1 people liked
crustytv
(@crustytv)
Vrat Founder Admin
Posts: 11067

I spent the evening creating a couple of new geometry jobs to generate new G-code. The first is to try using a 0.8 end mill bit, instead of the 0.2 V-bit. I set a pass number of 5 for track isolation, and that left only a few islands. My objective here is to only have the traces remaining, in effect a sort of physical solder mask. To achieve the full removal, there is a NCC plugin that allows you to define copper to remove. I now have the two G-code jobs ready for the CNC tomorrow, we'll see how this one turns out.

The images, below, should show what I describe above. The first being the milling of the traces, the second the removal of copper island. The final picture shows the two jobs superimposed upon each other, this is what I should end up with.

job1
job2
job3
ReplyQuote
Topic starter Posted : 06/01/2022 12:14 am
crustytv
(@crustytv)
Vrat Founder Admin
Posts: 11067

@jayceebee

Hi John, despite the CNC milling success, I'm afraid the pads for the pin-outs are totally wrong, on your Kicad project. I mentioned pin compatibility concern in passing, a few days ago, but it slipped my mind yesterday with the excitement of getting the CNC operational.

The pin-out pads are not off by just by a small amount, but off by a fair degree. The first three pins I guess could probably bend to fit the first three pads, but no amount of pin bending, to adjust the other five for fitment, will be at all possible.

I suspect the same problem is going to be present on TF401 project you sent me. As I say, I only noticed this morning when I offered up my Matrix version, which is pin placement accurate, for the Thorn board.

See attached pic. Do you think there is any way you can rework this, or is it not going to be possible? If the latter is true, then I guess the only way out of this conundrum, is to make an adapter plate that I solder to the milled board. A real apollo 13 carbon monoxide scrubber moment, “we have to make this, fit that, using just this!

20220106 073036
pins
kicproj
ReplyQuote
Topic starter Posted : 06/01/2022 8:40 am
Jayceebee
(@jayceebee)
Noble V-Ratter Registered
Posts: 1700

Hi Chris, while watching the CNC video I saw immediately how far the pin mounting pads were out and thought you might have a problem. Leave it with me and I’m sure I’ll be able to improve things on both TFs. Like yourself I’m still learning and it’s a big help to see the milled board next to your proto board version.

ReplyQuote
Posted : 06/01/2022 11:38 am
crustytv
(@crustytv)
Vrat Founder Admin
Posts: 11067

This may further assist you in amending TF402. You can see the two pairs of three only cover 5mm, with the middle pin at the 2.5mm mid-point.

The board width is 50mm, anyway the ruler should help give you the exact spacing you need to edit the Kicad PCB footprint. To further help, from left to right the pin map is = 14,13,12,9,6,4,3,2.

Starting from Left-hand side at 0mm, the following:-

  • at 15mm pin 14
  • at 17.5mm pin 13
  • at 20mm pin 12
  • at 27.5mm pin 9
  • at 35mm pin 6
  • at 40mm pin 4
  • at 42.5mm pin 3
  • at 45mm in pin 2
  • at 50mm board end

Once we've solved this, I will do the same for TF401.

20220106 105813
Posted by: @jayceebee

Like yourself I’m still learning

Indeed, and it's appreciated 👍  I also think we're a couple of nerds as, although brain aching, it's also immensely addictive. I could however do without the middle of the night ideas that had me up at 03:45 and into the workshop the other day, I just couldn't rest.

ReplyQuote
Topic starter Posted : 06/01/2022 12:04 pm
Jayceebee
(@jayceebee)
Noble V-Ratter Registered
Posts: 1700

Ok I’ve redone TF402 and it’s on its way. If it’s OK please do the pin positions as above but with TF401, I should be able to shave a few mm off the board size also.

ReplyQuote
Posted : 06/01/2022 8:34 pm
crustytv
(@crustytv)
Vrat Founder Admin
Posts: 11067

Well, I was about to do a new run of a board with John's latest PCB layout, when disaster struck. There was a rather large PHUT! It emanated from the CNC's power brick!

It's 24V 5A, upon first opening it up, nothing was obvious, but there was that usual acrid smell. Delving a little deeper, under the 400V 82uF, revealed R104 had expired quite abruptly, with what appears to be damage to R052 as well carbonisation to J2, as well as the underside of C051. No idea what caused this other than cheap CN production. On the surface mount side there appears no damage, however the board seems to be again substandard. Plenty of corrosion on one end, with solder mask flaking. The two 25V 680uF through-hole electrolytics on the other side, look corroded too. All in all, not a very good example of a PSU, but I what did I expect.

20220106 212122
20220106 212132
20220106 222258
20220107 092338
20220107 084937
20220107 085006
20220107 092358

John's take on this was as follows.

“Standard failure mode on SMPS. Something caused the mosfet to fail, one of those resistors will feed the source and the other the gate. Blasted as the mosfet went short. Probably being run within an inch of its design. The 2.1A unit I have is physically larger.”

I complained to Amazon and the Third-Party Seller. Amazon offshore support, as you can imagine, were about as useful as a chocolate teaspoon. Never getting past their script of return the item, when all I wanted was a replacement brick, it just didn't get through to them, so gave up.

I did manage to contact the Seller direct, and they responded quickly and were much more helpful. They offered to send a new brick direct from CN (2-3 weeks). Upon reflection, I decided to decline this offer as, I'd just end up with another substandard PSU.

I then had a frightful thought, what if when the PSU brick expired, it sent some untoward spike into the sensitive CNC computer controller, it was plugged into, Yikes, better check. As I had the brick apart, I reused the 5.5 mm centre +/ve plug/lead, cut the ends and attached to my bench PSU. Set it to 24V and powered it up, the CNC also powered up, and I could control the X, Y and Z axis', what a relief, it's OK.

20220106 221755
20220106 222929

I've ordered a couple of 24V 5A bricks as replacements, one a variable one with multi adapters and one fixed. Before using either, I will open and evaluate and possibly uprate if required. I also had a thought about making my own 24V 5A regulated supply.  In the meantime, I will continue to use it via the bench PSU, which is more than man enough for the task.

Hopefully, after this minor detour, today I can get back to the task of generating the new geometry files and G-code for the new Kicad project John sent me last night. All fun and games!

Edit:

Out of interest, I removed the K3567 MOSFET, it tested OK. Then removed the VF20100C Dual High-Voltage Trench MOS Barrier Schottky Rectifier, it tested OK. The KBP210C bridge rectifier, however, was another matter, it tested bad.

20220107 143718
ReplyQuote
Topic starter Posted : 07/01/2022 10:14 am
crustytv
(@crustytv)
Vrat Founder Admin
Posts: 11067

New Variable PSU arrived, now this little diversion is over, back to work on the TF PCB

 

20220107 182847
ReplyQuote
Topic starter Posted : 07/01/2022 7:30 pm
Page 1 / 2