Skip to main content
geeks have feelings

Assembly-izing Tassel

Tasssel: the extra ‘s’ is for “scattering”

Work continues on Corntroller, my sneaky copy of Shane’s sweet brushless motor controller.

I got my Digi-Key order last week and started assembling the board at the Graphics/Visualization/Usability (GVU) Prototyping Lab, the sister lab to the Georgia Tech Invention Studio*, and home to my favorite hot-air reflow station on campus for prototyping.

Now the thing about reflow soldering is that it perfectly captures the sights, sounds, and smells of hell.

What else but hell would make you sit in place, hunched over for hours, as electric fire brings tears to your eyes and solder paste brimstone pierces your nostrils? Bright incandescent lighting, smoldering soldering irons, and in the case of the GVU reflow station, a 50-decibel electric pump all magnify the feeling of burning alive in invidious flames of divine wrath.

fyt_DEAbSOU thumbnail

But the GVU version of surface mount hell is actually pretty legit. The aforementioned electric pump is hooked up to a precision solenoid valve gas dispenser (controlled by a foot pedal), which in turn feeds pressurized air into a hand-held tube of leaded solder paste. Hit the foot pedal, and a small and carefully controlled bit of gray goop flows out.

The setup basically lets you do manual pick and place assembly. Less efficient for small and medium runs than solder paste stenciling, but way less setup time and a lot more fun. It’s perfect for prototyping a new board.

Now I ended up shooting video instead of taking too many pictures, so bear with my video screenshots here.

To make life easier, I assemble components under a 10×/30× stereo microscope with tweezers in one hand, solder paste dispenser in the other, and foot on the foot pedal.

Microscope pick'n'place (you totally can't see my new faux hawk in this photo)

At 10× you can see the particles in the solder paste.

7-segment closeup, unreflown

After assembly, I preheat the board over a Zephyrtronics… board preheater.

Its uses include, and is limited to, board preheating

I’m not even making this up. This thing emulates the flat “warm-up” period of the reflow temperature profile you’d use in a full reflow oven. In addition, it has a genius “cool” mode during which it draws air down (instead of blowing hot air up), using ambient air to cool the board (“ramp-down”). No more blowing on the board until your face is red and your tongue is covered with flakes of solder.

Allegro's recommended reflow profile

It even comes with a sweet PCB jig to hold your board at just the right height above the pre-heater.

Preheat

After that, you pretty much just apply heat like a normal person.

Lefrowing

You may notice that in addition to unpopulated inertial sensors, there are also two funny-looking solder bridges.

Laßt uns froh sein!

You have ze Germans to blame for that. Had I the European-styled schematic symbols für a common-mode choke ge-used, which had I the wrong orientation for the part ge-using. I think.

In other words, I managed to short my input power leads across a pair of inductors.

eurotraschematic

Not that that surprises me in the least; I’ve managed to build almost every circuit I’ve ever designed to have a short from power to ground. Heck, this is the probably the highest impedance short I’ve gotten on a first-try board in the past two years.

Actually, maybe the footprint I was using for my Würth-Elektronik common-mode choke just had a mistake in pin assignments. But I like to chalk it up to cultural differences, since it’s 34% more hilarious that way.

At any rate, I ended up skipping the choke completely using solder bridges; I get less noise immunity, but hey, nobody’s perfect and I’m not sure if it would’ve even helped at all.

At this point, it was time to try out the logic power supply. With fingers crossed, I hook up the bench power supply to the V+ and V− power pads and hit the switch.

Nothing.

Turns out when soldering leads to the V− pad while “e-testing” the board, I had broken one of the traces from the pad.

Oops

Oops.

I haven’t made a soldering boo-boo this bad in years, but whatever. I briefly considered running a little green wire over the trace, but then realized that I tented over all my vias with soldermask§ and couldn’t airwire even if I wanted to.

Instead I just ripped up the soldermask with an X-acto knife under 30× magnification and then solder bridged the shorn copper. Like a boss.

Scrape scrape scrape
Solder solder solder

Now I was getting a sweet 3.304V out of my LT3970 circuit from an input of 4V all the way up to 31V, which was as high as the power supply could go. Not really sure why this mattered, since I’ll always be putting 5V into the board, but whatever.

But why the heck am I posting about such minor minutiae as fixing a broken trace when I should be plopping down code like a pro? Well, because performing board bringup on an STM32-based board like this is an (necessary) act of distilled masochism, and I avoid it like a plague even when I’m already working on the board to begin with. I mean, hell, the software you use with the popular GCC/GDB ARM toolchain is called OpenOCD.

Open... OCD?

So I plug my board into my Olimex ARM-USB-TINY-H and then pray to Tony Stark to guide my board to a successful JTAG interrogation.

    # See STM Document RM0008
    # Section 29.6.2
    # Low density devices, Rev A
    set _BSTAPID1 0x06412041
    # Medium density devices, Rev A
    set _BSTAPID2 0x06410041
    # Medium density devices, Rev B and Rev Z
    set _BSTAPID3 0x16410041
    # High density devices, Rev A
    set _BSTAPID4 0x06414041
    # Connectivity line devices, Rev A and Rev Z
    set _BSTAPID5 0x06418041

Oops, my STM32F103VG XL-density microcontroller isn’t in there. The comments mention Section 29.6.2 of RM0008, the STM32F1x Family Reference Manual. In section 31.6.2 (dotdotdot) of the newest version of RM0008, we see that 0x06430041 is Revision A of XL-density devices.

So I need a more recent version of OpenOCD that has the newer STM32 devices. Crap.

See, I use the default vanilla FTDI drivers for my Olimex, presumably so I can use the Virtual COM Port driver for the broken-out UART the ARM-USB-TINY-H doesn’t have. Yeah, I’m dumb. But OpenOCD doesn’t support those drivers out of the box; licensing issues prevent binary distributors like Freddie Chopin from making available binaries compatible with regular FTDI drivers. Instead most people use libftdi and libusb-win32 for hardware interfacing on Windows.

So I gotta build OpenOCD myself to make it work? God damn it; what is this, Linux?

Let’s just say $ ./configure --prefix=/cygdrive/c/Users/Xo/Desktop/ocd-build/out --enable-maintainer-mode --disable-werror --disable-shared --enable-ft2232_ftd2xx --with-ftd2xx-win32-zipdir=/cygdrive/c/Users/Xo/Desktop/ocd-build/ftd2xx CC="gcc -mno-cygwin"

With my new OpenOCD 0.6.0-dev build, I got a fully successful JTAG scan, and the OpenOCD GDB server is now open for business:

C:\Users\Xo>openocd -c "gdb_port 2222" -c "telnet_port 4444" -f "C:/Progra~2/OpenOCD/interface/olimex-arm-usb-tiny-h.cfg" -f "C:/Progra~2/OpenOCD/target/stm32f1x.cfg"
Open On-Chip Debugger 0.6.0-dev (2011-10-19-22:04)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
1000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
cortex_m3 reset_config sysresetreq
Info : device: 6 "2232H"
Info : deviceID: 364511274
Info : SerialNumber: OLTQ5QMÖA
Info : Description: Olimex OpenOCD JTAG ARM-USB-TINY-H A
Info : max TCK change to: 30000 kHz
Info : clock speed 1000 kHz
Info : JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32.bs tap/device found: 0x06430041 (mfg: 0x020, part: 0x6430, ver: 0x0)
Info : stm32.cpu: hardware has 6 breakpoints, 4 watchpoints

lol @ C:/Progra~2. Because this thing f—ing breaks if I don’t.

Every Post by Year

  1. 2023
    1. Ducati Timing Belt Replacement
    2. C++ Corrections
  2. 2016
    1. Liftlord
    2. Sensorless Brushless Can’t Even
  3. 2015
    1. Big Data: Test & Refresh
  4. 2014
    1. The Orange Involute
    2. Big Data EVT
  5. 2013
    1. Integer Arithmetic Continued
    2. Real Talk: Integer Arithmetic
    3. Why Microsoft’s 3D Printing Rocks
    4. Flapjack Stator Thoughts
    5. Delicious Axial Flux Flapjack
  6. 2012
    1. How to teach how to PCB?
    2. Fixed-point atan2
    3. It Was Never About the Mileage
    4. Trayrace
    5. BabyCorntrolling
    6. Conkers
    7. BabyCorntroller
    8. Templated numerical integrators in C++
  7. 2011
    1. Bringing up Corntroller
    2. Assembly-izing Tassel
    3. Corn-Troller: Tassel
    4. 5 V to 3.3 V with Preferred Resistors
  8. 2010
    1. HÄRDBÖRD: Interesting Bits
    2. HÄRDBÖRD: Hardcore Electric Longboard
    3. Mistakes to Make on a Raytracer
    4. US International Dvorak
  9. 2009
    1. Raxo
    2. Better Spheres, Fewer Triangles
    3. Donald Knuth Finally Sells Out
    4. Harpy – Sumo Bots 2009