1 Overview
This design is to complete a heartbeat voltage capture circuit similar to an electrocardiogram recorder, and verify the impact of capacitor selection on this circuit. According to the micro-voltage level signal, at least 24-bit acquisition accuracy is required, or usually a two-stage op amp is used to increase the sampling voltage. Two-stage amplification can guarantee the amplification factor, but the filtering and anti-interference circuit design is complicated. Therefore, it is best to choose a high-precision instrument amplifier to directly solve the problem.
ADI AD8424 is a high-precision current amplifier. Although domestic substitution has been ongoing, the design and production of analog chips requires time accumulation and experience verification. ADI's analog is undoubtedly the first array of analog chips.
This post was written by hand, and ADI also provides such conditions, from chip selection to analog design software, which greatly reduces the technical difficulty of developers, improves efficiency, and ensures quality. A small point that has nothing to do with design is that, in fact, the worst thing about domestic substitution is to kneel down completely and break the backbone, but what is even worse is to replace completely and cut off people's financial resources. In fact, the world is still quite big, and win-win cooperation and making money together is the lasting way. ADI has leading technology, guaranteed supply, and reasonable prices. What's wrong with having many friends?
This is the final circuit design.
The PCB circuit design diagram is as follows.
2 Use ADI's auxiliary tools to simulate the AD8428 Instrumentation Amplifier design
2.1 Using ADIsim Software
Regardless of whether the analog design software is easy to use or not, it is very fun to use. ADIsim is a very user-friendly simulation tool that is easy to use and free. AD8428 was still a new product when I designed it, so it was not in this design library. I needed to download the SPICE file first and then import it. The SPICE file is in TXT format, and you can directly customize the editing functions and settings. Of course, you must first truly understand and be familiar with this new product.
Using the design diagram of ADIsim,
The result of functional simulation. Although the basic functions are effective, it is not ideal, so I gave up later because there are better substitutes.
2.2 LTspice
LTspice is Linear's flagship product, which is called Lingte in Chinese. It has disappeared because it was acquired by ADI. Therefore, any ADI product starting with LT is from Linear, and LTspice is the top product that matches and surpasses ADIsim. I strongly suspect that the reason why Linear was acquired is because it had the sharp blade LTspice in mind, which led to the loss of its virginity. Compared with products starting with AD, everyone knows that products starting with LT focus on cost-effectiveness, which is actually very competitive. It was acquired at a high price, and it should be the result of mutual affection. Because, for LTspice, ADI's full series is also officially supported. Of course, it is still necessary to import spice now.
2.2.1 Schematic Design
AD8428 was obtained based on ADI sample application, but the process is very complicated. There is only one, model AD8428ARZ. This thing is a good thing and worth coveting.
Look at the silk screen under the amplifier.
Because there is a manual throughout the process, and the official design reference diagram is provided. This schematic diagram looks very simple, but in fact, the common mode and differential mode parameters are extremely powerful. Because there are masterpieces such as "Hello Amplifier" specifically for this, I will not repeat the text here, saving thousands of words.
To convert it into a circuit design suitable for simulation operation, you need to add a complementary voltage source as the input signal. In LTspice, this parameter can be perfectly modified and even programmed into a specific waveform, such as square wave, triangle wave, sine wave, whatever you want.
The results of performing a transient simulation are as follows, corresponding to a 1.8 millisecond pulse, and this is what it looks like.
This schematic can also export the BOM component list.
The parameters of these components can be adjusted and changed arbitrarily, and multiple tests can be repeated to select the most appropriate matching parameters.
2.2.2 The change and adaptation of capacitors have the greatest impact on performance. The ESR has the greatest impact, which is extremely beneficial for smoothing, filtering and decoupling. The equivalent circuit of capacitors in the usual sense is as follows:
For different input frequencies, the frequency responses of ESR and equivalent impedance Z are as follows, and the optimal value is obtained at the characteristic frequency.
2.2.3 Keep changing the capacitance value above.
C5, C7 = 10uF
C2, C3 = 4.7uF,
C1 = 4.7uF, about 10 times that of C2 and C3
C4, C6 = 0.1uF MLCC,
The steady-state simulation results are as follows
The parameters corresponding to the capacitor can be adjusted at any time, such as adjusting the ESR value of C5 and replacing it with the final selected capacitor parameter of 0.06 ohm.
Other simulations such as transient simulation, AC swing simulation, etc. can be completed with one click. Below are some screenshots of the game process.
This is much more fun than plugging blocks on a breadboard, and it also allows you to re-understand some of the regularities that the teacher taught you. The only thing missing is the happy barbecue scene of exploding capacitors and burning resistors.
3. Pattern making and design
3.1 At this time, the design was done using https://easyeda.com/ , which eventually changed its name, but the current domestic name is Lichuangeda, and the overseas version remains unchanged. The circuit principle design is as follows
Producing PCB
Lazy autorouting,
3D Demo
3.2 Of course, this is not possible. You still need to re-layout and select BOM and choose the appropriate capacitor
This is the final version
And the final PCB
Output BOM
Print it
4. Rub the PCB by hand
4.1 This PCB is a bit too simple, so I ordered a 6-piece set of hand-kneading, including UV lithography. The accuracy of this hand-kneading lithography is at the millimeter level, which is more than enough to make independent diodes, but it may take 200 years to make 5G chips.
Finally, I continued to lower it. I didn't even want to use photolithography. I just rubbed the double-sided board by hand, using a carving knife, an oil pen, and an environmentally friendly etching agent, sodium sulfide oxide, Na 2 S 2 O 8 +Cu=Na 2 SO 4 +CuSO 4
This is a real hand-drawn picture. The PCB design is printed on white paper, and then the lines are engraved with a knife, and then traced with an oil pen, so there are pads and broken wires. However, it doesn’t matter. It doesn’t matter if your hands shake a little. Even a ruler is useless. Just use the painting skills you learned in elementary school. There should be no problem with the back being completely black.
.
Here is a two-color
Dissolve the etchant, about 10 minutes.
Doesn't look good.
Then continue until it turns light blue, and finally
Completed.
Finally, to remove oily pen marks, you can usually use a detergent that can remove oil.
Of course, great force can work wonders, and sandpaper can also be used.
The difficulty of manual welding is basically zero, and the aesthetic level is also basically zero.
I need to add that after this incident, especially after a certain Li Chuang’s preferential board-making service was launched, due to the large psychological shadow area, I would rather pay for board-making than do it manually.
5 Reading with Arduino
5.1 I choose Arduino MKR 1000 to read ADC parameters, because AD8428 has been amplified to a readable accuracy, so the second-stage amplifier is actually implemented by a 12-bit precision ADC, which is easily handled by most MCUs. It can read up to 4096 data and perform corresponding conversion between 0~3.3V data.
Reference Code
const int analogInPin = A0; // Analog input pin that the potentiometer is attached to
const int analogOutPin = 9; // Analog output pin that the LED is attached to
int sensorValue = 0; // value read from the pot
int outputValue = 0; // value output to the PWM (analog out)
void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(115200);
}
void loop() {
sensorValue = analogRead(analogInPin);
// map it to the range of the analog out:
outputValue = map(sensorValue, 0, 1023, 0, 255);
// change the analog out value:
//Serial.print("sensor = ");
Serial.print(sensorValue);
// wait 2 milliseconds before the next loop for the analog-to-digital
// converter to settle after the last reading:
delay(2);
}
5.2 Use two 9V batteries to provide differential voltage power so that the input can be connected to the ECG patch reading.
Use Serial Hunter 115200-N-8-1 to read the readings and change the sampling period. Here 1kHz is selected. The data can be exported to a txt file for further processing.
6 AD8428 Principle and Configuration
6.1 The internal logic diagram of AD8428 is as follows. There are three amplification configuration modes:
6.2 The differential input mode is shown in the figure below, and the amplification factor calculation formula is as follows. It can be seen that the amplification factor can be selected by changing the data of CD and CC .
This post mainly introduces how to use the tool to complete the design and board design of an ADI amplifier. More technical details and principles can be obtained in various open data of ADI. Compared with the high performance of this chip, although this method can complete the task, the quality is still poor. Therefore, I stopped doing it this way later, but I became addicted to the process of using LTspice. I want to import any schematic diagram into spice for simulation.