Skip to content

9. Electronics production

Editor’s note 2023

This was previously assignment 5.

When I started working on this documentation I figured I just had to re-tell what me and my instructor did. He put a programmer together on EasyEDA, helped me mill it and we eventually got a program to take the bootloader and burn the fuses. But aparently I didn’t need to add this much information. Welp too late now…

This assignment was such a mess, I couldn’t get a stuffed programmer board working, had to do a few different ones and the errors I got on both Windows and Linux were insane. Everything was moving so fast just tryig to get back on schedule that I didn’t document all the things that went wrong. It wouldn’t be of much use because I didn’t find a solution to any of them, it just worked one time on Linux when all the others didn’t.

Group Assignment - Design Rules

This group assignment involves testing out the design rules for the precision CNC. Knowing the lower limits of what the machine can do with the cutting tools we have access to will affect how we design the PCBs later.

Prof. Neil has made a line test image that we can use to test our machines. They’re available in the class page.

If You can read this an image didn't load - linetest.png

Also a few examples with different bits, a 0.15mm:

If You can read this an image didn't load - 0156.jpg

And a 0.10mm:

If You can read this an image didn't load - 010.jpg

And cheating with a fiber laser… Although I don’t think I’d trust the laser for really fine trace isolation as it seems to still leave a lot of copper behind. Looks like fixing shorts would be a nightmare.

If You can read this an image didn't load - fiber.jpg

Personally I don’t like that test because it forces us to use Mods which I never really used before and since I have limited time this year I figured it would be a safer bet making an .svg file from scratch.

If You can read this an image didn't load - ParametricLineTest

Now I can use other CAM options like FlatCAM. This way I’m pretty sure I’m not breaking any bits mid job. My version also goes up to .3mm diameter. Bit more realistic for cheap v-bits many of us use, no pun intended.

Drag and dropping the .svg works fine, just be careful picking the correct offset in relation to each .svg line and changing to the correct pre-processor. The M06 g-code command tells the machine to change tools and that makes most machines crash on that line even before starting.

If You can read this an image didn't load - Group_FlatCAM

Probably too optimistic on the v-bit width and too conservative on the feedrate but only one way to find out:

If You can read this an image didn't load - LineTest

Tried it 4 times until I was happy with how they came out. I started at 0.2 depth was too much, went down to 0.18 and 0.16. Last one was just 0.1. The final v-bit width I went with was 0.25, forcing 0.19 was fun but pointless. I felt the lines were a bit squigly… Don’t know if it was just the limits of the machine or if the values from my svg had too many decimal points and that was causing problems within FlatCAM with rounding errors. I need to find a better way of exporting flat svg’s out of FreeCAD.

Bit still missed isolation in a few places. Next time I make a PCB I’ll have to try a bit more for consistencies sake.

In the end it also clicked why v-bit calculators need to know the size of the tip and that without a way of measuring it both width and depth values will always be a bit of a toss-up.

Individual Assignment

The precision cnc is a Carvey by Inventables. They have been discontinued a while back. Ours was slightly modded by my instructor.

If You can read this an image didn't load - Carvey

Spec Carvey
Working Area (W x D x H) 290*200*80mm
Maximum Z Clearance 90 mm
Axis Resolution 0.0254mm
Router Max RPM 3.000 - 12.000
Router PSU 300 Watts - 48V
Collet ER11-A
Total Indicated Runout 0,01524 mm
Interface USB
Size (W x D x H) 550 x 520 x 420 mm
Weight 32 kg

The Carvey corner…

If You can read this an image didn't load - Carvey Setup

The mods are easy to spot.

If You can read this an image didn't load - Carvey Close Up

The tool height probe was modded in a way that made surface mapping possible.

If You can read this an image didn't load - Carvey Z-Probe

Not entirely sure about the electronics but the machine cable needs to be unplugged after every use or the small CR2025 battery drains out.

If You can read this an image didn't load - If You can read this an image didn't load - Discharge Battery

Small magnet on the door sensor so the machine can function open and let us vaccum some dust or something.

If You can read this an image didn't load - Carvey Door Magnet

Editor’s Note 2023

As I mentioned before, do ignore the images will be mostly about making my FabTinyISP last year. If you want to see how these files were generated in KiCAD do take a look at Electronics Design assignment here.

CAM

If You can read this an image didn't load - FlatCAM Logo

The software we’ll be using is FlatCAM.

Do be aware that website is old and the domain is misconfigured. It won’t connect if your browser forces HTTPS.

The latest versions can be found here

You’ll notice that there hasn’t bee much activity lately which is a shame.

With the Carvey 8.5 is a safe bet, but 8.994 is way better is loads of fixes. Thankfully someone pre-compiled it and uploaded the .exe in 2023. I’ve used 8.994 with 3018/1610 and it works flawlesly. Just make sure to pick the pre-processor without the tool change commands.

It even has a Roland pre-processor but I haven’t had a chance to test it. Probably more customizable than Mods.

After installing get the Gerbers, those are the geometric data each layer. Chances are you’ll only have a Copper_Front and a Cutout.

If You can read this an image didn't load - Open GRBL

If You can read this an image didn't load - Pick GRBL File

The holes to be drilled are stored in the Excellon file.

If You can read this an image didn't load - Open Excellon

If You can read this an image didn't load - Pick Excellon File

Select the copper layer. The tool diameter shouldn’t be too hard but if you’re using v-bits you might need to run some math.

If You can read this an image didn't load - Select Copper File Pick Isolation Routing And Generate Geometry

Check to see if the path created clears everything. Sometimes if the tool is too wide it’ll fail to isolate traces properly by just skipping sections.

If You can read this an image didn't load - Geometry Preview

Depth involces a lot of variables when using v-bits since the deeper we go the wider the tool becomes. CNC frame and base/spoil-board regidity come into play as well as we need all the force we can get to make sure the tip of the v-bit punctures the copper every, single, time. If not it’ll just scratch the surface of the copper as it also happens when the v-bit is worn out.

If You can read this an image didn't load - Generate G-Code

Pressing generate again will update the paths with the tool diameter giving a pre-view of the final cut.

If You can read this an image didn't load - G-Code Preview

You can go ahead and press the export button.

Move on to the board cutout file. For rectangular boards held in place with double sided-tape Bounding box is the best option. Although it won’t allow for custom board shapes.

If You can read this an image didn't load - Select Cutout File Select Bouding Box And Generate Geometry

Generate the new geometry.

If You can read this an image didn't load - Cutout Preview

The board thickness is 1.8mm and 0.3mm depth of cut is very reasonable. That’ll mean 6 passes.

If You can read this an image didn't load - Generate G-Code

It’ll again show a preview.

If You can read this an image didn't load - G-Code Preview

Same deal, export the g-code and

Holes is easy. This is the old interface but feed-rate is just the plunge rate for the drilling. Don’t wanna over do it.

If You can read this an image didn't load - Generate Hole G-Code

Same tool as cutout and generate.

Tools

First, what’s the difference between a [drill bit and an end-mill](https://makezine.com/article/workshop/endmills? It has to do with how forces are applied. Drills go straight down while end-mills cut to the side.

If You can read this an image didn't load - Generate Hole G-Code

For holes and cut-outs we had 2 flute 1mm wide end-mills.

If You can read this an image didn't load - Endmill

And some v-bits. They usually come in a few diffent V angles but they were running out so I just used the better looking ones.

If You can read this an image didn't load - V-Bit

Iron wool for deburring.

If You can read this an image didn't load - Iron Wool

These are the copper plates. 16x10. 30ish microns of copper. These usually come measured in Onces of copper which really doens’t help.

If You can read this an image didn't load - PCB Plate

CNC’s regularly have 2 wrenches around. One to grab the collet and one to grab the spindle.

If You can read this an image didn't load - Collet Wrench Pair

Different sizes.

If You can read this an image didn't load - Collet

Close up: connect the power in the back.

If You can read this an image didn't load - Collet Wrench Size Difference

Make sure the connector is well stuck to the copper or the circuit won’t close and you’ll break some end-mills. Happens to everyone…

If You can read this an image didn't load - Connect Z-Probe Circuit

Touch the copper just to be sure. It’s hard to see but the LED does turn on.

Editor’s Note

Last couple of times I’ve had to cut something I actually just straight up soldered the cable to the copper. Tired those things peeling off and breaking an end-mill. Even just stabbing the board with a V-Bit is bad since it’ll break the tip off.

If You can read this an image didn't load - Z-Probe Board Connection

Leave it on the end-mill.

If You can read this an image didn't load - Z-Probe Bit Connection

ChiliPeppr

Now we need to interact with the Carvey…

If You can read this an image didn't load - ChiliPeppr

ChiliPeppr’s got us covered.

There are other options like Universal G-code Sender or G-Sender. But the Surface mapping tools of ChiliPeppr are still the best.

Go ahead and pick the GRBL Workspace. HTTPS also breaks so make sure your browser isn’t forcing it.

If You can read this an image didn't load - GRBL Workspace

There’s a small accessory program called the Serial Server you’ll have to download that’ll make the connection between the browser and the Serial port.

If You can read this an image didn't load - Download Serial Server

After installing you just need to leave it running in the background.

If You can read this an image didn't load - Run Serial Server

Now you’ll see a COM port become available.

If You can read this an image didn't load - Connect To Available Serial Machine

You should be aware the Go to Zero button is extra dangerous on the Carvey as the regular Zeroing out doesn’t work as expected.

If You can read this an image didn't load - Button Warning

Personally I hid the button div with [uBlock Origin](https://ublockorigin.com/.

If You can read this an image didn't load - Hide Dangerous Button

When the machine connects it’ll throw an alarm. Click the soft-reset button.

If You can read this an image didn't load - CTRL + X

Now click where it says Click to Unlock ($X)

If You can read this an image didn't load - Click here To Unlock

Ready!

If You can read this an image didn't load - Machine Is Idle

Job the machine into place, above where you want the 0 in X and Y to be.

If You can read this an image didn't load - Jog Machine

Go to the Auto-Level menu.

If You can read this an image didn't load - Auto Level

And click Run Test Probe.

If You can read this an image didn't load - Run Test Probe

Once it touches the copper and stops you’ll need to turn the Carvey Off. That’s the only way to zero it out properly. Like I said, the Go to Zero button can be very dangerous.

If You can read this an image didn't load - Restart Machine

Connect again.

If You can read this an image didn't load - Reconnect To Serial

Reconnect and repeat the steps to clear the alarm, again.

Time to Zero out the machine.

If You can read this an image didn't load - Click Zero Out

Check the console. Can’t forget this step or it’ll be another broken end-mill.

If You can read this an image didn't load - Aknowledge On Console Readout

Back to the Auto-Level menu, the Probe area can be customized but it’s easy to understand.

If You can read this an image didn't load - Probe Area

Click the actual start button.

If You can read this an image didn't load - Click Start

And Let’s Get Probing.

If You can read this an image didn't load - Confirm Auto-Level Probing

By the end it’ll show you how un leveled the surface really is.

If You can read this an image didn't load - Probed Surface Preview 1

Sometimes it can fail if the difference from highest to lowest point is beyond a set value. Which can be changed, and probably should or it’ll fail all the time unless your pcb boards are all smooshed under pressure to keep straight.

If You can read this an image didn't load - Probed Surface Preview 2

Another angle.

If You can read this an image didn't load - Post Run

Import part: Post run -> Send Auto-Levelled Gcode to Workspace.

If You can read this an image didn't load - Send To Workspace

In the correct unit. Probably millimeter. Not the time to mis-click either.

If You can read this an image didn't load - Select Milimeter As Units

This is the step that updates the Z coordinates in the Gcode so go check.

If You can read this an image didn't load - Check G-Code For Update

Unless you want to see sparks flying disconnect the cable from the end-mill. One of the few things I didn’t do in the Carvey…

If You can read this an image didn't load - Remember To Disconnect Z-Probe

And click!

If You can read this an image didn't load - Start CNC Job

And mill!

Soldering Station

This is were all the electronics components and soldering tools are.

If You can read this an image didn't load - Electronics Corner

Plus the powersupplies and diagnotic tools too.

If You can read this an image didn't load - More Electronics Corner

Close up on the power supplies.

If You can read this an image didn't load - Power Supplies

Close up on the Oscilloscope.

If You can read this an image didn't load - Oscilloscope

Some extra stuff I never used.

If You can read this an image didn't load - More Equipment

The TS100 Soldering Iron. Lovely thing. I’ve since bought one for myself and shoved in a custom Firmware called IronOS. Highly recomend both.

If You can read this an image didn't load - Miniware TS100 Solder Iron

Hot Air Gun. Good for reflow and salvaging components from old bolards.

If You can read this an image didn't load - Hot Air Gun

There’s also a small MHP30 hotplate, also for reflow and desoldering stuff.

If You can read this an image didn't load - MHP30 Hot Plate Box

It’s tiny so my instructor made a small platform to help.

If You can read this an image didn't load - HotPlate Table

Controls aren’t too easy to get to but it gets the job done.

If You can read this an image didn't load - Assembly Peek

My FabTinyIsp PCB looking nice and photogenic. Needs some deburring.

If You can read this an image didn't load - 1st PCB

Before soldering anything it should be cleaned in water or Isopropyl Alcohol to remove any oils on the copper from the factory or our hands.

If You can read this an image didn't load - Debur And Clean

Shinny!

If You can read this an image didn't load - Cleaned PCB

I wanted to remove all the extra copper to make it look my first board extra nice… (Probably don’t bother.)

If You can read this an image didn't load - Optionally Remove Excessive-Problematic Copper

When I started I didn’t know but use flux. Lots of it. Personally I’m partial to the waxy one because the pens dry so fast but you do you. A small paint-brush is really nice to help apply it in small amounts.

If You can read this an image didn't load - Use Flux

Plop a tiny bit of solder on a single pin.

If You can read this an image didn't load - Add Some Solder

Hold the chip and align it to that pin with the solder, then melt it to fix the chip.

If You can read this an image didn't load - Align Pins And Solder 1

Now leave that one alone and solde the rest. Add a bit more solder to the 1st pin if needed.

If You can read this an image didn't load - Solder The Rest

My first micro-controller!

If You can read this an image didn't load - 1st Chip

Stuff everything in.

If You can read this an image didn't load - 1st Stuffed PCB

Later on I actually found a problem in the circuit and had to McGuyver a connection for that capacitor. Not sure what could have happened.

If You can read this an image didn't load - 1st Bug Fixed

Using the FabTinyISP

This bit traumatized me. I still have no idea why it didn’t want to work, nor why it eventually did work. Anyway you should start by reading these instructions here.

If you use Windows there’s an extra set of Instructions here

Download and unzip everything.

If You can read this an image didn't load - Unzip Firmware

When this did work it was on Linux so try that and run this command:

sudo apt-get install avrdude gcc-avr avr-libc make

Make

Then:

Sudo make flash

If You can read this an image didn't load - Make Flash

And that should set the fuses and be ready to go.

If You can read this an image didn't load - Burn Fuses

In Linux you can use lsusb to list all USB devices and it’ll be there.

If You can read this an image didn't load - Check USB Devices

My programmer was a nightmare. It took me 2-3 weeks. I was getting the stupidest errors. With everything I tried. Windows, Linux, my instructors old ISP’s, Atmel ICE’s. Nothing worked until it did once. I got my print-screens and never looked back. Until I had to write all this documentation.


Last update: November 26, 2023
Back to top