BIPEDU

my ideas in action

Category Archives: Uncategorized

use PAC file for automatic proxy selection

I will explain how to use automatic proxy selection for a local network.

For example let’s say that you have a proxy server but that proxy is not available all time. In this case the you need to find each time if the proxy is alive (available) and if yes to use it. If not then browser will select direct connection.

The easiest way to use it is to create a PAC file and to add it in the Firefox as automatic proxy selection.

Go to Preferences–>Advanced –> Network –>Settings and choose “Automatic proxy configuration URL”

Then type there the path to a local PAC file. Normally there should be a web page address but if the file is locals works also ( no web server needed)

FFsettings

To create the PAC file use any text editor and create a file called “autoproxy.pac” and put this content:

function FindProxyForURL(url, host)
{
return “PROXY 192.168.1.29:3128; DIRECT”;
}

The Proxy in this case is on local network at 192.168.1.29 (Squid Proxy on port 3128) and Firefox try to use it first . In case it is not responding it will use direct connection.

You can set there multiple proxy servers. The order is important.

In the example below you can have two proxies. If the first one (192.168.1.29) is not responding then the second one (192.168.1.42) will be selected, and if the second one also do not respond the direct network connection will be used.

function FindProxyForURL(url, host)
{
return “PROXY 192.168.1.29:3128; PROXY 192.168.1.42:3128; DIRECT”;
}

The name of the PAC file is not important ( “autoproxy.pac” is name used by me), any name will do.

More details regarding the PAC file , examples, more advanced functions can be found here : http://findproxyforurl.com/

 

 

 

Advertisements

Lab power supply with PIC microcontroller (3)

I have some updates regarding my project.

First of all, I have a limited time to work on this project. So it is normal to take such long time to develop it.

Second I do not want to jump too fast in “making” phase and I prefer to go slowly step by step to get a good result.

So, I was worried about the stability of my previous schematic. So after a few hours on spice simulation I understand what was the problem. Well, the main issue is that the voltage loop contained 3 low frequency poles.

One is the opamp itself that has a dominant pole at ~10Hz ( see MCP6022 spec), this cannot be avoided since any opamp will have a pole approx in this range.

The second is the output node. The main issue with this pole is that is moving with the load ( R and C) and since this is a lab power supply it will always be different.So what I decided to do is to use a small output capacitance of 1-10uF and to use a dummy load of approx 10mA. This will force the output NPN ( 2N3055) to have a minimum current even if there is no load. The main reason is that when the current is very small in the 2N3055 transistor the predriver ( BC139) will have almost no current. So the gain drops dramatically and the loop become unstable.

The other pole is at the gate of the predriver NPN . this is a “design” fault since the internal node should not affect the functionality.

So I decided to change the loop architecture and to use a intermediate amplifier with of gain of approx 5. The intermediate amplifier is made with Q4 and Q9 and the gain ratio is set by R24+R9 and R18. I chooses a gain of 5 since this gives me a opamp output voltage range between 1.3V and 4.5V for a output voltage of 0 to 21V.  Also this intermediate opamp has a high poles and do not require any compensation. Also since the gain of the amplifier set the voltage range at the output of the opamp this give me the ability to use a non Rain-to-rail output OPA. But I will keep the MCP6022 since the offset is very low and the input is rail-to-rail.

The other changes are the fact that I eliminated the resistor to SUP24V that was feeding the base of the predriver NPN.  Also I swap the opamp inputs ( intermediate amplifier has positive polarity) and I added a 100-330nF capacitor over the opamp. This compensation capacitor is necessary since I noticed that the loop may become unstable in certain conditions ( when load is changing). I need such a small value ( in the hundreds range) since the opamp will amplify the effect of this capacity  ( miller effect) and the pole generated is very low.

So the new version of the schematic is here : LabPicPowerSupply_v3_SCH

There are other minor changes :

  • removed reset PIC switch
  • removed capacitors from DAC output
  • changed the positions of some PIC  IO’s
  • added protection for the input of the opamps that measure the load current ( anti-parallel diodes)
  • added the buffer before ADC voltage measurement ( VMON). before this buffer was inside the voltage loop.
  • the ILIM protection is made by changing the voltage reference ( output of the DAC)
  • small changes in the components value
  • not use the MJ3001

I made a real test of this new architecture . I used a simple breadboard and I noticed that the stability is OK . I did not had a full test under all conditions since the 2N3055 was not on the heatsink but even like that it was capable to deliver 1A at 18V output for few seconds, this means 18W !!. I  had to stop it after few seconds since the 2N3055 became too hot.

The dummy output load I made it with the BF254B device. It was the easiest and I had laying around some devices. It can be made is many different ways but in my case I do not need accuracy.

There are some aspects that I noticed also. The predriver transistor BD139 can dissipate some power. This depend on the gain current (Hfe) of the 2N3055. My transistor had a gain of 35 at Ic=1mA so this means that trough BD139 will flow approx 30mA in the worst case. If this is happening when the output voltage is at 0V ( hard short of the lab supply terminals) then this means that the predriver will dissipate 30mA*24V =  0.72W. It may not seem too much but the datasheet show that this can bring the BD139 temperature to  ~75degC above the air temperature. If the air surrounding the device is at 30C this give a junction temperature of 100C. It is high for my taste !!! so a heatsink is mandatory !

The other issue that I noted is that 5V regulator also need a heatsink. The current consumed may reach 50mA and the power dissipated can be 1W. In this conditions LM7805 can go to 65C above the air temperature. And this is continuous and not a “error condition” like in the case of BD139. So a heatsink is really necessary. Some may argue that is not bad to use them without heatsink since this is a tolerable temperature and many Chinese manufacturers do it… well it is my design and I do not want to risk.

I made also a layout tentative.  It was not easy but at least I have a workable PCB. I still need to double-check the connection of each device to be sure that it is the correct package and the footprint is matching the actual component that I have. I hope to finish this step soon so that I can start the real manufacturing of the PCB and then component soldering.

Here are all the files for version 3  (KICAD schematic and PCB)

schematic : LabPicPowerSupply_v3_SCH

BOM list : LabPicPowerSupply_v3_BOM

PCB layout : LabPicSupply_v3_PCB

minciuna

Mă uitam azi la TV și mi-am dat seama că de fapt CNA-ul ar trebui să forțeze televiziunile să schimbe modul de prezentare al emisiunilor.

De exemplu se spune : Genul programului : divertisment.

Mai corect ar fi să se spună : Genul programului : tâmpenie.

Opțional CNA ar putea oferi televiziunilor o listă de opțiuni. Și în funcție de program să se aleagă.

Ca exemplu dau următoarea listă:

 

Antena 1:

X factor = vise deșarte, prostituție

Burlăcița, Next Top Model : prostituție

Observator : manipulare

Access Direct : brainwash (spălare pe creier)

În gura presei : Limbi la fundul lui Felix sau lătratul de unul singur.

Un show păcătos : prostie în formă concentrată

 

Antena 3:

Sinteza zilei: Limbi la fundul lui Felix

Subiectiv : Limbi la fundul lui Felix sau brainwash (spălare pe creier)

celelalte emisiuni : Limbi la fundul lui Felix sau brainwash (spălare pe creier)

Antena 3 e un caz mai special. Ar trebui sa existe o atenționare publică în momentul în care comuți pe A3 . Nu mai are rost să faci avertizare la fiecare emisiune…

 

TVR:

Jurnal : comandă politică ( de fapt profilul se schimbă în functie de partidul care a numit consiliul de administrație)

 

Pro TV:

Serviciul Român de Comedie : Bășcălie de prost gust.

Dansez pentru tine : brainwash (spălare pe creier)

Horoscop : Credințe păgâne, vrajitorie

Pro Motor: Fetele și mașinile pe cere nu ți le permiți

Vremea : timp pierdut.

Apropo TV : Bârfă cu târfe

Românii au talent : exibiționismul idioților

Master Chef: Boi la masă

Stirile ProTV : timp pierdut.

 

Prima TV:

Vreau să divorțez : cum să ne distrugem viața

Fete Bune : labă

Verde-n Față : timp pierdut.

M-a făcut mama artist : acvariul cu tâmpiți.

Cronica cârcotașilor : Bârfe cu târfe

Mondenii: Cretini noi și vechi

Miss fata de la țară : pregătirea pentru prostituție ( de la astfel de show-uri se recruteaza viitoarele prostituate pentru export)

Schimb de mame : swing ( cine nu știe ce-i aia să caute cu Google/Wikipedia)

Casa : teleshopping

Focus : timp pierdut

cu restul nici nu are rost să-mi bat capul.

 

B1 TV

Sub semnul întrebării: nu mă minți !

La taifas cu Ion Cristoiu : dacă ești prost nu te uita.

Lumea lui Banciu : lătratul de unul singur.

restul emisiunilor sunt pentru umplerea grilei așa că n-are rost să-mi bat capul cu ele.

 

OTV : trebuie o etichetă pentru toată televiziunea : vomă !

 

Realitatea TV: trebuie o etichetă pentru toată televiziunea : Limbi la fundul lui Felix si Vântu !

 

 

Hello world!

Welcome to WordPress.com! This is your very first post. Click the Edit link to modify or delete it, or start a new post. If you like, use this post to tell readers why you started this blog and what you plan to do with it.

Happy blogging!