Archive | April, 2019

Velleman KA05 / VMA05 pinout

28 Mar19

Velleman KA05 / VMA05 pinout

Busy days at the moment, but I just wanted to document something that has annoyed me for some time. On several projects where custom hardware is too much of a job, I'll use the Velleman KA05 shield.

<

p>
It provides 6 relay outputs, 6 general input/outputs and 6 analog inputs via tiny, but functional screw terminals. There's just one thing - they didn't document it. Here's a Pinout for this shield that tells you what pins on the Arduino UNO it's connected to.

Click to enlarge/download.

Velleman also sells this as the "VMA05: I/O SHIELD FOR ARDUINO" Module where you assemble it yourself. The pinout is the same for this one.

 

Persistence of Vision with APA102

05 Jan19

Persistence of Vision with APA102

Back in April 2018 I made a board to play around with a few things I've wanted to learn. I added LiPo charging, a voltage boost circuit and the cheapest STM32 microcontroller I could find that offers USB connectivity. The main idea was to use this to make a Persistance Of Vison (POV) setup to play around with. I only had time to test the first iteration eight months later, but the second iteration is now up and running.

I've only just gotten it working, but it shows great promise already! The first version had several bugs (as expected), but none so critical that they couldn't be worked around. I got the LiPo charging and boost working on first try, but it didn't work just as expected when plugging in USB. To improve on this, I added a switch IC (TPS2113A) that would toggle between USB and battery as needed, but I didn't read the fine print so this circuit started oscillating and failed. I now have a much simpler and completely fool-proof solution to this using a clever MosFet switch. The shape of the first PCB made it hard to spin, so I fixed also that in the second version.

Why NeoPixels can't do POV

I've used ws2811 and ws2812 (often referred to as NeoPixels) programmable LEDs before, but they're not suited for Persistance Of Vision applications since the refresh is too slow.


Incorrect refresh produces a dot pattern

NeoPixels also have a lot of issues since they require very precise timing. This makes it very hard to use them with anything that also requires a wifi connection or anything that could disturb the timing. The APA102 is different. It has a dedicated clock channel that you can run at any speed so it will work with any computer, also Rasberry Pi and other things that can't offer precise timing. This requires an extra pin, but that's a very cheap price to pay to save all the hassle with NeoPixels.

The APA102 is also called DotStar or SuperLed and it comes in two form factors. The most common one is the 5050 (5x5mm) package, but it also comes in a 2020 (2x2 mm) version that offers the same light intensity in a smaller and cheaper package. The refresh rate of these are super-fast so they're well suited for POV applications when done correctly. A big thanks to Tim for his great writeups on all types of programmable LEDs! They've been of great help throughout the years.

POV with APA102-2020

If you're working on an Arduino-like platform, you can probably find a good project to start from. There is however no pre-made library for the STM32F0. I found a good place to start with this code, but the setting of max brightness is done incorrectly here so it won't work. The LED can be dimmed by adjusting the RGB channels, but you also have a power saving feature in the chip that you can set from 0 to 31 (32 steps). For POV, we need the LED to always be on and to do that, we set it to maximum brightness (31). I didn't fully understand how the first lib did this wrong, but after searching Github for apa102 and disregarding platform I found this code doing it right. Re-reading the datasheet I found that you can easily simplify this quite a bit and ignore storing the INIT and GLOBAL bits since these will always be 0xFF and I came up with this simplified solution.

With full brightness, all LEDs show as a continuous line.

The only thing that is STM32 specific here is the sendRaw-method. Replace this with how the platform of your choice does SPI and you can use it with Atmel AVR, Microchip, Parallax or whatever your favorite MCU is. The code will also work with the larger APA-102 LEDs. The Gist displays a beautiful rainbow pattern thanks to the super-smooth color methods used in many of Adafruit's libraries.

Further plans

Next up is displaying text and images, while I wait for the third iteration of the PCB to be fabricated. There's loads of great tools for converting images to C arrays, but I’ll make some custom code for displaying text also. The third iteration will have 100 pixels as well as an accelerometer/gyro combo so it can be used for POI-applications in addition to POV. For now I’m happy with storing data in the microcontroller itself, but I’ll eventually look into adding a simple Bluetooth wireless transfer to a Flash Memory chip so the device can be updated without USB or STLinkV2 programmer.

 

Xmas cleaning and new workspace

31 Dec18

Xmas cleaning and new workspace

The last couple years I've done less 3D printing and more electronics, so I took the time to redo my home office over christmas. I got a motorised raise/lower desk for my computer and custom built an electronics desk that turned out really well.

Ending my 3D Printer project

My BAM 3D printer has been a great learning project! I've built a really advanced machine that have solved my wish for a large format printer that can print any material I throw at it. It's been super solid and I'm happy with the quality I get out of it, but I keep having bad concience for not doing more updates to it. One major upgrade I've wanted to do is to add a multi-material capability. Due to the design, I'd be limited to just two materials but that would be sufficient in most cases. I have had a hard time prioritizing this over other things, so I guess it's not really something I need - more something that "would be nice" to have.

Since I mostly use the printer for prototypes, it's been annoying that many of the new filaments I've wanted to test only were available as 1.75mm. The 2.85mm standard was based on what was available when Reprap started back in the days. Now it's basically only Ultimaker and Lulzbot that use it apart from Reprap machines like mine, so I took a leap. I sold all my 2.85mm filament and ordered a Prusa MK3. These are rock solid, print beautifully, has official multi-material upgrades and I don't need to do anything to it. I'll do a proper post-project video on the printer before I disassemble it.

Electronics desk

I work from home about 2 out of 5 days in a typical week. The lighting conditions in my home office have not been idea for electronics and I kept needing to clean my desk to do code at daytime after playing with electronics in the eve. A separate desk seemed like the best plan!

IKEA has these really nice 2.48 meter whole wood plates that are ment as kitchen countertops and similar things. They're also a perfect material for builing other things from and I wanted an integrated light that would not disturb others in the room (where our projector and gaming setup is located). By having an overhanging shelf with builtin light, I get:

  • Convenient storage on the shelf above the desk
  • A wall to hang my tools on
  • Lighting that lights the entire desk without coming into my eyes
  • Support poles that I can mount things to (like my electronic microscope)

I used standard office table legs from IKEA so I caould swap this with another raise/lower solution if I wanted it. It also comes wih a decent solution for cables. For the support poles I used 25mm steel tubing that allowed me to complely hide the cabling for the lights. The lights fit into pockets that I made using the CNC @bitraf. The lights are also from IKEA. They're kitchen cabinet lights that work with the Trådfri system that I have in my house, so I can turn it all on/off from an app or Google Home. I added holes in smart places to get a smooth solution to the cable salad I used to have on my desk.

All the tools I use on a regular basis has it's own place and I love having them at hand rather than having to dig for them in a drawer that I used to.

All my electronic parts were also placed at the other side of the room, so moving them closer was another important part of the solution. Just above the soldering station I have a small shelf with core tools such as soldering wire, pump, flux and tweezers. My magnifying desk lamp also fit well in in that corner and can be moved completely out of the way when not in use. On the other side, I have the electronic microscope. After I purchased one of these for Bitraf, I just had to have one at home also. It's such an invaluable tool when you work with surface mount parts that are less than a millimetre squared. The stand that it came with made it impossible to have it permanently on the desk, so integrating it directly into the desk was just brilliant. All that was required to do it was to use the same steel pole diameter that was used for the microscope.

Very happy with the result and as usual, there's more pictures on my Tumblr.

 

 

Level shifting NeoPixels for Particle Photon

14 Sep18

Level shifting NeoPixels for Particle Photon

I just miscounted how many GPIO pins I had for a project, so I had to find a way to save some pins. In this project we have a status LED that is either red, green or both (producing a somewhat orange color). I need 4 of these per Photon, so that's 8 pins. What about using programmable ws2812, sw2812b or SK6812 LED's?

They only need a single pin to drive many LEDs (NeoPixels is just the marketing name that Adafruit apply for all of these), so I can potentially save up to 7 pins, but also make other colors than red/green possible. Surely enough, I had some of these floating around from a former project.

For my Bitmart marquee sign I used maybe 90 of these, but I kept having bugs causing random flashes if I pulled too much power. Back then I used a 74HCT125 for level shifting, but I couldn't find either that or the 74AHCT125 variant in my component shelves. I did however find some 74HCT245 deep down in a drawer and surely enough - these are what is perferred for driving these programmable LED's in the Teensy community. Both will do the job!

I plugged it up and it worked perfectly! No glitches, just perfect timing. From the datasheets, the 74HCT125 and 74HCT245 looks to have very similar characteristics, but the first shifts 4 lines and the other shifts up to eight lines. The one I used in the Bitmart-sign was just one I found in a shelf at Bitraf. Maybe that one was damaged? Hmmm. I'll have to revisit that project to fix the glitches, but for now I've solved my problem.

I had a hard time locating pinouts / connection schematics for these IC's so here they are for use with Particle Photon.

Connecting Particle Photon to NeoPixels using 74HCT125

Connecting Particle Photon to NeoPixels using 74HCT245

Yellow wire is data out from the Photon. Purple is the level shifted data signal. Red is 5V. Black is GND. Do not omit the fat Capacitor that feeds the fast PWM LEDs.

 

Easter funtime with KiCad

06 Apr18

Easter funtime with KiCad

This Easter, my 17 year old son got sick for the last days of the holidays, so we left the mountains were we usually stay. All of a sudden had a couple days of spare time, so I sat down and made two PCB’s that I had been thinking about for a while!

The first is a huge 8x8 LED matrix made with 10mm LED’s. Every year at Westerdals ACT where I tech Embedded Systems, the students have a hard time understanding how these work, so I made a BIG one that I can pass around for them to understand. Each row and column has a switch, so they can easily toggle between GND, 5V and having that line controlled by the onboard ATMega328P. When controlled by the MCU, it’ll scroll a text. By turning a potmeter, the code will run slower and slower so that you eventually see each single line in the Matrix light up. I also added a button just in case I wanted to change the program or so. The parts for it arrived in just two days from Farnell and I orderd the board from PCBWay. It should arrive in about a week. Here's how it looks in the KiCad 3D view:

Persistence Of Vision research

I love how we humans use the slowness of our eyes to display pictures. For a long time I've wanted to make a board where I can use the programmable and tiny APA102 LED's (that Adafruit sell as DotStar) to produce POV imagery. For this board I wanted to try out a lot of things that I haven't had time to play with. I have a Lipo charger so the device can both run and charge from a small battery. The APA-102 RGB LED's require 5V and a single cell LiPo battery is anything from 3.6V to 4.2V, so I needed a Boost converter that only works when the battery has enough voltage. If not, the LiPo battery will drain and eventually it'll puff up and get destroyed. The setup I use should have this covered so that I won't need to disconnect the battery. The Microcontroller I'm using is one of the cheapest STM32's I could find that still has USB support. It's super tiny!

How tiny? Just look at the match I added for scale and the dust between the legs of it! The micro requires 3.3V so I needed to add that to the board & I've also added a Hall sensor and two Phototransistors on the board to input various data. Can't wait to get these boards and start writing the software! :-D

 

Embedding myself in devices

19 Nov17

Embedding myself in devices

This blog's been a litte dead the last year as I've been head deep in two big projects in addition to teaching more than before at Westerdals ACT. I'm not dead and I'm having a blast!

I'm doing exactly what I want at the moment and I feel that I'm creating really good stuff.

Rost

For the two brothers Simonsen, I'm creating the electronics and software for their Røst coffee roasting machine. It's a beautiful machine that has already won a RedDot Award for the design and "Best New Product" in the technology category at World of Coffee in Budapest. The software and electronics is controlling fans, brushless motors, stepper motors, super high precision temperature sensors, gas burner, spark ignition, capacitive touch screen, encoder, sensors and has a host of safety features. Read more about the machine here or check the video below.

OrderX

This project I've worked on for almost two years by now. Imagine you're at a festival and need a beer. There's always a beer-line and the guy in front of you will always wait until it's his turn at the bar to start planning. Wouldn't it be nice if the bar had glasses ready and they started tapping the second you hit the BUY button on your phone?

What we've managed with this project is to take the already great BottomsUp system (taps a beer in 4 seconds!) and added an ordering system via an App. The App talks to a controller box under the bar that can remote control the entire tapping system. From you click the Buy-button until you have (up to) 6 beers is just 5 seconds - including payment! This has been a blast to develop and it's now ready for the masses. You can see an older version of the system in action here and this is how the (injection moulded) box now looks after 3 iterations.

Westerdals ACT

Four years ago a friend told me to apply for a job teaching Embedded Systems at Westerdals Oslo School of Arts, Communication and Technology (or Westerdals ACT for short). At that time I felt a little under-qualified, but they really needed someone to do the course. I said yes and over the years I've found that I'm certainly just as qualified as many of the other teachers. I built the course so that it's one of the most complete Arduino courses there is. It's 12 weeks with 4 hour lectures each week that takes the students from complete noobs to someone that could make a simple prototype for a project. I try to cover all the basics whitout going too far into the details, while covering all the things I think will be useful for them. One of the last lessions we have a PiDay where we go through some of the same projects in Embedded Linux, so they get to try it from that side also.  I've now done the course 7 times and the students love it!

Last year the school asked me to build a second course that builds upon the Embedded one. The topic is Machine to Machine communications and briefly said - it takes the prototypes that the students learned to make in the Embedded course and teaches them how to connect them to the cloud. We go though lots of cloud related technologies, play around with radios, communications protocols and build complete M2M networks. I score very well when the students review their teachers each year and I really enjoy the interation with the students. I've always loved presenting and teaching, so I think I might do more of this in the years to come. 

Bitraf

Anyone knowing me will probably know that I don't just have my office at Oslo's biggest Hackerspace, I also help organize it. I'm no longer in the Board, but I maintain our contact with the landlord (Olav Thon) and make sure things "just work" in general. Bitraf is a Do-ocracy and it's amazing how well this works even if there's just a few people doing things. Bitraf has grown from a 20 ppl Hackerspace with coworking (130 sq/m) to a massive combined Hackerspace/Makerspace/Coworking space with 250+ members and several events each week (now with 950 sq/m space). Back when we started, we dreamed about getting a laser. About two years ago I purchased one and last week we just received our second laser cutter. We now have 2 lasers, 4 CNC's, 2 lathes, complete SMD workstation, huge workshop, a sewing room, a chemistry/bio room, seven 3D printers, all the hand tools you'll ever need, lots of workspace for projects…

It's just grown really well organically and only with members funding it. We have done this completely without government grants, so I'll do a writeup on how to run and fund such a space soon.

 

 

Playing with LoRa radio

30 Jul16

Playing with LoRa radio

I've played around with different radio technologies the last year. Some are cheap, some are expensive, but most of these have a fairly short range. LoRa is different and well worth checking out! Here I'll go through the dev-boards I used, power usage and what range you can expect from LoRa radios.

A little different history

LoRa is a spread spectrum technology jumping between frequencies is at the core of the technology. Looking at the history of this technique, you'll discover that one of the inventors stands out by being a female Hollywood Actor! Hedy Lamarr developed this technique with a friend (who was a composer!) to prevent the Germans from jamming the Allied torpedoes in WW2. Not shabby?

Radios based on the techniqe have been available for some time, but they have mostly been used by military and niche businesses.

Availability and pricing

There is a lot of LoRa dev-boards out there. The castellated modules from Hope RF are nice and you can get these separately to build your own board, but I always have a preference for Adafruit when playing with new technology. It just makes things so much easier since they excel in doumentation and quality.

The Adafruit LoRa boards are $39 a piece and you can choose between 16Mhz 32u4 or 48Mhz ARM M0 microcontrollers to control the radio and do I/O. These come with a voltage regulator that switches automatically between exernal USB power and the builtin LiPoly battery charger. If USB is connected, it will use this to both run the MCU+radio, but also to charge any connected LiPo battery. Very convenient!

Test setup

For my test setup I used 2500mAh LiPo batteries and these lasted much longer than I had expected! For convenience, I stacked a 15x7 led matrix shield on the first radio. This one was just plugged into a 400 hole breadboard and I taped the LiPo battery underneath the breadboard. This made for a nice and fairly compact package that I could hold in my hand while walking. The output on the led matrix feather was the dBm received from the stationary transmitter.

The other radio was put on a protoboard for some testing of basic sensors. It was then put into a waterproof project box with a transparent lid. After some testing, I've now drilled a hole for the antenna on this one. Its a 10 dBm penealty to enclosing the antenna in such a plastic box. That's quite a bit more than what I expected, but easy to fix.

I used basic whip antennas made with solid core copper wire. I experimented with using half-wavelength antennas (15.59cm) but cut this down to 7.79cm as it produced a better signal. I used the excellent Radiohead library and set the radio to the recommended 23dB power setting. The software was the server/client sketch with a modification to confirm that the radio did indeed receive the full text sent by the stationary radio.

What kind of range can you expect?

I've tested 315Mhz radios before but they have rather limited range, so I was expecting more from the LoRa radios despite the higher frequency. I had seen some claim 20 and even 50km in some cases, so I was curious to see what I got.

My first test was just leaving one radio inside my house and walk around. From this, I got about 300 metres of range, provided that my house was in sight. Not shabby? If there was something big blocking the radio, no signal got through.

The second test was placing the radio on (fairly high ground) outside a local school. First with the antenna inside the enclosure and then with the antenna out through the enclosure. I was quite disappointed with the first of these two, but as soon as the antenna was sticking out and had free sight it looked better.

I went for a walk to a local petrol station a few kilometers away and kept checking the radio status. When measuring in a straight line, I got 1.8km of reach until I lost the signal. During this distance, the radio never got a partial message. It got the full text always. I walked a road further up when going back and that gave me a better signal overall.

I live in a small town with up to 6 storey buildings. In this area, the signals bounced a bit between buildings but you can't expect many kilometers in such a setting. 2-300 meters is more realistic, unless you manage to place the radios really high up on the tallest building.

How about battery use?

This is the part that impressed me the most. These things are really not using a lot of power. None of my tests tried to conserve power in any way. I sent a signal twice per second and I blinked the LED on the server on each transmit. The receiver had the 15x7 LED matrix, so I expected this to drain the battery quickly. To make it last a little longer I only lit the display for 100ms after receiving a transmission. I expected maybe 3-4 hours for this one, but it lasted 12.5 hours before the 2500mAh battery drained. Not shabby?

The server is a different story! It transmitted for 71.5 hours(!) on that single 2500mAh LiPo. This really wasn't expected at all. I presume that by just turning off the LED and transmit just once every 10 seconds, I can make it last much, much longer! Then If you start playing with putting the entire microcontroller to sleep… My intent is to play around with solar charging next, so this could become something that keeps running for a very long time.

Final thoughts

I think there's no need to doubt that these radios can reach tens of kilometers given the right conditions. The ideal condition would be free sight to the receiver, so you need to get the radio high up on a house or a radio tower if you want to go really far. They were surprisingly solid and never skipped a beat. They work well in office buildings, so they could be well suited for sensors in a building where WiFi is spotty. I'm really looking forward to using these when teaching the M2M Communications topic at Westerdals this autumn!

90 RSSI at Kolbotn Church, 750 meters from the transmitter. Some nice Pokemons there as well. Pokemon Go goes really well with radio testing!

 

Milling 2-sided PCB’s

08 Jan16

Milling 2-sided PCB’s

Before xmas I did a lot of PCB milling for a client. Compared to getting the PCB's commercially made somewhere, this is the equivalent of rapid prototyping for circuits. Getting a board produced in the UK, Germany or Asia will typically take at least 2 weeks (but often 3). If you can reliably produce 2-sided boards using a mill, you'll iterate and find errors faster.

Milling is a lot cleaner than etching and you really don't want to hand-drill several hundred holes on an etched PCB. Getting perfect results every time took a bit of learning though, so I thought I'd describe my process for 2-sided boards here so others can use it.

Preparing the PCB

Unless I need components that only exist in Eagle, I make my boards using Fritzing since it's quick and it has a great UI (compared to Eagle). Fritzing allows me to export both Gerber files for production and SVG files for home etching or milling. Fritzing is super easy to work with so I won't go into details on it, but here's some things to keep in mind when laying out the PCB.

When creating the layout, set the PCB to be the exact sub-millimeter size of your PCB milling blanks. Don't be tempted to use a smaller size in the PCB design software since "you won't need that much". This will only give you headaches. Remember that using the size of the PCB blanks, you can easily add some cutting lines, so that when the PCB is perfect you can cut it to size. If you don't do it like this, you can't flip the board precisely enough. Trust me - I've tried and failed many times. It's just not precise enough.

Many components in Fritzing such as via's offer select a Home Etched version that is larger and easier to work with if you make the board yourself. You can also tweak components such as headers to be easier to mill.

One thing that isn't obvious is that on a home-made board, it's much easier to place components on the top and solder them all from the bottom of the board. Professionally made boards have through-hole plating so all holes are connected from top to bottom, but you won't have this so all solder points should end up on the bottom in some way. You can still place traces on the top layer, but you'll have to take them down to the bottom using a via for soldering. Don't forget that rotating components makes a world of difference when laying out the PCB. If you manage to get the top layer as a solid ground plane with no vias, you're saving a lot of manual labor.

A via for a homemade PCB is basically just a drill hole in which you solder a wire connected to both sides. Make sure to set the via to be large and not the tiny default used for professionally produced PCBs. This makes it much easier to solder them later.

It took some iterations to get it right…

Use the widest possible traces that will fit with the connectors and other components in your PCB design. The standard is to use 24mil traces. As we'll be milling along the outline of the traces, so by using 32 or 48mil traces, you can run your mill on the outlines and still have a trace left. Alternatively, you can widen the traces in a vector editing program later, but I find it easier to do it straight in Fritzing.

The next important step is exporting the files (Export > For production > Etchable). This will export files for the silkscreen, paste mask, etch mask and copper traces. We only need the copper. What you'll want is the "Copper top" and the "Copper bottom mirrored". If you select the wrong files, you'll have to redo (or mount the components on the "wrong" side of the board). I suggest that you print out these files on paper at 100% size, glue them together and cut to size so you get a "dummy" PCB before milling. Place your components onto it to see that it's all correct from both top and bottom.

Preparing the output for milling

The exported SVG files will still need some "massaging" to work well. I use Adobe Illustrator, but you can also do this with free software as Inkscape. It just takes a little longer. First go into outline view so you can see any objects that the PCB software has placed two of. It's quite common that square pads have a circular outline under them so clean this up.

Then merge all the vectors into solid shapes so that we can follow the outline to cut the trace out. Remember to copy the holes onto a separate layer before merging, so you have what you need for drilling the holes. I usually use the "Outline stroke" feature to turn lines into fills and then I'll use the Pathfinder panel to Unite all the connected/overlapping vectors. Illustrator does this in seconds, but Inkscape can take 15 minutes for even simple boards.

When you have all the shapes merged into solids, you can move the file to your CAM software. At Bitraf, we use VCarve but all you need to do is to set up paths and drills based on the vector file you've made. I'm using a 90 degree V-bit for the traces and all I have to do is to follow the outlines and cut just deep enough to break connectivity. For the holes I use 0.8mm drills or 1mm if I'm to add through hole rivets like these http://www.ebay.co.uk/itm/200x-best-quality-pcb-copper-via-vias-through-hole-rivets-ID-0-8mm-OD-1mm-/321930742366?

Now that we have the files ready, it's time to move on to the milling. For this project I used the huge Shopbot PRS Alpha that we have at Bitraf, but the process will be identical for any other mill.

How to make a good Jig

The entire secret to getting two sided PCBs perfect is to have a good "jig" - a setup that ensures 100% identical placement on both sides. I made my jig using a scrap piece of High Density Fiberboard (HDF) but you probably use can use many other materials for this.

- Fix a piece of fiber board blank to the drilling surface. This will become our jig. It should be somewhat bigger than the PCB itself.
- Use a mill to by mill away a millimeter or so of the surface. This will compensate for any deviations when mounting the fiber board blank and ensures the surface is 100% planar.
- If your PCB is 1.5mm thick, mill a pocket for the PCB that is a little less than the thickness of the PCB. I used 1.2mm, so the PCB was only sticking out a tiny bit. I made the entire pocket 0.05mm wider than the PCB and that gave me "push-fit".
- If you're making many copies of the PCB - mill a hole on the side of the pocket that is big enough for your finger, so you easily lift the boards out.
- Put the PCB in the pocket and make either a full frame (slightly smaller than the PCB) or use some small wooden pieces that you the fixate the board with. Don't over-tighten as that can cause the PCB to become slightly bent giving you uneven

With this technique, your board will be 100% in the same place when you flip it around to do the other side. On the boards that I make now, I cannot see any sub-millimeter deviation from one side to the other.

I initially tried tape/glue rather than milling a pocket. The result was that I bent the boards ever so slightly and that caused some traces to get uneven widths since the mill went deeper. This approach of just holding the board down solves this.

The finished jig with Polycarbonate pieces to hold the PCB down during milling

The importance of having identical blanks

For the jig to work well it's extremely important to have PCB blacks of identical size. Initially I was unable to find suitable size PCBs at my local electronics store, so I picked of some boards that were twice the required size and cut these in two. Despite using the mill, I didn't get these to the exact size and it bit me later on. I waited until my supplier had restocked and then this was no longer an issue.

Signs that something's wrong

Cutting 0.18 into the board should isolate the traces when using a 90 degree V-bit. If more is required, check alignment of the board in the jig! Twice I've spent hours on milling just to get the other side of the board wrong. Always start with the drills, then the layer with the least amount of traces (usually the top layer). This will give you the shortest route to seeing if things are correctly set up. Alternatively, do the drill holes from both sides to verify that they align.

I hope this helps others making two-sided milled boards. If you use the instructions, feel free to email me a picture of the jig & result?

Project: Makeblock 3D printer

13 Jul14

Project: Makeblock 3D printer

Note that I took this project really far and it became a great 3D printer. In 2019, I packed it down and here's why.

Up until now I've had two 3D printers. My first one was the Ultimaker Original and it now has more than 4000 hours of printing behind it. An incredibly solid machine! The next printer was the Printerbot Jr that my son put together. I haven't seen much of it as he's more or less confiscated it, but it's been a great investment into making him try out some real engineering.

The Ultimaker Original is probably the best Open Source 3D printer available today. Now I've built a third printer from scratch, using the Makeblock aluminium extrusions that I've become quite fond of. You can find the build log here, but why did I want to make a new printer?

Makeblock advantage

When you are making a printer based on Makeblock it is really easy to adjust the design as you go. It's also easy to add new elements when you need it. Not only that. When I at some point retire the printer, I can re-use all the Makeblock parts for something else! Makeblock was started as a Kickstarter and they really listen to their customers.

Less hassle!

The single thing that takes the most time for Ultimaker owners is clearing out blockages. They don't happen if you're careful, but every now and then you'll forget turning off the extruder and the heat'll sneak up the pipe to cause a block. When blocks happen this far up in the extruder, it'll take 10-15 minutes to clean it out. The new all-metal hotend from e3d & extruder design solves this completely and changing filament is done in a snap. Over all, I'm REALLY happy with this!

Polulu DRV8825 FTW!

I'm using original Polulu DRV8825 stepper drivers. This gives me 1/32 stepping that is noticeably more silent than the typical A4988 drivers with 1/16 stepping. These are also more powerful, but in reality I'm not using that advantage. If you have a noisy printer, be sure to check this video for a comparison. They're a direct replacement for 4988's on most Reprap hardware, so odd are they'll make your printer more silent too.

More space

The new printer has a bigger print area (31 x 31 x 34 cm). This was one of the goals of the printer and I'm very happy that I managed to go even a little bigger than anticipated. For comparison - it's 32600 cm2 are more than 4 times the volume of the Ultimaker (7700 cm2). It makes levelling the bed a little harder, but it's totally worth it just to have the ability to print larger objects.

More materials

I've changed the design to a Direct Drive Extruder that takes up less space than the original design. This allows a second extruder to be added at a later time. A Direct Drive Extruder it has one major advantage over Bowden-based systems: it supports virtually all the materials I want to experiment with. Flexible plastics, nylon, wood, clay, bronzefill and more. The current setup allows the extruder to go to 300C. With modifications, I can go all the way up to 400C if I want to.

Flexible

Using Makeblock makes the entire design flexible, but the compact extruder design itself is also quite flexible. One addition I'm working on is adding Dual extrusion as in this video. It's the best approach to dual extruders I've seen to date, so expect an update when I get this working! The design allows me to easily swap out the print head fairly easily so I can play around with extruding chocolate and other fun materials.

So - all in all I'm very happy with the printer! All issues are now resolved, so the design phase is complete. Only minor tweaks remain & the BOM is now online at reprap.org. For now the page contains links to resources & the bill of materials, but I'll also add build instructions to it later.

But - I've got more plans! My Ultimaker with 4000 hours of printing on it's back will soon move to Bitraf and in November I'll (hopefully) receive my first SLA-printer - the Titan 1!

 

Project: wifi-enabled RGB LED displays

08 Jul14

Project: wifi-enabled RGB LED displays

Every now and then there's a project you can't say no to and this was one of them. Finn.no is sort of Norway's version of Craigslist, a big online market where you can sell just about anything. As a marketing stunt, they opened a physical store downtown Oslo. I was called in via some friends in the agency that handled the project and they needed lots of things quickly. Since I was fully booked, I couldn't say yes to all the projects suggested so I passed some of them to my friend Thomas Winther who did a great job making an in-store Selfie-app using Unity & LeapMotion.

In the store they needed a way to show information from the finn.no website and this was the job I couldn't say no to. Apparently it isn't very easy to get hold of a wifi-enabled LED display that can pull data from the web? Also - most commercially available displays are small, monochrome and use tiny LEDs so they're not that visible when mounted high up on a wall. The agency wanted 5 large displays, perferably with more than one color display. Having recently read about Teensy 3.1 and the OctoWS library I promptly said I'd do it!

The Teensy microcontroller is a great alternative to using Arduino's in installations. It has a really fast ARM processor and lots of RAM, but it is still 99% Arduino compatible. This means that pretty much all Arduino code will run on it, but at blazing speeds. After installing a little extra software, you can use the normal Arduino IDE to program it, so it's really an "Arduino compatible". It's so compatible (and affordable @ $20!) that I feel that this is really the path that the Arduino Team should have taken instead of making bigger and more complex boards. Here's how the Teensy 3.1 looks next to an Arduino Nano. It's soo tiny that the Nano looks big!

For the parts, I could have saved some money by picking it up from different places, but I didn't have much time. I picked up tons of Neopixels & Teensy's from Adafruit since they'd ship the parts so I had them within a week. Buying parts from Adafruit really makes a difference since the whole process is completely trouble free. It's a little more expensive, but worth every dollar.

This is how the test-display looked when running the rainbow sketch:

Lovely, isn't it? You can see the neopixel strips lying in front. I stuck these to the back plate using the same clear silicone that I used to fix the panel to the front. The first test showed that we'd have to compensate a little for every 50cm as the neopixels are put together of 50cm segments and loose a few mm in the overlap between these.

Thanks to Jens Dyvik at Bitraf, making the wooden parts was short. Jens is really good at Rhino and CAM software, so the process from sketch to finished product was really swift. His huge Shopbot CNC'd all the lattices and backplates in one go! Nice to have good tools, right? Two things to note about the CNC'd parts:

  • When using MDF as material, make sure each protuding part has a certain minimum size or they'll break off easily.
  • Research carefully what kinds of silicone that will remain fully transparent over time. Most clear silicones will get a yellowish tone over time. The ones that are made for aquariums appear to be the most suited ones.
  • When exposed to heat for a long time, MDF will want to "bend". Make sure you stick it down properly to avoid too much maintenance.

Soldering and gluing together the displays took quite some time, but it was made a lot easier by Paul Stoffergren releasing these neat adapter boards. I added a 2.4Ghz radio to each of these and tucked it away on the back of each display. Here's a photo showing 1920 pixels running at once. Note that the Mac to the left is on full brightness! The displays are so bright that they're visible in daylight as well.

Each sign requires quite a bit of cable and with the amount of current going through them, this was the first electronics project I've made where I've had to calculate the correct diameter of each cable. A good learning experience!

I could have built a Wifi adapter inside each of the displays and in hindsight, that would have been an easier choice if it wasn't for wifi issues. What I went for instead was a server-client solution where a single box would connect to the internet as well as serve up a webserver that could be used to control all the 5 signs. It has a Teensy 3.1 that holds a custom webserver, uses cable for internet access, has a display that shows status and the IP address of the webserver as well as a nrf24l01 radio (2.4Ghz) that sends data to the signs. This is put together in a nice 3D printed box that is wall mounted.

It's a pretty versatile solution and it works rather well. There's two drawbacks to this solution:

  • The NRF24L01 radio's are dirt cheap, but they have a limited range and are affected by other 2.4Ghz radios (bluetooth, wifi & more)
  • The Ethernet library for Arduino is a synchronous API. When the device fetches data from the internet, it'll freeze a short while until the data is received.

None of those issues are big problems, but they're worth noting if you are building something similar. Initially I planned to use a Raspberry Pi to be the webserver, but it turned out to be really hard to make the NRF24 radios work reliably with GPIO on the Pi. I've since noticed that the NRF24 dislikes fast CPUs, so if you're trying to make this readio work on the Pi, make sure to add a delay to your main loop. The Teensy 3.1 is also too fast for this radio.

The final result is that you can use any device such as your phone to control what is displayed on each of the signs. I've also built some remote admin to it as well. Every time the displays power up they'll await instructions from the server. The server fetches API data such as how many tractors are for sale or what are the latest boats available, and sends this to the displays. It's super flexible and a true IOT solution.

Disregarding some (serious) mounting issues beyond my control, I really loved solving this project and you can check it out if you're in Oslo. 

Postnote

After making this, my wife said that I should start making and selling these commercially. It's probably a good idea, but I really can't see myself selling LED signage. However - if you have some weird project in the Internet of Things domain - feel free to contact me. I love a good challenge!