Got a great interview in with This Week in Machine Learning and AI.
Check it out!
Got a great interview in with This Week in Machine Learning and AI.
Check it out!
One of the things Altium Circuit maker current lacks (see a short review here: Altium) is the ability to import images into Altium’s board design.
There is a fairly painful way to do this via making an image into a font, installing the font to your computer, and then “typing” it in to get the image to appear. This is.. sub-optimal.
However, one can import/export from a .csv file into vertices of a polygon pour. This could enable importing images into Altium.
The rules for polygon pours seem to be as follow:
So, we could make a script that generates a list of vertices, and import a (somewhat blocky, 1 bit color image) in this way.
Here is an example done by hand (note the thin lines do not appear in a gerber export!). The lower left square is drawn first, then the lower right, and lastly the center square.
The starting/ending point is always the lower left origin.
The vertices for just that simple shape are fairly lengthy:
|Index||X (mil)||Y (mil)||Arc Angle (Neg = CW)|
Notice above, we do have the ability to specify Arc angle for each segment, but that is a level of complexity I will likely avoid in the near term.
My favorite tool in the bag of tricks is Python, mostly due to avoiding the need to compile, and lots of good libraries. This is especially true of graphical manipulation, which we will need if we want to get images into Altium Circuit Maker.
I used Python 2.7 for this, on Windows. (you will need the python pillow library, execute “python -m pip install pillow”)
See the full code here:
Open the “ImGen.py” file, and change the file name, size and inversion as needed. Once the program is run, it will generate a .csv file with the same name as the image input. This can then be imported into the polygon pour.
The lines returning to the center can be seen above, however they do not appear on a Gerber file.
There’s a few downsides to this approach over the image-font-import method:
This ultrasonic amplifier project comes in two parts, design, and testing. Today we will cover the design and rational.
Many animals emit high pitch noises, what we call ultrasonic, that is beyond the hearing range of humans. Two such animals I am interested in are rats/mice, and bats. I want to hear the noises that they emit.
The classic approach that many bat detectors use is to amplify the signal coming from an ultrasonic microphone, then just treat it as a square wave and divide it down into human hearing range. This seems a little cheap to me, as you are getting a severely distorted noise, that does not carry amplitude info at all. Imagine a speaker screeching in distortion because someone set it too high, that is essentially what you are hearing from this detector.
My thought was, why not do a FFT (or even better, an FHT) to get the spectrum of the sound, compress it if needed, and then shift it down into human hearing range. Lastly, we just do an inverse FFT/FHT, and voila, truthful sound at roughly the right speed.
First things first, we need to amplify the signal from a ultrasonic microphone. The ultrasonic amplifier works in three stages, with the final stage having an adjustable 1-100x gain. When selecting the gain per stage, don’t forget to consider the gain-bandwidth product of the amplifier! The 1/2Vcc below is generated by a simple resistor divider, which works fine in this use case, as your op-amp input impedance is very high.
This signal is then fed to a single stage Sallen-key filter, to remove any signals above ~90kHz, and then into an ADC. Remember to always chose an ADC with a sampling frequency at least 2x your highest signal frequency, this is known as the Nyquist rate. In reality, you want a sampling frequency of ~5x or more, to get a decent picture of the sampled waveform.
The signal can then be read by a oscilloscope for testing, and fed via SPI to a microcontroller. I will be using the ESP8266 for the FHT and IFHT steps later, possibly showing the waveform in a webpage.
The circuit layout is a fairly straightforward 2 layer board. The only trick for this ultrasonic amplifier is that the microphone is mounted horizontally to save on board space.
Now to wait 2-4 weeks for delivery and assembly 🙂
As always, these projects are open source and usable for any reason (preferably with some attribution). You can find the designs on my Altium circuit maker page:
Altium (used to be Protel) makes some very nice PCB design tools, and Altium Circuit Maker is their newest product, with the added benefit that it is free! This two part series looks into Circuit Maker, and has a quick tutorial on usage. As always, leave comments below!
Altium Circuit Maker has upsides and downsides, but overall I think this will be a GREAT addition to the open source hardware movement! Sharing all your designs and parts libraries by default is a bold move, and should lead to great things!
If I had to point to one thing that Altium Circuit Maker desperately needs is better community support! The starting community page is lackluster and random.
Altium! Please add this stuff:
Here is the current deal breaker though: There is no version control for library parts or anything in place at the moment! I can go in and change practically any library part in any way I want, authors retain no control on their parts library entries. My changed part becomes the new default revision, as in the first one listed and selected when importing a part. THIS is a deal breaker, for 3 reasons:
If Altium Circuit Maker wants to fix this, they need to employ the Github model, and FAST! That way, every part would have an “issues” page, a rating page, and authors would hold the “master” copy. If someone comes along and notices a mistake, they can submit a pull request. If the author is not responsive or doesn’t want to fix, they can then make a fork and direct people to the corrected version. This would solve all of the versioning issues very quickly.
There doesn’t yet seem to be a lot of tutorial content out there for Altium Circuit Maker, so I am going to walk through getting a simple board produced! The tutorial will also cover some tips for first time circuit designers. General steps are idea, parts selection, schematic capture, part creation, board layout, and production output. The full documentation is available here: http://documentation.circuitmaker.com/
What do you want the circuit to do? Does this function already exist? (please please PLEASE do not make another level converter or RS232-USB circuit, there are thousands of em). Things to consider:
In this example, I will be making a small programming header board to get from the venerable AVRISPv2 to a small integrated board. I will need to source USB power, provide some simple protection, and have a signal inverter for the reset line. I am making 1 board only.
Now that you have decided what the circuit must do, we should consider the core parts of the design. The main microprocessor or other central parts should be listed. For my project, this is simply a header, an inverter, plus a 3.3V linear regulator. When selecting parts, be sure they follow the requirements from the Idea section above.
Open Altium Circuit Maker, and start a new project. Note that Altium Circuit Maker makes project open to the world by default, but has recently made a “Sandbox” mode available to keep it private. Next, right click on the project and select Add New To Project -> Schematic
Pro Tip: Use the Windows Problem Steps recorded to help easily write super detailed tutorial steps and screenshots
The first part I am going to add is the inverter. Go to the View top toolbar, and select Libraries. On the right side menu, I input the part I am looking for, ensuring the top “Has Model” checkbox is checked, the NC7SV04P5X. Repeat this with enough parts until you have most of the important ones.
Now that we have some components, we can take our first stab at wiring them together. For now we are going to stick strictly to the basics, things like sheet re-use, buses and differential pairs are to be covered later. First add power ports, one for each GND and power signal. Don’t make the mistake of leaving the power port named VCC, double click it and rename it to something like 3.3V. This makes your design less error prone and much more readable. After your power ports, wire up all remaining connections.
You can also add comments, to help explain design decisions. These are publicly viewable, and can also let users flag issues.
Sometimes the part you want does not exist in the Altium Circuit Maker included CIIVA library. This is your chance to create a part and give back to the community! In my case, a header that matches the AVRIPSII programmer does not exist, with part number 75869-131LF.
Open the Libraries side panel under View -> Libraries. Here, enter the part number you want (ensuring the top “Has Model” checkbox is NOT checked) right click on the brought up component and select “Build this component”. Altium Circuit Maker now automatically populates the part entry with a ton of data, saving you time. We now need to add a Schematic symbol and a Footprint. This is done by clicking the + signs at the bottom of the page.
If you realize later on that you made a mistake here, got to Libraries, search for your part, right click and select Edit.
WARNING: Make sure to click “Commit” when leaving, else your work is LOST!
Here we draw the schematic representation of the part. This consists of adding pins (Passive, In, Out, etc) and drawing an overall shape of the part.
More info here: Add a Symbol
The footprint is the physical model of the part. It is used to define pin and pad placement, silkscreen outline, and ensure mechanical fit. All parts created should ideally have a 3D model, but this is not required. The bare minimum is a mechanical outline, pads, and indicator for orientation (usually silkscreen symbol for pin 1).
You may have noticed a third box on the parts creation page titled Simulation model. This is used when simulating electrical parts prior to production. In my opinion, in 99% of cases for the hobby/small project world, it is not worth the effort to use the simulator.
That’s all for today! Tune in next week for Part 2 – schematic naming, Board layout and manufacture!