Category: Open Source
2015
11.21

A week ago I attended BSides Winnipeg 2015, a local security conference. There were a ton of great talks and lots of interesting people there. The food was pretty good too.

The recordings of the talks recently went up. Among them was a talk that I gave on the relatively new programming language Rust. It was a lot of fun and I hope I can do it again soon.

If you would like a copy of the slides, you can get them here. My talk was heavily inspired by Memory Safety in Rust by Nicholas Matsakis. If you want to learn more about Rust’s memory safety features, I highly recommend checking out his talk.

2013
06.21

It has been a while since my last post. Lots of stuff going on. Here’s a quick summary.

Earlier in the year I was elected to the board of directors at SkullSpace. It is really great to see all the things people are doing there and to be a part of making that happen.

For a while now I’ve been working on a bit of a side business. The idea is that we will develop, manufacture, and sell open source electronics. Ultimately, we intend to sell them with a pay-what-you-want model (with minimums) as well as pay-who-you-want (ie. allow the customer to direct where they want some of the profits to go; designer, influential projects, charities, etc). If you are interested, you can sign up for our mailing list on our website.

One of the first products I’ll be posting is an RGB LED ring display for a rotary encoder. Additionally, it adds capacitive sensing to the encoder so it can tell when the user is touching the knob. The firmware is still a work in progress, but I made a simple demo video to showcase the basic features.

RGB Rotary Encoder Display Demo from Benjamin Bergman on Vimeo.

2012
11.01

Introducing the μJoypad, the worlds smallest NES controller! Measuring in at 25.4×12.8×3.2mm (1.0×0.5×0.1in) this is, by my best research, the worlds smallest, fully functional NES compatible controller. A couple months ago I saw an article or video of the world’s largest game controller and thought to myself “I bet I could make the smallest” and so I did. The project is open hardware and available on GitHub. More pictures and a description of the design process after the jump.

Read More >>

2012
10.20

I got some PCBs in the mail yesterday! I designed these all with gEDA pcb and had them manufactured in the States by OSHPark. In the main picture, from top to bottom, I have an FFC breakout board for my Bluetooth Kinesis project, an ATtiny45 VUSB breakout board intended to be used as a NES controller to USB adapter, an EasyPoint breakout board also for my Kinesis mod, and my μJoypad. I’ve already found one problem with EasyPoint breakout (my own fault, even though I was warned about it). gEDA pcb outputs 2 drill files, one for each of plated and un-plated holes, but OSHPark expects those to be combined, so my unplated holes were not drilled. Hopefully this is an easy fix with a drill press, otherwise I will just be cutting off the stabilizer pegs from the EasyPoints.

2012
05.27

When working on my personal projects, I tend to use as much open source software as possible. Many people in the hobbyist world use Eagle for their EDA tools, which has a free restricted version but is not open. I personally prefer to use the gEDA suite of tools. I like it for its cross platform compatibility and its adherence to the Unix philosophy of “do one job and do it well” allowing tools to be connected in many different ways. This often allows the tools to be leaner, yet more powerful. This can also often make some of these tools a bit harder to pick up.

I was recently trying to add an image to a PCB I was making. Being so modular, gEDA pcb does not have an image import feature but instead relies on the program “pstoedit” to convert PostScript vector images into gEDA pcb objects. I have tried doing this before, but usually ended up with poor results. I finally collected the steps necessary to get repeatable, high quality results, which I will document here for anyone else trying to do the same.

1) Load your vector image into Inkscape (I will assume that you already have a vector image and have Inkscape installed)

2) Ensure your image uses only a single colour: black. All black objects will be added to your pcb object and all empty space will be left empty

3) Convert all objects to paths by selecting each object and using Path -> Object to path

4) Remove all overlapping vector paths by using Inkscape’s merging tools (union, difference, intersection, exclusion, division, etc) found in the Paths menu. If you end up with any paths that are touching (or are even just too close to each other without being joined) you are likely to end up with gEDA pcb carving gaps between them to meet the specified tolerances.

5) Adjust the file size to be appropriate for the scale it will be on the board. I have not yet found a way to reliably re-size the imported image once in pcb, so it is important to get this step right.

6) Save your image as a *.ps (PostScript) file. Make sure the “Convert texts to paths” box is marked. You may also want to have the “Resolution for rasterization (dpi)” setting cranked up to its maximum of 10000, but since the graphic remains a vector through this whole process, I don’t think it will make any difference (I haven’t tried playing with that number yet).

7) From the command line, change to the directory that your *.ps file is in and run a command like this:

$ pstoedit -psarg "-r1000x1000" -f pcbfill -ssp 'inputfile.ps' 'outputfile.pcb'

When I was first doing this, I didn’t add any of the optional parameters and I was using ‘pcb’ instead of ‘pcbfill’. -f pcbfill helps to ensure that the objects generated are solid, filled objects, which they might not be otherwise. -ssp forces things like letters with holes (‘o’, ‘d’, ‘p’, etc.) to convert correctly. The man page warns that this may be CPU intensive, but all the conversions I have done have run pretty well instantaneously. I also found I needed the -psarg “-r1000x1000” to get a good resolution out of the conversion.

8) Open your new *.pcb file in gEDA pcb and see the results. You may need to tweak some numbers or add/remove arguments, but so far this seems to work alright for me. Another option that might allow for a little more flexibility is including -xscale and -yscale flags if your image isn’t quite the right size. It may even help to make the image too large on purpose and the use the scaling flags to condense the resolution (again, I don’t think anything is rasterized during this process so I doubt this will make a difference, but it might be worth fiddling with it, even if I haven’t). You might also want to move the object into the top left corner of the pcb layout so that, in case you load it in a layout that is smaller it will still be visible.

9) At this point, you are ready to load your newly created pcb object into your full pcb project.

This process is not an exact science. Play with it until you find something you like. I have had success leaving out some of these steps too, so there is no need to redefine any defaults. Have any other tips for pcb graphics? Leave a comment!