• Side-Side-Project

    Jarrett04/08/2016 at 04:28 0 comments

    I haven't actually read or looked at or thought about literally any of the contents of this project since the last log.

    So I don't know if I mentioned, but I've been pretty apathetic about this from the beginning. A big part of the reason is that I can't respin the board and send it off on a whim. My cheap boardhouse of choice, DirtyPCBs, groups things by 5cm^2 boards, or 10cm^2 boards, with nothing in between. The distance between the header pins of the Arduino are 53.3mm.

    Yeah, that's just about the most annoying thing in the world, and it puts the cost of a board respin just above my impulse purchase threshold.

    Also since I've posted this, Microchip has gotten the hint as a company, and two rad new devboards have come out.

    So I'm totally repurposing this project for other, vaguely similar things I work on occasionally!

    Here's the latest one:

    (Obviously unpopulated there)

    Yeah. It's a board that's the same size and shape as the flash drive I pulled apart.

    I've got more information posted up here, but the TL;DR is:

    It's awesome, it's a PIC dev kit with a $5 BOM (including PCBs!), a full port broken out, USB, and all of the hardware files up on GitHub. Oh, and some code that emulates a keyboard and starts typing.

    Fork it and do something cool with it! I'll be getting a bunch made for myself, but I won't be writing any more USB code, tbh. I'm not into it, at this moment.

  • More Doodles, Solidifying

    Jarrett08/06/2015 at 15:20 0 comments

    Plunking away at this, a few minutes here, a few minutes there.

    The project is broken up into three schematics.

    Main schematic. Nothing new here, really. Still need to add some more USB protection.

    Main micros. I've got three footprints here, but it's all a lie. The top one is a big 40-pin wide package DIP IC, the bottom two are skinny 28 pin packages. One is DIP, one is SMD. Overlapping all of those footprints, along with Microchip's strategy of locating key function pins(like power) in the same location along all of their lines means that these boards will be able to hold and program a huge amount of different PICs in the 8-bit family.

    Beginning of the PicKit-On-Board. Microchip seems to like using a specialised circuitry and low-voltage programming when they do this for their dev boards, but that's a crutch. Not all PICs support LVP, and they need to have it configured in software. This board will work on all PICs that the PicKit 2 works on (which is most of them), and if the users wants to pop off their programmed chip and use it standalone, this saves an extra IO pin for whatever they like.

    The embedded boost controller is super cool, too. If the user has their own programmer (or two of these dev boards) and is super clever, they can program the programmer chip and play around with the power supply generator.

    The last schematic needs a whole bunch of cleanup. Component names are duplicated, etc.

  • An analysis of the Arduino schematics

    Jarrett07/31/2015 at 17:51 3 comments

    The first version of this project was intended to be cheap, fast, and use the bare minimum number of components. I have a bunch of those boards now, so I'm good on that front.

    A good way to up my game on the reliability stand-point is to take lessons from the Arduino itself. I checked out the schematic before, but was mainly looking for cool features or maximising compatibility. It's time to revisit that a bit.

    Starting from here:


    This is a pretty bad schematic!

    Here is a quick and not-complete analysis of it. It's not The Worst Schematic In The World or anything, but it could be way better.

    The first, most obvious thing is readability. For an open source project that is designed to ease people into hardware, just shitting the components all over the page like that is a big "fuck you".

    If you treat the top and bottom portions like separate entities, it's easier to read.

    I have counted *six* power rails:

    • +5v
    • VIN
    • PWRIN
    • XUSB
    • USBVCC
    • +3v3

    Other than the first and last ones, if you can identify the function from net name alone, I will give you a cookie.

    Then the top left quadrant of the schematic:

    First of all, that bypass cap is just kinda sitting there with some unidentified floating pins. I suspect they're for the op amp, but I shouldn't have to guess at these things.

    The op amp circuit could (and probably should) have been separated into two distinct portions, split at the +5v section

    The op amp itself turns on the P-FET when VIN / 2 is greater than 3v3. VIN is only active when the DC jack (PWRIN) is on. So what that circuit does is backfeed the 5v rail into the USB power rail when the DC jack is being used.

    That's fine, but the only point of that is to power on the USB portion of the programmer chip when the DC jack is plugged in and USB is not. Why?

    That logic is completely opposite (and probably broken) on the first rev of the UNO, which is funny: https://www.arduino.cc/en/uploads/Main/arduino-uno-schematic.pdf

    Those are my big complaints, I guess.

    I also don't like how the fiducials are just big unlabelled dots hangin' out, and the jumper pads (for RESET and GROUND) are a little weird.

    Also not really sure why there's an overvoltage protection diodes on both of the chip resets, unless that's a recommended layout somewhere.

    The protection circuitry for the USB side is getting used in my design for sure, I am not an expert on that bit. Probably not going to include the DC jack or power components, does anybody use those?

    Edit: When only USB is plugged in, the entire board is getting powered through the reverse polarity protection of the P-FET. WTF.

  • Because I can't leave well enough alone

    Jarrett07/23/2015 at 18:36 1 comment

    I've been using my hacked-together boards for a couple months now. They work great, considering how much effort and money I've put into them (ie. barely any).

    In those last few months, though, I've been tooling around a little with designs.

    I have ten of these cheap-and-easy prototyping boards, now it's time to refine it into an actual decent product.

    Nothing has been polished or even completed yet, I'm just showing WIP stuff as it happens.

    Here's what I did a few months ago:

    Main file has been cut down. The buck converter is a lot of work and BOM cost for a very small amount of pay-off. The part that I was using is also end-of-life now, so I'm replacing it with a linear regulator for this revisions.

    A lot more stuff is being put on this board, so the bonus header is gone. Some of the useless Arduino pins might be taken off, too. The PIC has been moved to another sheet.

    That switch is getting changed to a SMD version. Again, moving away from quick-to-throw-together and into manufacturability

    USB will also be added.


    I'd post the other two sheets I have, but they're mostly just a bunch of micros and not a lot of supporting circuitry just yet. I'm adding a smaller PIC to the same footprint as the original. Then you can drop in either a big 40 pin wide footprint, or a more typical thin 28-pin package. Most 8-bit PICs have a similar footprint.

    The big change is that I'm adding USB programming to the board. One of my side-projects lately has been a PicKit 2 clone (here (spoiler alert: it's awesome)), so including it is not a huge timesink or anything.

    The BOM cost on that is ~$15 for programming bits alone, so I'll be investigating some alternatives. Part of that problem is that the PicKit 2 uses the $6 PIC18F2550, and I don't believe they have open-sourced the code. There are a lot of extra features in there that I don't use, so dropping in a cheaper PIC and lightening up the code-base would be great.

    This project on GitHub is an open-source programmer, so I might try and adapt it, or take lessons from it and write my own. How hard can it be? ;)

    Due to the Microchip Curiosity board, I have a new word in my vocabulary, PicKit-On-Board (PKOB), which might help me with my research. A quick look didn't turn up how they did it, but maybe there are some schematics hidden away somewhere, or maybe high res photos of the circuit might provide some clues :)

  • Dammit, Molex

    Jarrett04/17/2015 at 16:49 0 comments

    I built a really really cut down version of this, using the limited amount of parts that were kicking around my hackspace.

    There were some compromises made.

    I populated all of the headers, the USB connector, and the DIP socket. The decoupling cap C2 and the pull-down R1 is on there, too.

    Notice that the USB footprint is kinda terrible. The signal/power traces were too short, so I had to shove the connector in towards the board a lot more, which meant the mounting pads didn't line up anymore. Bah.

    The protection circuitry, F1 and L1, are both substituted with jumper wire because I'm sketchy like that. Protection diode D4 is left off entirely. The 3.3V power supply is also absent.

    The SMD LEDs were replaced with small through-hole versions.

    I didn't have a good switch, so it had to be replaced with this one:

    Due to its pinout and orientation, the bottom is the only place it could work in order to not have interferences.

    A reminder: This is an in-between project. I totally don't care about it! I only need something that is marginally better than a breadboard, because having to wire that up every time sucks.

    After all of that, I plugged it in, and... Nothing. My PIC programmer wouldn't read anything, and all of my test gear at home is in storage (because I prefer to come into the hackspace to use their's, now). As I was doing this, I was making dinner, so I went off to handle that for a bit.

    Later, came back to my board. "Is something burning?"

    My microcontroller was very toasty. After unplugging it (very very quickly), it got dumped off to the side for a few days until I had time to troubleshoot.

    Totally coincidentally, this was about the time I finished another PCB for a different project. As I was looking around in Altium's 3D view, I noticed something a little bit off.

    Yup! The 3D model is flipped, clipping through the board. A short internet search later, and sure enough, the Molex-supplied library component has its pins in the wrong order. If you look back a few project logs ago, you can juuuust see that the current project has the same issue.

    Molex, you are terrible.

    Quick fix:

    That right there is a very dangerous thing. A polarity-changing USB extension cable. But it works for this! I have a blink sketch going.

    Marking this project as complete for now, but eventually I will get around to testing the power supply, etc. Then do a new run of boards with revisions. I'd like to add mounting holes and improve silkscreen positions, too.

  • Aww yeah

    Jarrett04/01/2015 at 05:46 0 comments

  • Sent

    Jarrett02/24/2015 at 21:24 0 comments


    It's pretty sketchy, tbh.

    I give it a non-zero chance of being rejected outright.

    Unfortunately the Eagle CAM rules supplied by most cheap board houses don't work in Altium, so I did it by hand. I used different Gerber layers for the internal slots and the outside perimeters, and I have no idea if that will work. Worth a shot! I guess!

    I delayed a little long with this, so it's Chinese New Year, and they won't even be back at work until the 27th. And won't start catching up with the backlog until even later. I guess I'll see it in four to six weeks!

  • Just about ready to send off

    Jarrett02/20/2015 at 16:04 0 comments

    For the last update, I put out the call for suggestions on what to fill my panelised board with, given that I have some extra space.

    @jaromir.sukuba posted a link to his #Breakout board set, and @Adam Fabio and @mpinner both suggested the OSHPark shared project repository.

    All excellent suggestions, and along the same lines, I checked out the Dirty PCBs equivalent. I was surprised to see that one of my PCBs from last year still shows up there fairly prominently.

    I didn't really find anything that piqued my interest in any of them. There were a couple kind cool ones, but the BOM costs were quite high for a project that I wasn't super into.

    So I dumped some breakout boards in there. As you can see, there are some errors in those because I didn't create them myself right in Altium. I don't even really care. I'm planning on using DirtyPCBs to fulfil my order, and their whole shtick is that if there's a problem with your board, they don't go back to you requesting changes, they just attempt to build it, and if it fails, sucks. That means that this is more of an experiment then a legitimate attempt to get some spare breakout boards.

    Here's the panelised board. You can see the errors in the top right.

    It may be interesting to note that I laid out and built the Gert board from scratch, despite the files being freely available online in Eagle format. It was easier and faster (~2 hours) just to do it myself than try and deal with conversion and all of the problems that would bring. It's a simple board.

    Stuff came up today that I have to deal with, so I'll probably send this off early next week, after I have time to dick around with CAM settings.

  • Obsolete before I even started

    Jarrett02/17/2015 at 17:36 1 comment

    The switch-mode regulator I used (Skyworks AAT2148, because it was cheap) has been end-of-lifed. That's kind of annoying.

    So I'm trying to fill up my panel with some other boards because I have some extra space. What else should I throw up on there?

    Right now I've got this PIC board, the Gert VGA 666, and I might toss in some breakout boards.

    I'm also vaguely working on a board for the Raspberry Pi Compute module that would be nice to bundle in there, but I've done the RasPi harness and USB, and now I've lost focus a little bit. What should I turn the board into?

  • Resettable Fuse

    Jarrett01/20/2015 at 15:58 1 comment

    As per the suggestion below, I added a PTC.

    I'm unclear how to get HaD to not crop these images. I'll post all of these files, including the images up on GitHub today or something, that should get around it.

    I like adding features like these, because it turns it into a better piece of engineering This whole project is intended to be fast, easy, and cheap, so the best part about features like that - and all of the features on this board, really - is that they're totally optional.

    For example, I'm probably not even going to populate most of the components on the very first board I build. I'll solder in the 40-pin DIP socket, the decoupling caps, USB connector, and the pulldown resistor. Literally nothing else is mandatory, assuming I'm okay with sticking to 5V logic. The fuse, inductive choke, and switch will need solder bridges.

    That's also why I haven't included an external oscillator. There is very little reason to use one, now, unless you need very high speeds or good stability. I rarely need either.