coddingtonbear: Fabricobbling bespoke hardware in a basement workshop

Post Reply
User avatar
coddingtonbear
Posts: 4
Joined: Mon Feb 05, 2018 6:16 am
Location: Portland, OR
Contact:

coddingtonbear: Fabricobbling bespoke hardware in a basement workshop

Post by coddingtonbear » Mon Feb 05, 2018 7:16 am

Hey there --

My name is Adam, I'm a software engineer working for a little startup in Portland, OR (you can find me as coddingtonbear on github and freenode), and although my job mostly involves programming in Python and Javascript, I spend a ton of my free time fabricobbling mostly-unnecessary bespoke hardware projects. These days I've found myself working on a project involving three STM32 microcontrollers on my bike (all communicating over CAN) and powered via a hub dynamo to do several things including allowing me to flash a series of (outdoor-safe) neopixels I've wrapped around my bike's frame when it's dark at night and I'm particularly motivated to make sure I'm as visible as possible, gathering and reporting GPS coordinates to a website, calculating and displaying speed by cleverly watching the dynamo's frequency, and, well, misc.

Here is a photo of my desk at right this moment; there you'll see the main two circuitboards of the project -- both having their own STM32F103 microcontroller:

Image

(In case you're curious, those small purple boards you see under the µC are things I created a while back to allow me to work with parts having a smaller pin pitch than my cheap milling machine can repeatably handle.)

Before this specific project -- as far as electronics projects are concerned -- I usually built my little bespoke projects using ATMega/ATTiny microcontrollers, but built a couple minor toys with ESP32 and ESP8266 boards. Jumping from those relatively simpler microcontrollers to the STM32F103 has been a ton easier than expected, and I'm a little surprised they are not used in more things given how easy it is to move between hardware platforms when you have the Wiring/Arduino basics to lean upon.

The _specific_ reason I'm creating an account here is because I've been following along on the thread "CAN Bus Library for STM32F103" while designing and debugging the latest board because I designed the latest board without a separate CAN controller IC thinking I might be able to leverage the built-in CAN hardare. Good news: I can totally receive and send CAN messages. Bad news: I can't receive those CAN messages while IRQ mode is enabled (but I can get it to work by implementing some rudimentary polling logic), and for some reason, it seems that the µC freezes immediately _after_ successfully sending any CAN message. Note: this works just fine while debugging in stlink -- just not when not debugging. Who knows. I'm hoping to ask some questions in that thread so I can maybe develop more leads on what to troubleshoot.

I hope this is a reasonable-enough bio to prove that I'm not a robot ;-).

Cheers,
Adam

User avatar
mrburnette
Posts: 2190
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: Fabricobbling bespoke hardware in a basement workshop

Post by mrburnette » Mon Feb 05, 2018 1:04 pm

coddingtonbear:

Adam,
Welcome!
I hope this is a reasonable-enough bio to prove that I'm not a robot
Yep, you got my vote!

I doubt if you will need this, but I have some links off into the Either that you may find of interest:
http://stm32duino.com/viewtopic.php?f=2&t=3111

Ray

User avatar
BennehBoy
Posts: 501
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: coddingtonbear: Fabricobbling bespoke hardware in a basement workshop

Post by BennehBoy » Mon Feb 05, 2018 2:01 pm

Milling PCB's sounds interesting, what machine do you use?

Welcome.
-------------------------------------
https://github.com/BennehBoy

User avatar
coddingtonbear
Posts: 4
Joined: Mon Feb 05, 2018 6:16 am
Location: Portland, OR
Contact:

Re: coddingtonbear: Fabricobbling bespoke hardware in a basement workshop

Post by coddingtonbear » Mon Feb 05, 2018 5:20 pm

I have a pretty simple milling machine setup -- just what is often called a "1610" CNC machine (mine is this specific one, but if you search around for "1610 CNC", you can find lots of other almost-identical examples -- just make sure you find one that has GRBL-based control). It's, well, not an amazing mill by any means, but for just $200, it offers an excellent bang-for-buck.

I bought it after systematizing a chemical process (using cupric chloride) of homebrewing PCBs that involved who knows how many steps and involved chemicals that were causing everything metallic nearby them to rust. When I discovered that a cheap milling machine could get close enough to the precision that you can get with chemical etching, and also would require just a tiny fraction of the time (<- that's really what sold it), I bought a cheap milling machine almost immediately.

If you end up going down that path yourself, let me know -- I have a pretty reliable milling process down by now and have some settings to share.

User avatar
RogerClark
Posts: 7680
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: coddingtonbear: Fabricobbling bespoke hardware in a basement workshop

Post by RogerClark » Mon Feb 05, 2018 10:44 pm

I tried milling, but the hysteresis on the Z Axis lead screw on my machine is just too much to get accurate milling for SMD boards, i.e to put a QFP STM32 on a board.

It would probably work for bigger analog boards where tolerances aren't so critical.

I know some people replace the Z axis lead screw etc and also add the probe system to measure the board height at 2.5 cm internals, but I find it easier just to plan the timeline of projects and send them off to China to get the PCB's made

User avatar
coddingtonbear
Posts: 4
Joined: Mon Feb 05, 2018 6:16 am
Location: Portland, OR
Contact:

Re: coddingtonbear: Fabricobbling bespoke hardware in a basement workshop

Post by coddingtonbear » Mon Feb 05, 2018 11:15 pm

Ahh, yeah, I had a similar problem, actually. As you know, all lead screws needs some "backlash" in order to move, but there are often ways of reducing it. What I did in my cheap setup was thread a small machine screw and bolt through a hole on the lead screw such that the tip of the screw pushed down against the housing below it. This reduced the backlash for me to something negligible enough that I almost forgot I made such a modification. With that, I don't have any trouble with the Z axis at all, but you really, really still must autolevel. Luckily that's extremely easy with at least bCNC or Chillipeppr.

Although I don't have any trouble with the Z axis really, I generally mill at a depth of 0.1mm (a bit more deep than necessary -- but it does make the process a little more reliable) and with 45-degree 0.1mm bits; if you do a little bit of math for that, that means that each cut is theoretically 0.08mm at minimum -- in practice it's a little bit wider than that, and this is just a little too uncomfortably tight for the 0.5mm pin spacing of an STM32 microcontroller, but does work just fine for microcontrollers having a pitch of 0.65 or greater (like the atmega328/1284, etc, do in their QFP packages).

I really, really like being able to come up with an idea Saturday morning and to turn it into a physical board by Saturday afternoon, though, so I designed some castellated breakout boards for using 0.5mm-pitched microcontrollers like the STM32. I just ordered a dozen or so of the castellated boards from my favorite board house and now just pull one of those out of my parts bin whenever I want to use a component that has too-small of a pin pitch for one of my projects.

Image

The board quality you get for making your boards at home will never be as good as even cheap board houses can muster if you're willing to wait a couple of weeks for shipping, but, there's something kind of wonderful about being able to bring an idea to fruition so quickly.

Post Reply