Author Archives: Yan Nic

3D printed spray paint stencils

At my university there was a party for all the nerds from computer science and communications engineering yesterday. This was the first opportunity to use the department’s new tables and benches. Although the risk of theft for these things is rather small in our environment we decided to mark the furniture with the logo of our university. The best way to do this is with spray paint and a stencil. Now we just needed a stencil of our university’s logo.

We can get access to a laser cutter but as it is not part of our own lab we are charged 5€ per minute of using it. What we have in our own lab is a 3D printer. So we decided not to cut the stecil, but to print it.

Most things you may want to spray paint have features that do not conect to the rest of the stecil. Therefore you need small bars connecting everthing into one single part. These bars are later visible on your sprayed surface as they also cover the object from the paint.

Here are the problems in our logo marked in red:

Notice all the small features in the signet on the left side.

Now when you use a 3D printer there is no need for your connecting bars to be flat on the surface of your sprayed object. You can build small bridges in the air above the surface that allow the paint cloud to reach the area under the bridge.

So I set out to construct a stecil in my favourite 3D CAD program. The stecil is 2 millimeters thick to be nice and solid. The bridges are 4 millimeters above the painted object while being 1.5 millimeters wide. All bridges are contructed manually.

As our printer’s bed is not big enough I split the stecil in two parts and put them together afterwards with electrical tape.

The rest is shown in the images:

Final remarks

This is my first try to make a 3D printed stecil. There are some things you should watch for when doing this:

  1. Make features big enough. The main reason why I had to print it this big and in two parts were the very small features in the signet which the printer could not handle in the original size.
  2. Don’t use too much paint! I used way to much paint while spraying to get everything in solid colors but that results in much excess paint on your stecil that will drop everywhere. Especially if you have to paint many objects with your stecil this is critical. When painting the last few benches the signet was blocked with paint and you can barely read the text there.
  3. Maybe make the stecil thinner. With a 2 millimeter thick stecil there is plenty of paint sticking to the inside ob the stecil. This paint will run to the back of the stencil and gets squeezed between it and your sprayed object. When the stencil is thinner there is less space for the paint to stick inside the stencil.

16 PWM Channels in one Chip

If you build a Huge 7-Segment Clock out of RGB-LED-Strips you will likely run out of PWM channels on your microcontroller. Luckily NXP knew that and designed a whole bunch of different chips to overcome this problem. All of them are connected via I2C.

For my project I decided to use the PCA9685 (that data sheet is really comprehensive). The selection process was eased by the fact that it was the only part able to source via a local distributor (RS Components). The price is 1,79€ per piece when you order 10 of them.

During my research for this chip I found that Adafruit uses this piece for their servo driver board. Not a bad reference.

Now, what is this chip able to do? Well, if you need an excessive amount of PWM channels (a gross in my case), this chip will meet your needs. As mentioned before, it is hooked up via I2C. Six out of seven address bits can be set freely. This allows theoretically 1024 PWM channels (let’s call this a Mega-PWM, shall we?). Practically this is reduced by some reserved addresses, nevertheless these chips will provide enough channels. When you have that many chips on the I2C you may worry about transfer times. This chip can handle bus speeds up to 1 MHz instead of the usual 100 or 400 KHz. Only make sure your microcontroller can handle this, too!

As the number of channels is covered, there are more handy features. Each channel can be set to a different PWM value (this is not always the case!) and the value can be in a 12 bit range. When we hook up an LED to the output (and we sure will), this means 4096 different shades of grey (pun intended). You can not only set the pulse width of the PWM but also the point in time where it is turned on per channel. So why do we need this? Image you have 16 channels with big loads (switched via an external transistor). Now, every time the internal counter of the chip hits 0 all of those channels will fire up together. When you cycle this fast enough chances are that you will kill your power supply if it is a switching one. So it is clever to balance the instances where a channel is turned on over the whole PWM cycle.

Enough PWM, make it light up! These chips are able to sink 25mA per channel. This means you can directly connect your (single) LEDs to this without any additional drivers. The data sheet provides examples for using them directly with LEDs and also with external drivers.

This chip also has a little brother, the PCA9635. It features only 8 bit PWM but has 7 programmable address bits. This will come handy when you need 2048 PWM channels.

Planning a huge clock


Once, I randomly stumbled upon an awesome tutorial by Sparkfun Electronics. They built a giant clock out LEDs and Styrofoam. Then they synced it to the GPS for exact timing. What I like most is how ridiculously big this is inside that room. The digits are 60 centimeters high and the clock is 3,6 meters wide. I need one, too.

The guys at Sparkfun used the LED Light Bar from their shop. They used 92 of those bars. When you buy 100 of them, this will cost you about 180€. This is way above of my budget for such a silly awesome project.

Also, why just limit this to one color? Wouldn’t it be cool to change the colors or even animate the change of the digits. This could emulate an old Nixie tube for example. I need RGB-LEDs and PWM dimming.

The idea of using some kind of bars for the segments is nice. Your LEDs are equally spaced and you already have a board and some connectors. Can’t I build this myself? After searching all over the web for cheap RGB-LEDs I found RGB-LED strips at a length of 5 meters for under 20€ complete with controller and remote control on eBay. These strips can be cut every 3 LEDs and that way I get my “bars”. I plan to use 48 of these bars and this way a single 5 meter strip suffices for my clock.


The image above shows my segments and some strips inside them. Every segment gets a strip of 3 LEDs and every dot gets a single LED as they are way smaller, This will also level the brightness. Note the extra decimal dots. These come in handy when I want to display the current date or when using this as a giant stop watch.

The size of the strips also limits the size of the complete clock. My version will be 1,5 meters wide and 33 centimeters tall. This will still have the desired effect on the wall of my room.