KiCad as a free Engineering Tool

methods

1 GW
Joined
Aug 8, 2008
Messages
5,555
Location
Santa Cruz CA
It is well known that I have always done my development in Eagle. This is because it was free/cheap and this is the tool my mentor taught me on.

Many tried to get me to move over to KiCad, I held out over 5 years. I just completed a design transition.

* Porting projects from Eagle
* Porting GitHub Eagle Projects (like Arduino's and Shields)
* Combining multiple projects into one
* Building and muxing Schematics
* Building and muxing Board files
* Modifying and saving off Library parts
* Getting all the 3D modeling working
* Getting auto-route working . . .
* Everything but exporting the working files and getting examples cut.

BoxComplete.png

To test out the program I laid out the ultimate Arduino Shield

* IP67 Ingress Protected (Waterproof)
* Integrated Signal Conditioning - 100V 8A digital - 100VDC Analog - Isolated AC/DC Current
* Cloud connected via WiFi/2G/3G and via BLE via Android

BoxPCBonly.png

High level ... it is just a motherboard. You need someplace to land the panel mount connectors. On that motherboard, I land 2 types of Arduino

* MEGA - for build DIO and Analog in
* Feather - for low cost Radio

Of course... you can also land any Arduino Shield and any Feather Wing

I put all of the signal conditioning on a shield of my own.
* Line noise in/out
* Analog divide then single pole filter
* Digital out is active low via 4330's

The pics are of an older version, but the 64 pin headers shown cut off all Input and Output at a Signal Conditioning Stage. The original concept was here:

Architecture.png

My final analysis is that KiCad is not ready for Professional Prime Time (it is not a challenge to something refined like Altium) but for the Enthusiast? Yea - it absolutely works - all of the functions. I fell off a cliff a few times and had to do some irritating work-arounds. . . but ... You can certainly succeed using the tool.

I now recommend folks start with KiCad and not Eagle.

The reason for this is that Eagle switched to a Subscription and tightened up the way you interact with PCB's. I was on their $100 plan. . . and in trying to import a file recently I was blocked. If I can not do my work then it is not a tool - so - Instead of supporting Eagle for $500/year I started using KiCad.

... Support sucks for KiCad
By comparison... Eagle has a rich support base (of folks like YOU)... but it will come around.

... anyhow

My SE/Iot shield is like any other Mega Shield.
It rests atop a Mega - i.e. Mega comes up from the bottom. You can then stack further Mega Sheilds on top.

Same with the Feathers (tho the long pins are not in yet)

BoxPCBonlyUnder.png

Here is the Stackup proof for the "long pins". Make them long enough to accept the solder fill.

StackingHeaderProof.png

-methods
 

Attachments

  • StackingHeaderProof.png
    StackingHeaderProof.png
    77.6 KB · Views: 612
I also recently validated AWS as a Cloud Base for low power IoT.

I have Arduino's running that compile JSON test reports and fire those directly to AWS S3. You can then run node.js on the cloud to parse the JSON out to DynamoDB NOSQL tables for report generation.

I also recently validated a few SIM Card providers. That is still in process. . . but I can tell you that Hologram does what they say they do. They are cheap, activate quickly, you can set data limits, etc. I also went with the company Digikey promotes. They were quick as well. ... you can even use Straight Talk if you want to pay that much and have unlimited data.

I validated that all the "newer" sims still work with lower rates - the T-Mobile on 2G and the AT&T on 3G.

My suggestion to the aspiring IoT Engineer is to consider cutting out all the middle men between you and the cloud. If you get "on the copper" of AWS (the very bottom of the big league) you will find that IoT type bandwidth, hits, and storage are very low cost. Like... a dollar. By contrast, many high bandwidth and fast reacting systems (like Uber) are tens of thousands, hundreds of thousands, even millions a month.

...

I have all the Version 4 AWS signature components in Arduino, including use of RTC local and pulling network time by parsing HTTP headers then converting to AWS format.

YYYYMMDDTHHMMSSZ

:bigthumb:

Let me know if I can help anyone who is struggling. It is NOT a simple task - ANY OF IT - you have to commit and work hard for a long time to get it all working together. I support Adafruit (unpaid, no perks) for IoT starting solutions.

Buy this one:

Huzza.png

That is only $17 from here:
https://www.digikey.com/products/en?keywords=1528-1530-ND

That runs an ESP8266 which out of the box supports WiFi and OTA updates. I have proven (personally) that you can then connect that to an AT command driven 3G or LTE modules and have full support.

For BLE (talking with phones... ) the 32u4 is very light weight but you will likely run out of space. 32u4 is special because it runs an Arduino chip + a BLE. That is useful later. In my products I use a different version where Arduino is running right on the Nordic.

Happy Hunting

I have been building what are effectively "Black Box Data Recorders" but on the side I run Power Management algorithms - including limited remote control.

I will of course swap secrets with anyone in the community. This I referenced a lot of Open Source along the way. . . but... DAMN it took a lot more plumbing than I anticipated!

-methods
 
As for Validations and DIY work. . .

I recently eliminated NextDoor from my sphere. Just like any forum they get a mix of folks. . . but here (a technical forum) we at least have Logic and Reason and Proofs and Tests to settle arguments. On next door they have the worst kind of ethos brewing. . . politics and bullying and blunt moderation.

They are in it for the profit and not for the Revolution.

We all have to profit... but the way to do so is not by chopping up what other people say to take the parts that you want. As with leveraging Open Source software - it is a point of honor and respect - to leave the original licenses, context, and comments from the originators... so as not to claim credit for others work.

...

I also recently completed a Validation of LinkedIn. You have to be careful of who's thread you are posting to, but for the most part, it is a fairly open community. Not overly moderated considering that it is "strictly business"... aka... it is a platform where you can be heard by those who have the power to change the world.

....

As for ES?
What is most important for me is that every single individual in the world sees that we are connected and that you will be heard. If you are being attacked by people in power you can contact me off line and I will pass what you say (without moderation) along. I can not promise you protection, but I can promise that speaking up is the first step toward getting out from under abusers.

I will never report back to an Authority if you come to me with valid complaints of Abuse of Authority.

if(ES == SafePlace) post();

-methods
 
As a Time Stamp and proof of Authenticity I offer this.

IMG_20200328_084035.jpg

That is the Anemone I have been captive breeding for 3 years now. He just got a big mouthful of Mysis Shrimp.

IMG_20200328_084027.jpg

There are two of the captive bred babies that came from the mama. They are eating right now. . .

IMG_20200328_084040.jpg

Here is the most recent refuge... collected out of a pile of drift wood from dry sand. Half-eaten and torn apart, we have been nursing it back to health. It still will not take food but the crabs have pulled away all of its infected tissue and it is showing progress coming back.

Notice the color difference - that is under-lighting vs wild. ... These things are not for sale. We have one of the most vivid captive reefs in the world near my house. Sadly due to the actions of man and nature from time to time thousands of creatures are left on the beach to dry up and die.

I collect those and nurse them back to health. Once they are strong, I re-introduce them to areas which are under represented (but already populated). To do so we use ropes and scuba gear. . .

-methods
 
I should start by saying that I read none of the documentation and I just jumped into KiCad with my Eagle Knowledge. That I have found I found thru experimentation in the rudest form.

Here is a boilerplate of my AmpSealed Mega Feather

SCH.png

You will get into trouble with versioning. . . so RULE WITH AN IRON FIST where versions are concerned. It is very easy to accidentally open the wrong version of a file and start working, so I save mine off to a folder titled: legacy

You must track the following:
* Project
* Schematic
* Netlist from that Schematic
* PCB
* PCB output for routing

Starting with just the SCH. . .

You add Symbols
You associate your Symbols with Footprints
You run a netlist - this exports a file that your BRD will later pick up.

(Symbols + Footprints) + nodal connections = output to your PCB

You then open the board and import your netlist. Be careful not to import an old one. The auto-name generation will be the same as your SCH... so if you do something like

V1.1 SCH
V1.1 PCB
V2.2 Netlist

and then you rev your SCH to V1.2

V1.2 SCH
V1.2 Netlist
V1.1 PCB

If the V1.1 netlist still exists then you will process your PCB based on that and find trouble. To avoid this, either keep the naming of your PCB the same as your SCH (suggested) or blow out (save off) old Netlists and get them out of the working directory to force a nagscreen for Netlist to process.

...

Auto routing requires install of JRE (Java Run Time Environment)
You will find, if you follow "the path"... a jar file on your computer. If you run that an AutoRouter will appear that does work. It... eh... is ... not on par with professional needs. It will do the job, but in reality, a lot more interaction is required between the Layout and Autoroute.

I focus heavy on Power first - so ground and sources. Hand draw all of that. Autoroute is just a crutch in the event that you can not get your 2 layer board to route. It can try many more ways than you can in half an hour... but it only works if you leave it enough space to do so.

* Pull connectors away from board edges
* Space out connectors
* Choose a grid which allows tight routing
* Chose traces which are small

Of course... when you did your original Power Routing you did it in a way not to "Block In" signal routing. All of these things are solved by going with a 4 layer board, BUT

* 4 layer costs a lot more
* 4 layer takes a lot longer to build
* 4 layer is not compatible with DIY cutter at home
* 4 layer is harder to rework

.. IF you have a PCB cutter at home then you have to create your own Via's (SO THINK ABOUT HOW MANY YOU USE) and you have to take extra care to inspect, clean, and seal the boards You do not have a solder mask or silk screen, so clean well and seal the boards. Even a hair of carbon fiber can cause your circuit to go haywire.

-methods
 
My tip for the decade is to break up your grounds.

On my circuits, I have the following grounds

* Digital Ground
* Analog Ground
* Power Ground
* Earth Ground
* Various Isolated Grounds

Digital ground is the most obvious and protected. That is just your uProcessor ground.

Analog ground is of course the same (on an Arduino) but you do not treat it that way. You practice strict "single point ground" and you route analog ground paths (as if they were differential or twisted pairs) seperate. This helps with ground pulsing and other noises that are on Digital Ground. If... you had more sensitive equipment you would see that Digital Ground is getting HAMMERED by the CPU's turning on and off. Let that do its thing and do your analog elsewhere.

All analog into an Arduino requires at a minimum a single pole LPF (Low Pass Filter). This is a resistor inline with signal and a cap to ground. Any resistor and cap combination will "do it" and you can infinitely tune. Standard values of something like a 5K resistor and a 50uF cap... meh ... hook that up and see your analog readings get 10X better. What you are fighting is Nyquist, and the way to do that is to filter all things that move faster than your sampling rate....

But that is not the real reason :mrgreen:

In reality you have so much noise in your "system" that your ADC will sample and hold this. That is not the data you wish to see. . . and it is a DSP programmers dream to try and sort it out. ... just... listen to uncle methods and realize that for something like an NTC sensor... you want a Stead DC output and you want it real slow. Once a second is more than enough. You want everything else filtered out ANALOG and not digital. No amount of sample and hold games will solve the problem like a resistor and a cap.

... The inline resistor...
... The cap to ground ...

The cap to ground is accumulating. It can only discharge thru 2 paths:

1) Into the ADC which is very high impedance
2) Back thru the resistor which you set

This capacitor will average out the highs and the lows. The bigger that cap gets and the bigger the resistor gets the more lag you will add on the circuit. The longer it will take the charge up and stabilize... the longer it will hold on to a signal. This is GOOD... this is what you seek..

So -
The resistor is kind of like a plug holding in your average on the capacitor. The capacitor is like an integrator (is an integrator). IF you remove the resistor or lower its value to near 0 ohms you will find that you have lost most of the functionality of your LPF. You will still sink off some AC noise, but not nearly as much. It will charge up near instantly and correct near instantly... and that is in direct conflict with the concept of integration.

-methods
 
For driving signals. . . we do all of this with Active Low.

We do nothing more than close a switch to ground... so whatever you are controlling (A big contactor) has power to its lead and it seeks a ground path thru you. This ground path can be completed with a Transistor, a Mosfet, a reed switch, a button....

To use a Mosfet means that you agree to switch a voltage no higher than the mosfet is rated for. The higher the voltage a mosfet is rated for the more compromise and cost there is in that mosfet. I use 100V mosfets to switch 12V signals... but... most people will use a 20V mosfet to switch a 12V signal. In the event that voltages exceed the rating of a mosfet it behaves like a Zener Diode and becomes a short to ground.

Blah blah blah....

Use Internal Rectifier mosfets.
Use the variety that will turn on and off at 3.3V logic
Protect that gate from noise!!! as that is a very low threshold to turn on
Protect from ringing by running a small resistor inline with your gate. This creates a LPF with the gate input capacitance.

Strap your Drain to Source with a big TVS diode that is rated for heavy current. This, over time, will take the brunt of the expected noise pulses and instead of degrading your mosfet, you will degrade this sacrificial component. Think of it like Zinc Spraypaint, so Galvanizing. Think of it as Anodizing... so pre-oxidation of Aluminium... think of it as a coating of paint to protect your raw steel (your mosfet) from accelerated aging.

...

I spec mosfets with no more than 4mOhms of ON resistance. Doing things like this allow you to back-calculate a maximum continuous current that will require NO HEAT SINKING for many applications. I lay my mosfets down right on the board and they produce well under a watt even controlling hundreds of watts.

....

For measuring Current you do this externally via a shunt or clamp on meter. For AC current I use clamp on meters that have a signal conditioning board. This board shaves off the negative swings and integrates the positive swings into a capacitor as described above. You are then presented a DC signal representing the AC peak current and you can 707 that to get your AC RMS current. That is the BASIC and you can get a lot more complicated.

For DC local I always prefer a shunt, but there are plenty of active components you can select. Be aware that nearly all signal conditioning for current sensors send back a RATIO... a RATIO of what you send them... so if you send them some shitty voltage that is 4.9V to 5.1V... well.. what you will get back will swing the same. This can be OK in the event that this same voltage is the reference for the ADC, but in that event... you must be vary careful with how you interpret your data. I suggest running ery clean and constant voltages (protected) as the source for any signal conditioning. You will have results which are much more consistent run to run.

Accuracy
Precision

Those are different things. We seek precision first, accuracy second.

-methods
 
If you wish to measure high voltages you can do so by simply dividing them down. . . but that is quite the dangerous game and I suggestion doing it a little different.

Where you can -

Measure high voltages (+1,200VDC) with a completely isolated module that communicates its findings back over isolated CAN. This is easy to implement and I have demonstrated methods and ways in the past. NOTE - that you will need heavy onbaord capacitance on the isolated side of the supplies to mange peaks. You may even need a tiny lithium battery and a $0.30 charger for that to survive the current spikes necessary for smooth operating.

Remember
You have to work HOT
You have to work COLD
You have to be Precise

Just because you actually manged to get a readable signal on the bench (sometimes) does not mean you are even close to being "there". To be "There" you need to run hell or high water, reliably, consistently, for the period intended in the environment prescribed.

I am no master of this. . . but I can show you where to start.

Use good parts
Use good practices

It will drive up the cost of your stuff. . . but your stuff will actually work. ... I am talking about remote control chainsaws and full size remote control cars.

-methods
 
And...

To get there I validate that you can use the tool KiCad.

In full disclosure I have not finished a design with it or sent out Gerber. That said, I have tested the corners where I know trouble lays. They... were... a... bit "head in the clouds" in the way they implemented - but - what they implemented does work.

My primary gripe with KiCad is the thought that you do Schematic First and then later choose parts. This concept is great on paper. .. but an example of this where you really eat shit is Connector Pinouts.

You will find:

"A pinout that is beautiful on a Schematic is often UGLY on copper"

If you want to do 2 layer, low cost, DIY type designs. . . then your COPPER dictates the pinout and the schematic just documents that. Follow that rule to low cost & simple design. .. and KiCad will do you right.

I personally START with the connector I will use on Digikey or Mouser. In stock, ready to ship, with symbols and footprints and 3D models. I then work with this connector on the copper layer until I can get all of my high power and signals out in a way that is sane for a 2 layer board. I then go back and find some way to make this look ok on the Schematic.

Say what you want. . . but 4 layer boards are NOT THE SAME as 2 layer boards. We were making 2 layer boards with nothing but acid and tape before the people working on KiCad were born. They would be wise. . . to listen to some of the Eagle Old timers. I.E. Do not forget the fundamentals while working on the fancy stuff.

...
Of course - if you are one of these engineers working with 10 layer boards - who cares. Right?

Yea...
well...
When is the last time you saw someone place a 120 x 120 BGA in their garage at home on a PCB they cut themselves?

NEVER

So that is a different ethos that what we are talking about. We are talking about 2 layer ethos.

Here we practice the old ways. . . each man or woman or other.... digs up dirt and separates ore. We then melt these mixed materials into metals and pound out our tools from scratch. We then use these tools to make better tools, all the while maintaining our connection to the earth and the fundamentals. From dirt, to copper tools, to electricity.... here you can find the full way.

:)

I just set the kiln back up in the back yard. My son and I have been working Tin. ... He has been hammering it out while I have been reflowing it. Next we will step up to copper. We are making weapons. (er - I mean TOOLS :confused: )

-methods
 
... a thought


In Open Source Forum the way it works is this:

* Original content, in tact, verbose
* A second thread, more compact, validated
* A third thread, only the validated cream - but references back to source.

This allows for the refinement of content with preservation of the source. If you want to... you can go back to the source and see the context. Who did what and in what way... who offered corrections. Who came to teach. Who was off topic and just causing rukus.

...

This is a natural thing that just happens.

To try and short circuit this process by hacking down threads to ... bones ... to.... seed crystals of only what you think is important...

I am not in support of that.

What I like is to be able to drill down thru threads, find links to old threads, and see the original context of how things came to light. Often times subtleties are there that are easy to miss. LESSONS ... ... sometimes an old gray beard is trying to teach a lesson to a young hot head. These lessons may take pages or months or years...

I can tell you that the Gray Beards I know will not try to teach a complex lesson if someone is apt to cut into the teaching process to extract ore prematurely. Ore comes in many flavors - some first order and some more subtle.

We have lost good contributors... like J.Harris

There are many reasons a forum loses its core contributors. One is obviously personal attacks and illogical Bullshit. Another is Politics. Another is Religion. Another is stuff like sexism, homophobia, etc. What you must have. . . is a forum where Women, Foreign folks, etc feel that they are Safe and that the work they put in will persist.

At times... this may mean leaving things verbose which could be compacted. SORRY if what you wanted to do was just come here, get exactly what you were looking for, VALIDATED, and leave. ... that comes later. Where we are at here is the dirt. This is where anything is possible that can be proved to be true via a Scientific Test.

Let us try to be patient with some members.

... That said
I have heard enough of the yapping Kooks, personal attacks, and bullshit. If you are just freaking out then you first be transitioned down into the sewer, then blocked for some period of time, then banned..

Slow down
Think about what you are saying and why... and accept that this is the LONG FORM here. Twitter is the place you can go to spout off your Dooms Day conspiracies. This is the Endless Sphere here.... where we are developing Revolution/Electric and at times Revolution in general.

Aka -
You are participating in the groundwork of something new that has never happened before. Not like this, not this connected, not this ... vivid.

Have fun - and do not worry about how verbose things are. We have Search Engines and various personalities who can reference and refine the data. Not everything has to be hacked down and chopped up into Seed Crystals.

... I am quite upset at the moment

... Amid the current crisis, some folks are bringing up very important and valid subjects around shipment of goods internationally. These same shipments are what you find re-packaged in Amazon wrappers. Any talk of this will NOT be moderated on the Endless Sphere. It is VERY IMPORTANT and should be allowed to happen up in the technical area.

AKA - Long ranting BeerVirus Posts - down in the sewer. Active topics about the risks involved with overnight transport of goods... up in the top forum.

OVER N OUT
-methods
 
Engineering Inhibition

This is where a very useful or thoughtful or experienced person is hesitant to way in or help for fear of being incorrect in some tiny way. This is the reason we have informal discussions. . . where you need not be perfect... where you can let an idea fly that you feel uncomfortable about... where it is ok to be imperfect or only 80% correct... where... we can laugh and have fun and poke fun at times.

... This is not a Meat Kabob vendor on the side of the road where you drop off things to eat and buy things to eat ...

We are developing ideas here. Breaking kids out of their shell. Teaching others to write and speak and interact. This is the play place of nerds. . . and I know some REALLY SMART nerds. . .

These nerds do not want to take the personal risk of contributing to the Version 3 thread... where if you are wrong... you get eaten alive by a bigger fish. They want to play around with words, try out ideas, and not have consequences for being wrong. They can wing out ideas... then back those with proofs... and it is ok.

If you understand that - good.

If you are a chest beating, woman hating, gay hating, world hating, trump supporter... well... I guess that is ok, but we are not friends.

now over and out :kff:

-methods
 
See what I did?

I laced a Technical Content Topic with a current affair.

Some will tell you I did wrong. They will tell you to keep the topics clearly separate, start a new topic.

I have no desire to make a Current Affair topic. That just attracts the mouth-runners, politicians, liars, and bullies. By hiding my Current Affair down here under technical minutia I filter those who see it.

Think about it.

I will pick up on and run with a topic with any person in the whole world. . . but what I have found is that some people are a waste of time to talk to. ... By hiding my invitations down here... I pre-filter who I have to get thru... and I am more likely to connect with and interact with people who are of like-nerd-mind.

People who speak PCB board and AT commands.

I do not think it is wrong.
I think what is wrong is long winded and ranting personal attacks that are backed by little to no technical data.

My Trump Supporter joke was 1 line...
But you do not see me hounding someone or trolling them with it.

I do, at times troll folks. That is almost always in response to someone getting overly chest-beaty... when I can see that they are an engineer with maybe 1-3 years experience but they are getting WAY too fresh. I then focus on them a bit to let them know that ... eh... we only need so much "THIS IS THE ONLY WAY YOU DO IT" talk. There are infinitely new and better ways to do things.

OMFG - turn off the internet... I gotta go back to work.

That was an "emotional appeal". Strictly speaking a losing argument.
(We have been going thru the Logical Fallacies FYI - debate prep)

-methods
 
I think I can speak Methods language...he seems to have a lot to talk about..

Question - Why not ESP32 vs earlier ESP8266?
My understanding was that the earlier part ran the TCPIP stack on the same core that the user's code was and that was not a good thing...
 
Back
Top