I generated several libraries for Altium (or Circuit Studio) using Database Libraries which I then exported to IntLibs.
I realize you can get many of these parts from Altium or other third parties. I wanted to figure out on my own how I could scrape data from Digi-Key and (almost) automatically create part libraries.
Altium Designer has a powerful feature called Database Libraries which take an external database and link entries to a schematic symbol and physical footprint. The database can take many forms such as an Excel spreadsheet, Microsoft Access database, or in theory any SQL or ODBC source.
I’ll start here by giving you the libraries I generated and I’ll make another post about how I generated them.
There are 6,029 resistors, all are Panasonic ERJ series. The resistors are split up into 6 different IntLibs according to package size: 0201, 0402, 0603, 0805, 1206, 2512. I scraped the data from Digi-Key to create these libraries and thus they contain a significant number of parameters that you can use for your BOM generation.
The capacitor libraries are similar. There are 4,739 capacitors in 6 different libraries split up according to package size: 0201, 0402, 0603, 0805, 1206, 1210. They all contain similar parameters as the resistors. All capacitors are Murata – because it was easier to scrape one manufacturer without getting thousands of duplicate value parts.
I was given a license of Altium CircuitStudio in exchange for my opinion. I’d like to think I’m not biased, but the fact is that I was given free stuff. So I’m going to present facts in the hope that you’ll find it useful. You should use your own judgement where applicable.
I did not agree to, nor was I asked to provide positive feedback about any product in exchange for goods.
Altium Circuit Studio review Part 1
I will try to answer questions related to how an individual would value Circuit Studio vs. Altium Designer in their small-shop business.
First I want to give you an idea of my experience so you know where I’m coming from.
I started using EDA software in 2001 with Eagle, then made by cadsoft. Actually I started a little earlier by using Protel EasyTrax when there was a free version of that. But I had no idea what I was doing then. I was pretty young.
I used Eagle up until around 2012 when I was designing a VME board for a real-time control system. It was the largest and most complicated PCB I had ever designed. Eagle simply could not do it. It became bogged down. Routing traces was an absolute mess because it was so slow it would crash. The manual router had no online intelligence of design rules so you had to guess about where you were placing traces and cross your fingers when running the DRC check. It was OK for small boards, but I had moved in scope and complexity. I was designing boards with high speed buses and controlled impedance.
I was able to get my employer to pony-up for a license of Altium Designer after significant research and watching how-to videos on YouTube.
I use Altium to this day at my current day job. They have a single license of Altium but for “official” designs I have to use Mentor Graphics DxDesigner.
Enough of that for now. Let’s get on with it.
Installation and first impressions
[ any image can be clicked to view a larger version ]
CircuitStudio has an installer downloader – 8 MB initial download. Full install is around 530 MB. I didn’t have any trouble downloading the installer. I am not sure if you can acquire a standalone download of the software.
Installation went along without a hitch. I have to say – at least Altium has figured out installers. If you’ve installed Dassault or Autodesk or Mentor Graphics software lately you might realize how wrongly it can work out.
The color scheme for CircuitStudio is a little different than Altium. Altium is heavy on the yellows and CircuitStudio has a much larger panel with logos. Here they are next to each other:
Circuit studio is new and flashy looking, but who cares? DxDesigner looks like it was designed in 1995 and it still works fine.
I’m starting to get the feeling at this point that Altium is going to be less frustrating for the professional CAD types out there. I don’t look at the toolbar when I’m using Altium, after all, I’ve been using it almost every day for a couple years. Most of my work is done through shortcut keys.
On the other hand I think the designers made a good effort of reducing the confusing user interface features of AD. They appear to have reduced the options (and features) to what they think the price point justifies.
Making a new project
One of the first things I noticed about CircuitStudio is that it doesn’t have Workspaces.
Fortunately you are still able to open more than one project at a time. This would have been a serious limitation. It’s common to have several projects open at the same time. I often have several libraries open at minimum.
The libraries panel is very similar to Altium:
Fortunately CS had no problem loading my existing AD libraries. If you’re like me, you’ve been creating your own part models for years. The sweat equity should not be discounted.
In doing some backup research for this review I noticed that Altium seems to have gone back and forth on features that they would allow in CS. I noticed some people complaining about old Altium libraries not working in CircuitStudio. I can confirm that I opened all of my Altium Designer libraries in CircuitStudio and they worked just fine.
Making a simple board – impressions
Drawing the schematic for this simple design seemed like no big deal. The schematic editor in CS appears to be identical to AD.
One positive for Altium is that their schematic entry is easy to read by default. I use Mentor Graphics software at my day job and it uses that horrible stroke font that is designed for pen plotters. It’s not 1998. Nobody should be using pen plotters!
Anyway I’ve always been reasonably impressed with Altium (and hence CircuitStudio) schematic editor because it’s right there at the top, as good as or better than the most expensive tools.
I took some screenshots of common schematic editor windows so you could see that they’re almost direct copies.
Update PCB / Forward annotation
CircuitStudio has a slightly different feel than Altium Designer. The flow is a bit different but the underlying concepts are the same so I’m hesitant to say the process is fundamentally any different.
The basic flows is:
Draw the schematic
Add a PCB to your project
Update PCB Document (also known as Forward Annotation)
In Altium a lot of the design flow process was spread out over several different menus. CircuitStudio has condensed a lot of this into primary drop-down menus from the UI. It actually stresses me out a little seeing how much functionality from AD is packed into one menu in CS. GenerateOutputs is in the same menu as adding new files. It just seems odd, that’s all!
Inconsequential complaining aside, like I said, a lot of the underlying functionality is nearly identical in AD and CS. For example here is the forward annotation / ECO window in CS:
For those of you playing along at home, you might notice I’m designing a very simple little microcontroller PCB here. After updating the PCB I get the parts on the layout which, no surprise, looks exactly like Altium Designer:
One thing I notice here is that CS does not know about the concept of Rooms. That’s fine with me. They always get in my way anyway. Maybe you like Rooms if you’re designing highly compartmentalized and complicated designs.
I haven’t completely explored the shortcut/hot keys yet, but I have to say I don’t understand why they changed them. In Altium you hit ‘Z’ on the keyboard to bring up the Zoom context menu:
Pressing ‘Z’ in CS does nothing at all. Interesting. I have to remember the illogical keypress Ctrl+PgDn to “zoom all” which is the extremely easy to remember keypress sequence: Z,A in Altium.
The default layer coloring for a board in CS is thus:
Ouch! That’s rough. You’re going to want to know how to change the layer rendering color if you want to have any chance of understanding what’s on what layer. Fortunately it is pretty easy to change layer colors. Right click on any layer tab on the bottom of the PCB editor and select “Layer Colors…”
I can’t find the PCB List panel.
In Altium you can select several components, for example the 4 mounting holes on this board:
And it would allow you to edit properties of all four components in spreadsheet form. It’s a really handy tool. I’m not very happy that it’s missing.
The 3D view still works in CS:
Obviously this stupidly simple design I made here would be easy in any EDA CAD software. I just wanted to get started and show you the “unboxing” and first impressions.
A few questions I plan on answering for my own edification in future posts:
How sophisticated are the PCB rules?
Can I constrain trace impedance?
Can I define differential pairs?
Does the software limit me to through-vias?
What other signal integrity features exist?
What export formats exist?
Can I import DXF to the layout?
Does the push-shove manual router work like it does in Altium Designer?
I will go into more depth in Part 2 when it goes live. I would like to hear feedback from you – what would you like to know? I have access to several different tools so I can compare features. What do you care about?
I was looking for a way of reading a PT100 temperature sensor with a Raspberry Pi. I couldn’t find an inexpensive way of accomplishing this on a hobbyist budget. And to be honest I like to build things so this was how I did it.
Amazon and eBay are full of things like this now. This is a $10 PT100 temperature sensor. I wouldn’t use this for a commercial application but it works just fine and I personally trust it for my beer brewing application.
It’s a three terminal sensor. A PT100 thermistor is just a resistor that varies with temperature. The resistance goes up when the temperature goes up. For a chart, see the wikipedia page.
There are three ways to hook up a thermistor.
Typically you have somewhat long, thin, wires so the resistance is not negligible.
The resistance of a PT100 varies at about 0.38 ohms per degree celsius, so if your wires measure a total of 0.5 ohms, you’re off by over 1 degree. And the thermal coefficient of copper is significant (3.8 Ohm/Ohm/K) so your wire resistance cannot be linearly calibrated out.
The first way is to use two wires.
R1 and R2 represent the two wires leading to the thermistor.
The thermistor (R3) is sensed by measuring the voltage V = V1 – V2
And you calculate R3 by using Ohm’s law, R = V / I
R2 and R1 can be measured but like I talked about, you can’t just calibrate these.
Nobody does this except when the leads are very short. For example if your thermistor is on the PCB with the ADC.
On to method #2:
Three wire thermistor sensing
The 1mA current flows from the positive supply through the wire (R2) through the thermistor (R3) and through the final wire (R1) before reaching the current sink (I1) (and on to ground)
Here I added another wire represented by R4 and terminated at the node V3.
Almost no current will be flowing in or out of V3 – we’re just using it to measure the voltage on the other side of R1.
We can use this extra wire (V3) to measure the voltage drop across resistor R1 because we also know the voltage V2. The voltage drop across R1 is:
V(R1) = (V3-V2)
which also happens to be the same as the voltage drop across R2. The wires are the same size and length (approximately)
V(R2) ≈ (V3-V2)
Now that we have a third wire (V3) we should use this in place of V2 to measure the thermistor. Consider the value (V1-V3). This eliminates the voltage drop due to R1 but it still has the voltage drop due to the 1mA current flowing through R2. Since we already calculated the voltage drop V(R2) we can simply subtract it, giving the voltage across the thermistor Vtherm:
Vtherm = (V1-V3) - V(R2)
Vtherm = (V1-V3)-(V3-V2)
Four wire sensing
Four wire sensing is the easiest but nobody uses it. You need an extra wire.
I added a wire represented by R5 and terminated into node V4 in the above schematic. Measuring the thermistor would be really simple if you have a four wire setup: you just measure V4 and V3 with a voltmeter (or differential ADC). The voltage across the thermistor is (V4-V3).
On to the PCB!
The following board that I’m sharing is free-for-all. It’s not perfect but it worked for me the first time around and I was incredibly surprised. As an engineer you come to expect your designs to be nearly FUBAR on the first try. Actually – I’m being modest; they often work reasonably well. I just stopped being modest. I’m sorry.
Here’s the schematic. Click the image to see a larger view:
This board has two current sinks. Each sinks 1.0mA with a reasonably wide compliance range (TBD).
The current sinks are connected between the EX+ and EX- pins. The ADC inputs are connected across SENSE+ and SENSE-.
The current sink is fixed at 1mA.
The ADC is the Microchip MCP3427. It is a 16 bit I2C converter with an onboard 2.048v reference. It also has a programmable gain amplifier (PGA) that can multiply the analog input by 2, 4, or 8. This allows you to achieve higher dynamic range in the digital domain. The analog inputs are differential so you can measure a differential voltage without adding external op-amps, which is perfect for this application.
Let’s say you want to measure between -50 Celsius and +200 Celsius using a PT100 with a 1 mA current sink. The Wikipedia chart shows that the resistance varies between about 80 and 176 ohms and thus the voltage is 80 mV to 176 mV. Enabling the x8 PGA will multiply these values by 8, giving 640 mV minimum to 1.408 volts maximum.
The voltage is then converted by the 16 bit ADC with 2.048v reference. This gives
0.64 / 2.048 * 2^16 = 20480 LSB for -50 Celsius
1.408 / 2.048 * 2^16 = 45056 LSB for +200 Celsius
This is 24576 LSB over 250 degrees, or about 98 LSB per degree. Or (about) 0.01 degrees per bit. This is completely neglecting linearization issues. I’m just showing you the dynamic range of the signal path.
This design is not ideal for three wire PT100 sensors, but it does work just fine if you don’t have long lead wires. You could use the second ADC channel as the wire compensation channel. Just subtract the wire voltage drop from the primary channel reading.
If you don’t care about the static offset due to one of the PT100 sensor wires, you can use this board as a two-channel device. Just hook up the single red wire to both the EX+ and SENSE+ lines and hook up one blue wire to EX- and the other blue wire to SENSE-.
(The colors could be anything, but there will be one of color ‘A’ and two of color ‘B’)
I made the decision to leave the terminals independent so that you can easily attach a different type of sensor to the ADC.
I just received my Mooshimeter from a kickstarter that I backed a while ago.
The Mooshimeter is a small battery powered multimeter that talks to your smartphone or iPad over Bluetooth LE. Not all devices have BLE so you should check before jumping to buy this.
The bluetooth IC is the CC2540 which is an integrated MCU + bluetooth system. The analog front-end is the ADS1292 dual 24-bit delta-sigma converter. As far as delta-sigma goes, it seems to be a very nice part with a maximum sample rate of 8kHz.
I wanted to try out my new Mooshimeter so I clamped a beam-type load cell to my workbench:
The load cell is a super inexpensive (cheap) beam cell that I bought on Amazon for about $25. A load cell uses a resistive bridge strain gauge to measure the small amount of deflection in a calibrated beam. The deflection follows the strain linearly. Using this relationship you can use a load cell to measure force such as gravity.
Load cells are rated in (volts full scale) per (volt input)
This means if the input is 10 volts (typical maximum) the output of this particular load cell will be 20 millivolts when a force of 5kg (49 Newtons) is applied. This is a difficult value to measure with a multimeter. The Mooshimeter claims 24 bit resolution which should give us plenty of bits even with this small maximum scale of 20 mV.
I hooked up the strain gauge and measured 1.43 mV. This value is a combination of the gravity pulling on the load cell (aka the weight of the load cell) and mismatch in the strain gauge. I didn’t pay much for this load cell so I suppose I can’t expect great performance.
I put a roll of solder on the load cell and measured 2.65 volts. In case you’re unsure: the polarity of the voltage is relative to whether you are pushing or pulling on the load cell. Many are bidirectional (but not all.)
If we subtract the values, the solder weighs 1.22 millivolts. Previously we calculated that the full scale of 5 kg (49 Newtons) is 20 millivolts. So according to my load cell and Mooshimeter, my roll of solder weighs 1.22mV/20mV * 49 N = 2.99 N. This is 0.67 pounds. That sounds pretty good to me. My cheap OXO food scale says 0.675 pounds which corresponds surprisingly well!
The Mooshimeter app will show a graph vs. time of voltage (and current) I made a short video of me pushing on the load cell with my finger to demonstrate this.
I haven’t had a lot of time to play with the Mooshimeter but I think it will definitely show it’s usefulness as time goes by. Of particular interest to me will be long-term data logging which at the time of this writing is a feature that has not been finished.
A class AB MOSFET amplifier circuit is shown below:
The MOSFET, in class-AB operation has a positive DC bias provided by voltage source V1. The purpose of the bias is to bring the transistor into it’s linear operating region, as shown by a datasheet graph of drain current vs. gate voltage:
The graph here begins at about 4 volts. The threshold voltage of the IRF540 (which I’m just using as an example) is somewhere around 4 volts.
Once you get beyond 4 volts, you can see that the drain current increases in a nice sweeping (exponential) arc.
Now imagine you are building a high power class-AB amplifier with V2 = 48v and quiescent current = 60mA. The power dissipated by the transistor is 2.88 Watts.
2.88 Watts will heat the transistor up a bit, depending on how nice your heatsink is. The transistor gate threshold voltage temperature coefficient is between -2 and -4 mV / C (millivolts per degree celsius)
So if the transistor heats up by 10C, the threshold voltage drops by about 30 mV. This could have a significant effect on the quiescent current, causing the transistor to get even hotter!
One way of dealing with this issue is to use a temperature compensated bias circuit:
The device I built this for is an RF power amplifier that uses the MRF6V2010 N channel MOSFET. The threshold voltage is around 2.3v for this device.
The output of the above circuit is fed to a potentiometer that sets the gate bias voltage:
The TL431 is a dirt cheap ($0.14 US) shunt voltage regulator that has a built-in voltage reference, error amplifier, and pass transistor. I used an NTC (negative temperature coefficient) resistor, R38, which increases the feedback voltage on the TL431 as the temperature increases. This causes the output voltage to decrease, following a similar temperature coefficient as the MOSFET threshold.
Because the MOSFET gate passes no current the gate bias voltage supply is only capable of around a milliamp of DC current. The bias voltage leaves the potentiometer (R18, above) where it passes through a few RC networks to filter out RF energy that would add noise to the amplifier (or radiate power.)
I’ve made a few calculations to show how this works in a real design. The threshold voltage of a MOSFET varies by -2 to -4 mV/C as I mentioned above. This depends on the doping level of the device.
Let’s say we’re using this circuit for generating MOSFET bias (click for larger view):
[I lost this image. It is basically the same as the above schematic with TL431, however, the part designators have changed]
Specifically I’m looking at the three resistors on the feedback of the TL431 (R1, R2, R3)
The voltage reference of the TL431 is 2.50v. This fixes the cathode voltage of the TL431 to be:
Vout = 2.5 * (R1+R2+R3)/R3
Looking at the datasheet for a common NTC thermistor with B=~3900 we see a chart of the resistance change vs. temperature. Of course another method would be to use the actual mathematical model in our calculation. The chart is fine for me though. I’m going to be making an estimate which will end up being near the ideal value.
Thermistors are commonly rated by their 25C value. If you buy a 1K NTC thermistor, it should measure about 1K ohms at 25 celsius. This chart shows that for a thermistor with a B value of about 4000, the resistance at 40C for example will be close to 80% of what it is at 25C.
So we can use this knowledge to figure out the temperature coefficient of our bias circuit:
Tempco(PPM) = (V1 – V0) / (T1 – T0) * 10^6
T1 is the higher temperature (pick a value)
T0 is the lower value (use 25C)
V1 = 2.5 * (R1+R2+R3)/R3
Where R2 is the thermistor value at T1
V0 = 2.5 * (R1+R2+R3)/R3
Where R2 is the thermistor value at T0
As an example
T1 = 40c
T0 = 25c
R1 = 3.3k
R2 = 1k NTC thermistor, varies with temperature (40C = ~ 800 ohms, 25C = ~ 1000 ohms)
The value -3333 means that for each degree celsius, the voltage will go down by 3.3 mV. This is near the middle of the range defined by the physics of the MOSFET (-2 to -4 mV / K)
How good does it need to be?
One item I’ve neglected so far is the temperature coefficient of the internal TL431 voltage reference. According to the datasheet for the Fairchild TL431, the temperature coefficient is 4.5 mV over 110 degrees C (the temperature range of the device.) This is a tempco of +41 PPM
Using -4mV/K as an upper limit of our MOSFET threshold voltage and using -3.3mV/K from the last example, adding 41 PPM gives us (close enough to) -3.2mV/K. We subtract these together to get the resulting rate of 0.8mV/K.
We can figure out the bias current change between two temperatures given the transconductance of the MOSFET. The IRF510 has a transconductance of about 1.2 Siemens (amps per volt.)
Using the same example temperatures of 25C and 40C, we can see that the gate bias voltage will change by:
Vdelta = 0.8mV/K * (40C-25C) = 12 mV
The bias will change by about:
12mV * 1.2 A/V = 14mA
That’s not necessarily bad but it’s not great. One way to make this adjustable would be to add a potentiometer in parallel with R2. Decreasing the value of the pot will decrease the bias circuit tempco, increasing the pot value will increase the bias circuit tempco. This is exactly what I did in the above tempco schematic. Pot R37 changes the tempco adjustment slope. Experiments show excellent slope control capability.
The MMBT5179 is a cheap NPN bipolar junction transistor designed for radio frequency applications. I designed this super simple 1″ square board to test the performance of this transistor.
I personally intend to use this part in the HF range from 10 – 30 MHz. Due to this being a two layer board I was unable to make the trace impedance 50 ohms. The traces would need to be >100 mils wide. However, the traces are extremely short with this being such a small PCB.
As configured, the bias current should be about 11 mA. Intended supply voltage is 5.
Simulation shows gain of +20dB at 20 MHz. We’ll see!
This PCB is shared on OSH Park. It’ll cost about $5 for three copies.
I started this design 2 years ago using the Hittite HMC474 MMIC. That part has since been discontinued so I redesigned the board.
Originally I wanted a GPS preamplifier. Another project of mine is to build a GPS receiver. But there’s nothing specific about this design that limits it to 1575 MHz. The MMIC and biasing circuitry will allow this to work from VHF to probably around 3 GHz. I haven’t tested the range yet.
I designed a new photodiode amplifier. Click on the image for a larger view:
And an associated printed circuit board:
The printed circuit board is available to purchase from OSH Park if you like.
I will update this post after I receive the PCB and test the circuit.
The first part of the schematic is the power supply. VIN is +15V.
The L78L12 supplies regulated +12V to bias the photodiode. The RLC lumped element filter that follows ensures a low noise voltage source for the photodiode bias.
The filter quickly drops below the noise floor above a couple MHz. This is theoretical. Actual performance won’t be quite as nice.
The 47 Ohm resistors thrown into the filter will not measurably affect the photodiode response. The DC power will be no more than a few milliwatts maximum.
The AC power will probably be below the microwatt level, I’ll guess around -40dBm. Again, I’ll update this when I have some results.
The next section I’ll talk about is the photodiode itself and the amplifier.
The photodiode is an OPF432. It comes in a handy package that has an ST style fiber optic connector so you don’t have to have any bulky external mechanical parts to couple light into the diode.
The photodiode is reverse biased at +12V. According to the datasheet this should provide a rise time of about 8 microseconds. I believe this refers to the time constant. The datasheet claims this part can be used up to 100 MHz which is a period of 10ns.
The signal rises in half the period which is 5ns. If the datasheet rise time is accurate at 8 microseconds, I believe the AC output amplitude (peak) of a 100 MHz modulation will be:
Current = (5ns/8us)*50A/W = .03125 A/W
A/W is amps per watt of input power. In my application the input amplitude may be approximately 10uW. Multiplying:
31.25mA/W * 10uW = 312.5nW
This sounds very low, but let’s convert to units of dBm (decibel milliwatts):
P = 10*log10(312.5nW)+30 = -35 dBm
The GALI-74 is an MMIC that conveniently provides a 50-ohm matched input and output with +25dB of gain from low frequencies up to well above the design goal of 100 MHz.
The output will be at about -10 dBm which corresponds to an amplitude of approximately 70 millivolts into a 50 ohm load.
The final section of the schematic provides a low pass filtered output which indicates the DC amplitude of the incoming light.