32xServo/IO Hat Rev 1.4 Annotated

2nd Draft of my new 32xServo/IO Hat rev 1.4. Added the leds and missing SPI resistors + reorganized connectors at bottom. I notice that I need to add a capacitor to assist D2 (TVS) on the bottom + I want to add 2 jumpers allowing left and/or right array to be connected to 5V as supply +++ but, I am in no hurry to order this. As mentioned before I still have not fully tested rev 1.0 and it is mostly cosmetic changes. But, this has an obvious change that I put all analogue capable channels at left and all PWM only at right + to more care to use as many HW timer channels as possible. In the end I managed to grab 25 Hardware timer signals, leaving only 7 for SW bit banging.

  1. CAN 120 Ohm terminal jumper.
  2. CAN Port.
  3. 16 x Anague capable Servo/IO channels.
  4. USB Port. Great for development and stand-alone operation from PC as well as downloading new firmware.
  5. Servo power Connector.
  6. Leds 1 Power Led and 2 MCU leds.
  7. 16 x PWM only channels.
  8.  8 x 4 channel 5V TVS to protect MCU ports.
  9. 4 x drill holes in Raspberry PI 2 position/size.
  10. SWD connector.
  11. Raspberry PI 2,3,4 Connector.
  12. Led for CAN port indication.


This block diagram show the actual channel per channel capacity and what MCU signal I used as base.

My challenge now is how to order a PCB? As mentioned before Norwegian import rules changes 1.Jan.2020, so I get slammed 20.- USD on a 10.- USD order. I need to find ways to avoid those handling fees, but it will take time before sellers abroad adjust and start declaring Norwegian MVA. If Elecrow declare MVA I would pay 2.5 USD for a 10.- USD order, if they don’t I end up paying 2.5 USD in VAT + 20.- USD in handling fee. One solution is that I wait and order many PCB’s together because the handling fee is the same. Doing this on PCB is doable, but on components it is close to impossible. The drawback is that samples will start costing 3-4 times if I can get them at all. Don’t worry, you will hear me whining about this for some time until I find a solution.

32xServo/IO Rev 1.4

First draft of 32xServo/IO Hat. Designed withh KiCAD this time, but still a 2 Layer design. I lack 3D packages for Power connector, USB port, JST CAN port and Q1 Crystal. The Q1 Crystal footprint was my first footprint design, but is was rather straight forward. Next I will have to try adding a 3D package. The 3D model uses “Raytracing” and option in KiCAD to make the board look more realistic. You can see the ordinary 3D model below and make up your own mine. A 3D model is a 3D model, it has a functional purpose so I must admit I prefer the one below because it is faster – much faster to work with. But, it is nice to have options.

And yes – leds are missing. In fact many of the changes I discussed before needs to be inserted in the next draft.

Changing footprint and 3D model on Target 3001 was done in a proprietary scrip language that had its sides. My main challenge was that it took time and you forgot the script language between every time you used it + it was not well documented. Making footprint in KiCAD was very visual and straight forward – time saving.

KiCAD – PCB Layout

One of many new features that was not available in Target 3001 is display of signal names on tracks and pads. I selected the wrong footprint for SWD, but as it is the same size as a 1.27 pitch header I did not think it matter before I noticed that it count the pin differently – wherever this bug is in schematics or selected footprint can be discussed. What is important is that KiCAD allow me to see it.

Another feature is the capability to drag entire sections of lines to make room for a new one- The level of semi-automation on KiCAD is really impressive. I am actually routing manually, but the automation allows me to move earlier content to make space and suggest alternative routes from where I am with such an ease that PCB routing is done in a fraction of the time I needed with Target 3001 – and I considered Target 3001 to be easy to work with.

This is still a 2-layer layout for now as I am learning KiCAD properly the only way it can be done – by using it and gaining experience. But, I have not used the backside much at all do to the routers capability to find or make paths. It will obviously take a few weeks before I truly master KiCAD and I will not spam this blog with details – I think most of you get the picture by now – KiCAD was something I should had started on years ago! That said – getting started with KiCAD is a bit heavy so you must set your mind and start digging in watching videos and try and fail. KiCAD has to be learned the hard way, but it is worth it.

As for suggestions on how to improve KiCAD – don’t worry, I have plenty. The first I would start with is to merge the two screens that (1) allow you to watch footprint and (2) allow you to select footprint because the first let you see the footprint while the second don’t – luckily I van have both open at the same time because it’s a bit hard not seeing the footprint you select. But, again – you don’t want to hear about how I had to do this earlier + yes it’s a button to open a 3rd window where you can see the selected footprint 🙂

Looking at the backside pic above I notice how little I have used the backside – which is good since we are on 2-layer, but I also notice that I still have to learn how to deal with drill holes yet. One thing at the time.

The last think I wanted to show you is the semi-auto router. As you select two points on the PCB KiCAD will attempt to autoroute that lane. In this case I was more impressed that it actually found a path – I will not be using this one, but many times I do and end up routing much more single layer than before. I can now draw part of the lane manually by clicking on connection points and the auto-router will take it from there. And you can always use the drag function to optimize path afterwards as well. This is a big time-saver compared to how my previous tool worked. I assume it exist a full auto-router as well, but I have not tried that one yet.

Thanks for reading my early morning ranting…

Ordering new PCB’s

It is soon 1.jan.2020 and Norwegian import rules changes, meaning I basically get MVA and a 20.-USD handling fee on every package unless I get the foreign company to declare MVA. It will be a pain and take some time before this happens. Ordering parts from Asia will be close to impossible unless you order big quantities. It feels like my country are reverting back to the stone age…

2-Screens in use w/KiCAD

This is a screen-shot of my two screens. I have PCB router on left and schematics on right. As I work on PCB the schematics will show the associated part – neat little detail. KiCAD is actually multiple applications so its perfect to take full advantage of multiple screens as you work. I have routed 60% of the new board in about an hour – most times just playing around – KiCAD is so quick to route that it is amazing. The auto-router is also good at finding track options allowing me to stay as much as possible on the same layer + it’s a real pleasure to use via’s.

KiCAD 3D Model

This shows and early draft of rev 1.4 on KiCAD using their normal 3D model. KiCAD have a more realistic version that is a bit slower to draw, but for all poractical purposes it does the job. Accurate details is IMO not important here, the objective is to verify as much of the mechanics as possible. KiCAD enables export of images directly, but I ended up using my old trick of taking a screenschot and use Paint 3D.

What I am really happy with here is the PCB layout. Some things are a bit new and different yet, but the more I learn KiCAD the more I like it. on some features I seems to have less manual control than before, but all in all – setting this up was more about learning KiCAD than work.

As you can see I lack 3D model on 3 footprints + I have the wrong footprint on the crystal – I have yet to learn how to create my own 3D models and footprints. But, I am happy to see that the libraries contains far more + you get libraries from various sources. And yes I know – I am using straight headers rather than angled headers because I did not find angled headers 3 rows deep. I am not even sure if I actually used the correct tool for drill holes as what you see is a gigantic “via”, but I will get there thanks to hundreds of videos assisting me.

One of the tools I really appreciated is the measurement tools and aids on making correct dimensions – that was not existing in Target 3001.

Operating KiCAD feels like doing Schematics, PCB and 3D in one integrated tool. I know it is different tools, but once set up the next step is only a button away. It is a few manual steps between schematics and PCB to give you full control and I must admit I like having schematic symbols separated from footprints giving me options to replace footprint with a minimum of changes.

As for PCB routing – You have to remember that I started my carrier as Electronic Engineer back in 1978 using pen and paper to make schematics and PCB layout. Actually using a CAD tool is like putting someone used to a horse carry into a formula 1 car. Target 3001 impressed me, but getting used to KiCAD is like dropping into the cockpit of a jet-fighter. It’s semi- automatic routing is very impressive in terms of how fast you route. And just for the record – I have used Target 3001 for 4 years and KiCAD for 1 week. I still like Target 3001, but it is no match for KiCAD once you take the time needed to learn it’s user interface. And to remind you all – KiCAD is free, open source. It is C/C++ code with wxWidgets.

KiCAD vs Target 3001 – 2nd Impression

1 – Schematics – KiCAD is most definitly a step up. It is much, much faster to work with once you get used to the somewhat weird user interface.

2 – PCB Layout – It is hard to say. I see huge advantages in the life-cycle of interactions between PCB/Schematics as I apply changes.

3 – 3D – Both gets the job done. KiCAD have a special mode making 3D model look realistic, but so far I must admit that I preffer Target 2001 on this.

Will be interesting to see how these impressions change as I get to learn KiCAD more – so far it is ok – weird, but ok.

I am mainly a Windows user/developer so my expectations to user interface is standarized through years of Windows usage. Target 3001 fall into that category. People who have grown up with Linux is not used to this and tend to re-invent the wheel by doing things differently – KiCAD falls into this category. It takes a bit of time to get used to because it don’t follow standards we are used to. Once you get the shortcuts into your fingers they actually are quite convenient.

Making a LED Lamp

I am a bit handicapped as my Lamp with a magnifier broke. I was using that all the time, but having seen how badly designed that it I decided to rebuild both of my lamps to be LED lamps.

What I will do is to buy a 130VAC to 12VDC adapter in a shop (or use an old one laying around) that is CE aproved – and this is very important in Norway. I am allowed to deal with 12V, but if I deal with 230VAC and start a fire my insurance might kick back on me.

This project is straight forward – Use an adapter to get 12V and make a PCB that is a circle fitting inside the lamp with LEDS designed so they accept 12V – in reality that is 3 leds with a resistor in series.

The next step I am considering is to use an ESP32 and a few Half H-Bridges to dim different parts of the lamp to control light, but for now I will just make a dumb, analogue design on vero boards to get my lamp working again.

Getting on with KiCAD

The graphical user interface on KiCAD is different than most applications. On KiCAD you get little feedback that you have selected something. Editing on PCB is quite “normal” – you select a component and click to move it. Doing the same on schematics are different, you select by using area and the component stick to cursor until you click again.

This is just one example of how KiCAD interface is a bit different than what you would expect from a standard Windows application. And this takes a bit of time to learn.

Comparing to Target 3001 it is a few things that are automated in Target and manual in KiCAD, but the rest is quite cool if you take the time to master the tools.

Target 3001 have multiple sheets with global labels, but KiCAD have a hierarchical sheet system. I basically use the first sheet for sub-sheet for every module in the system. But, here comes the main advantage – they are actual modules. KiCAD support local tags that can be used as interface if you re-use the component. This is a big advantage – I am about to redraw 32xServo/IO and can basically have one schematics referenced 32 times.

Integration between Schematics, PCB design and 3D View is close to fully integrated. It is separate applications, but you don’t notice that so much. What was most alien is that in KiCAD you draw schematics, afterwards you allocate footprints – so in other words you can easily change footprint without touching schematics. In Target 3001 symbol, footprint and 3D was always connected – it’s pros and cons on both – you just need to get used to the tool in front of you.

All in all I am quite impressed with KiCAD so far. Yes it takes a bit of time to learn, but many of the differences leads to more advanced tools that will help productivity. Using KiCAD without a community and dozens of videos would however have been very difficult.

Moving lines on schematics or PCB seems to be little automated, but it might be that I have not learned it properly yet. If I should compare Target 3001 and KiCAD I would state that Target 3001 is much easier to learn and master than any other tool I have tested so far. I do however feel that KiCAD will be better and faster to work with once you take the time to master it – and this is what matters because we are only newbies for a short time.

And lets not forget the most important feature in KiCAD – it is free. If I should continue with Target 3001 I would need to pay 1000.- USD for a fraction of what I got in KiCAD – which I can guarantee you is not an option. I have a friend using Cadence priced to something like 10,000.- USD per license and he brags about it a lot. But, I also remember a time then Embedded IDE’s JTAG’s and compilers costed thousands of dollars – I still pay license on Visual Studio at work, but even that is free for open source these days.

Burning lamp

Working with electronics you accept that it is a small risk of fire and take pre-cautions. But are we really prepared for what can go wrong? The issue is that everything around us contains more electronics and things that can take fire these days. Yesterday my lamp bought on Clas Olson took fire. Nothing bad happened, but the light tube took fire and wrecked the lamp. Changing light tube nothing happens, so this lamp is wrecked. Pictures below:

Obviously the fire started in the light tube itself, burned some of the heat resistant plastic and heated up quite a bit. I have never seen this happen before.

I was in the livingroom as it happened and came back to a dead lamp – no drama, but if something else had caught fire my house would have burned down. I am stunned to see that it is something inside the light tube that caught fire – probably the start device – I don’t know the proper name, but these types of lamps have a small “starter” that in this case seems to be inside the light tube itself.

The lamp is very nice for electronics work because it has a magnifier in the middle, so I have to replace this – or should I just upgrade it to a led lamp?