marți, 15 noiembrie 2016

How to layout a PCB for an instrumentation amplifier

INAs are used in applications that require the amplification of a differential voltage, such as when measuring the voltage across a shunt resistor in a high-side current-sensing application. Figure 1 shows the schematic of a typical single-supply high-side current-sensing circuit.

Fig.1

In Figure 1, a differential voltage is measured across RSHUNT, with R1, R2, C1, C2, and C3 providing input common-mode and differential-mode filtering. R3 and C4 provide output filtering for the INA, U1. U2 buffers the reference pin of the INA. R4 and C5 form a low pass filter that minimizes noise that the op amp introduces to the reference pin of the INA.

While the layout for the schematic in Figure 1 seems straightforward, it is easy to make mistakes in the PCB layout that might degrade circuit performance. Figure 2 shows a PCB layout with three mistakes we at TI commonly see when reviewing INA layouts.


Fig.2

The first mistake is how the differential voltage is measured across the resistor, Rshunt. Notice that the trace from Rshunt to R2 is much shorter, and therefore has less resistance than the trace from Rshunt to R1. This difference in trace impedance may create a differential voltage at the input of U1 due to the input bias current of the INA. Since an INA’s job is to amplify a differential voltage, having unbalanced traces at the input can cause an error. Therefore, keep the input traces of an INA as balanced and as short as possible.

The second mistake is related to the gain-setting resistor of the INA, Rgain. The traces from the pins of U1 to the pads of Rgain are longer than necessary, which create additional resistance and capacitance. Having additional resistance may introduce error in the desired gain of the INA, since the gain depends on the resistance between the INA’s gain-setting pins, pins 1 and 8. Additional capacitance may cause stability issues because the gain-setting pins of the INA connect to the feedback node inside the INA. Therefore, keep the traces connected to the gain-setting resistor as short as possible.

Finally, the positioning of the reference pin buffer circuit may need improving. The reference pin buffer circuit is positioned far from the reference pin, which increases the resistance connected to the reference pin and opens up the possibility for noise and other signals to couple onto the trace. Additional resistance on the reference pin will degrade the high common-mode rejection ratio (CMRR) that most INAs provide. Therefore, position the reference pin buffer circuit as close to the reference pin of the INA as possible.

Figure 3 shows a layout that corrects these three mistakes.


Fig.3

In Figure 3, you can see that the traces from the shunt resistor to R1 and R2 are equal lengths and have a kelvin connection. The traces from the gain-setting resistor to the pins of the INA are as short as possible, and the reference buffer circuit is as close to the reference pin as possible.


The next time you lay out a PCB for an INA, be sure to follow these guidelines:
  • Keep all traces on the input perfectly balanced.
  • Reduce trace length and minimize capacitance on the gain-setting pins.
  • Position the reference buffer circuit as close to the reference pin of the INA.
  • Place decoupling capacitors as close to the supply pins as possible.
  • Pour at least one solid ground plane.
  • Do not sacrifice good layout to label a component with silkscreen.

luni, 7 noiembrie 2016

Which Domain Extension Should I Use? .Com .Net .Org .Info or .Us

So…which domain name extension should you use? .COM, .NET, .ORG, .INFO or .US? The answer depends on your business model. If you want to learn more about these extensions (and their ability to rank on Search Engines), read on.



.COM Domains, History and Ranking

You should always pick the .COM before any other extension. This is because .coms have become the industry standard for domain names. Whenever you hear someone start saying www…you naturally expect a .COM at the end. It also ranks best because, in the beginning (1985), .COM was created to represent commercial usage. Since businesses naturally embraced the domain extension, it’s presence and familiarity took off. This large presence of .com domains helped establish its reputation forever on the Internet.

.COM domains rank easily and quickly. I always pick .COM domains whenever possible. I even prefer a long .COM to a short .NET or .ORG. More examples are given near the end.

.NET Domains, History and Ranking

This domain is .com’s ugly brother. The .NET extension is an abbreviated version of the word ‘network’. The .NET domain was created in 1985 and originally intended to be used by network providers such as Internet service providers. Unfortunately, this domain name never really took off. Yes, companies like Comcast.net (internet service provider) used it…but consumers didn’t care much for it. As a result, .NET became the default 2nd choice if a .COM wasn’t available.

It is difficult to rank a .NET domain. You’ll need much more time and incoming links (backlinks) to start ranking properly. If you’re planning on building out a large business with lots of great content, .NET is a good choice. If you’re building small niche sites and are hungry for fast rankings….stay far away.

.ORG Domains, History and Ranking

The .ORG (organization) domain is a generic top-level domain and was one of the original top level domains that was introduced in January 1985. Anyone can register a .ORG domain; there are no requirements for registration. The .ORG TLD is usually associated with non-profit organizations, charities and open-source programs. In addition, many political parties also use the .ORG  extension.

Now that you know it’s history, it’s easy to understand why a .ORG domain ranks as well as a .COM. Yes…I’m serious. they both rank quickly and easily. So if you’re looking for quick ranking, .COM and .ORG are your best bets.


.INFO Domains, History and Ranking

The .INFO is meant to be an informational domain, to be used for sharing information. Unfortunately, GoDaddy completely destroyed the domain’s purpose (and it’s ranking ability) with hundreds of $0.99 domain specials between 2006-2008. The result? Nearly every spammer and affiliate marketer started buying $0.99 .INFO domains in bulk to create top-level domain redirects for articles, spam and autoblogs. Google quickly took notice and penalized the domain heavily. If you purchase a .INFO domain, you can expect significant frustration trying to rank (even with backlinks). Google simply hates this TLD. Stay far away. Only use this as a “throw away” domain you don’t plan to develop. For example, if you’re advertising in someone’s paid newsletter and don’t want your original website being flagged as spam, use a .INFO domain redirect to protect your original site’s URL.

.US Domains, History and Ranking

This domain was created for US based individuals, companies and websites. You must be a US citizen, a permanent United States resident, or a US entity such as organizations and corporations. Additionally, any business or corporation with a bona fide presence in the USA may register. Lastly, you cannot WHOIS protect a .US domain which makes it a deal breaker for almost everyone.

You would think these strict, exclusive requirements would improve ranking, right? Wrong. I personally bought a .US domain and waited for months in order to achieve ranking. I watched junkier .NET and .INFO outrank my articles day after day. I finally gave up and retired my .US domain name in favor of a .COM. Needless to say, traffic and ranking immediately shot up after creating my suitable 301 redirects and getting indexed.

.US? Never again. Not recommended for anything or anyone. It’s high price and restrictions don’t allow the “throw away” usage recommended for .INFO domains, either.

.LY .SY .TV and Other Country Domains Are Risky! Do Not Buy Them!

I’m updating this post to include a warning about .LY and other vanity domain names that belong to foreign countries. For example, .LY belongs to Libya and in the past, the registrar has been shut down due to wars within Libya. In 2011, this resulted in the company Letter.ly getting shut down because their domain expired during that shutdown and the domain was quickly snatched up by another company when they returned. These foreign-based registrars do not abide by US law and are extremely risky to purchase.  For the record, .SY belongs to Syria and .TV belongs to the Tuvalu Islands, a series of nine slivers of earth in the middle of the South Pacific, with a population of about 10,000. Buy these extensions at your own risk.

Conclusion


So why do some domains rank better than others? Here’s my theory after 200+ domains and 15+ years of experience.


#1 Pick for SEO Ranking: .COM

Firstly, people trust .COM domains. Google recognizes this and allows this “trust” to continue unaffected. As the most popular, .COM always wins in terms of ranking and recognition. This is always my first pick. I never use hyphens. Google stopped liking hyphens a while ago.


#2 Pick for SEO Ranking: .ORG

This is only my 2nd pick for online marketing and SEO ranking purposes (see Important Note below)

.ORG was always meant to communicate to people…with charities and non-profit groups. As such, .ORG immediately carries trust and respect. This makes .ORG is my 2nd pick…even for extremely commercial properties. I know it goes against the original idea behind the domain…but my sales aren’t lying. People don’t care. It was intended for non-profits…but people just don’t care. They’ll visit and buy from .ORG domains in a pinch. There is nothing unethical about using a .ORG domain for a commercial website.

Important Note: If you’re running an offline or semi-offline business, get .COM or .NET. Telling people you run a commercial .ORG over the phone kills integrity. In these cases, slow ranking are preferred to integrity-killing conversations and business cards.


#3 Pick for SEO Ranking: .NET

.NET was never intended to be commercial. As such, it’s an awkward domain to communicate to people. This awkwardness carries over in it’s ability to rank. I pick .NET domains as my dead last 3rd choice regarding SEO ranking. To be honest, though, I can’t remember the last time I bought one. These days it’s all .COM and .ORG. However, if I’m creating an offline business that includes phone calls or business cards, I will pick .NET before .ORG. for the purpose of retaining integrity. Offline businesses truly expect .ORG domains to be non-profit.

Source: jesusp.com

marți, 25 octombrie 2016

Light-sensitive fire alarm

Circuit diagram of the light-sensitive fire alarm is shown in Fig. 1. It is built around L14F1 photo transistor (T1), BC547 transistor (T2) and NE555 timer (IC1).



T1 can sense both infrared and visible light. NE555 based a stable multi vibrator is used for audible warning. Resistors R3 and R4 and capacitor C1 decide the frequency. Here, frequency is around 272Hz, which can be changed by changing values of R3, R4 or C1.



When T1 senses light, T2 stops conducting. As a result, reset pin 4 of IC1 is held high. This makes the multivibrator to function and an alarm to sound in loudspeaker LS1.

An actual-size, single-side PCB of the light-sensitive fire alarm is shown in Fig. 2 and its component layout in Fig. 3. After assembling the circuit on a PCB, enclose it in a suitable plastic case.




Make a small hole in the plastic case for the photo transistor (L14F1) so that fire flame is detected/sensed easily through it. T1 sensor should not face directly towards normal light sources like sunlight, bulbs or tubelights to avoid a false alarm.

The circuit works off a 9V battery.




Build your own programmable power supply with TL431

TL431 and LM431 are relatively low-noise, stable and low-cost shunt regulators. These can be used to build all sorts of power supplies including programmable power supplies, advantages of which are enormous. You can program the output voltage with simple switches. You can also program the output voltage with digital codes coming from a microcontroller (MCU) or from the printer port of a PC. You can adjust any output voltage individually with resistors or trimmer potentiometers to the required values.

This article presents a programmable power supply built around TL431 (IC1) and two bipolar transistors BD139 and TIP31 (T1 and T2).

The circuit also includes an inverter 7406 (IC2), nine diodes 1N4007 (D1 through D9), a 12V regulator 7812 (IC3), a 5V regulator 7805 (IC4) and a few other components.

Using this circuit you can obtain around 18V, 2A unregulated output and 3V to 15V, 1A variable regulated power supply based on digitally programmable input as shown in Table I. You can also obtain around 12V and 5V, 1A regulated output across connectors CON3 and CON4, respectively.


Circuit diagram of the programmable power supply is shown in Fig. 1. The mains power supply is applied to transformer X1, which is stepped down to 18V AC, 2A and is given to bridge rectifier BR1. Fuse F1, resistor R15 and capacitor C14 protect X1 from external surge voltage. C6 is the main filtering capacitor, which should be at least 2200µF.




Voltage produced by TL431 is adjusted with potentiometers VRx (VR1 through VR6) and can be calculated with the simplified formula given below:


Vout = 2.5V×(1+R12/(R13+VRx))

The maximum output voltage (Voutmax) is thus calculated as:


Voutmax = 2.5V×(1+10k/2k) = 2.5V×6 = 15V

Because in this case we have R12 = 10-kilo-ohm and R13 = 2-kilo-ohm. The minimum output voltage (Voutmin) is calculated as:


Voutmin = 2.5V×(1+10k/(2k+47k) = 2.5V×1.2=3V

Because in this case we have R12 = 10-kilo-ohm, R13 = 2-kilo-ohm and VRx = 47-kilo-ohm.

Table 1 shows how output voltages can be set with digital codes C0 through C5.

Maximum output current is set with switches S1, S2 and S3 as shown in Table 2.




An actual-size, single-side PCB for the programmable power supply is shown in Fig. 2 and its component layout in Fig. 3. After assembling all components, enclose the PCB in a box such that 230V AC mains can be connected to the circuit easily. CON2, CON3 and CON4 can be mounted on the rear side of the cabinet. J1 through J3 shown in the PCB are simply jumper wires. Fix VR1 through VR6 on the front panel for setting output voltages.




Verify the test points given in Table III before using the circuit. After completing the circuit, connect CON5 to the MCU or printer port of the PC for setting various output voltages.
T1 and T2 should be put on a common heat-sink with thermal reliance below 2°C/W.



Maximum power dissipation of T2 can go up to 30W if we have minimum output voltage of 2.5V and maximum output current of 2A.




We can replace T1 and T2 with a power Darlington transistor with power dissipation of at least 75W. Size of the heat-sink will be reduced significantly if we use 12V cooling fan connected to the output of the auxiliary voltage regulator 7812.

Regulators 7812 and 7805 should be mounted on heat-sinks with thermal resistance below 20°C/W. Also, we can set maximum output current using a combination of three open and closed switches S1, S2 and S3.

Before using the circuit, set supply voltage around 18V-20V from a DC source with short-circuit protection. Use VR1 and set output voltage to any appropriate voltage, for example, 12V. Now, use VR2 and set another output voltage, say, 10.8V.

Similarly, use the remaining potentiometers for required output voltages. Set the output current-limiting function by connecting S1, S2 and S3 by referring to Table II. Programmed output voltage is available at CON2.

Source: electronicsforu.com

Dimming LCD Backlight

Presented here is an LCD power-saving backlight-control circuit. An LCD is used in many projects for indication or information display since it consumes less power and, hence, saves energy. But power consumption in an LCD backlight draws a lot of attention.

Pin diagram of a 16×2 alphanumeric LCD is shown in Fig. below:




Pins 15 and 16 are internally connected to the backlight LED. Normally, backlight LED+ is connected to +5V supply via a current-limiting resistor (it is not included in the circuit here for simplicity). But this LED stays on, all the time. So if you want to dim it, you need a solution so that during day time, or when ambient light is enough to make the LCD characters visible, the backlight gets dimmed and energy can be saved. For this, we have two options: one is microcontroller (MCU) based and the other is discrete-component based.

Circuit using an LCD is generally driven by an MCU. If the MCU has capture-compare pulse (CCP) width modulation module, our task becomes very easy. One such solution using a transistor is shown in the next figure. 




Here, CCP pin needs to be connected to the base resistor so that the LED can be dimmed. Then, we can use a light-dependent resistor (LDR) to sense the ambient light and command the MCU to dim the backlight accordingly.

If CCP pin is busy, or the MCU does not have a CCP pin, then an alternative circuit shown in the figure below will ensure that the backlight is dimmed accordingly.



Note that control pin 5 is not grounded through a capacitor in the usual way, but is connected to a voltage-divider network formed by resistor R5 and VR1. This configuration makes it work as a pulse width modulator, which changes the width of output pulse at pin 3 based on the voltage at pin 5.

Potmeter VR1 can be replaced with an LDR so that the LCD automatically gets dimmed during day time. At night, or when ambient light is less, backlight intensity (current) increases. Since LDR resistance changes as per ambient light, voltage at pin 5 of NE555 also varies accordingly. This variation in voltage at pin 5 changes the duty cycle of the output waveform, giving higher duty cycle when ambient light is not present, and vice versa. In this way it can be used to dim the LCD backlight for power saving.

Source: electronicsforyou.com