Simple light barrier – Part 2

Currently, until August, I’m writing on my Bachelor thesis, so I have not much spare time for researching and writing blog posts.

I tested out my light barrier circuit as described in Simple light barrier ā€“ Part 1, but it did not work. The LED I used to inidicate the signal was always off. So I will have to rework it and then I will post another part of this series.

Simple light barrier – Part 1

For a project I’m currently working on I need a light barrier. For maximum efficiency the light barrier should have a high resistance in idle state and in triggered state it should have a low resistance, because it will be most time in idle state. There were some building kits for light barriers in my favourite electronic shop, but they need too much space for my project so I need something more compact. Another point is that they use relays for switching which are too sluggish for my application, need too much electrical power and are too expensive for me because I need many of them. So I decided to design it own my own:

Lichtschranke (bei Dunkelheit leitend)

In Idle state, the light, emitted by the LED is being catched by the photo diode (can also be a photo transistor if necessary), so a high current flows through the photo diode and the resistor Rn. This results in a positive gate-source voltage of the p-chanel MOSFET, so it locks the current flow through the consumer Rv. For reducing enegy loss, the resistance Rn should be as high as possible. In triggered state, nearly no current flows through the photo diode, so the gate-source voltage of the MOSFET is negative, so the MOSFET will turn on and let the current flow through the consumer Rv. The resistance Rb is just a base resistance for protecting the LED from overvoltage.

I will build a prototype of this circuit at the end of this month and will post my test results on this blog.

Simple light barrier ā€“ Part 2

Priorized Voltage Source Switch

I have been asked by a workmate if I could design a circuit which dynamically switches to another voltage source if the voltage of the primary source has dropped. He wants to install Solarpanels and would like to have a circuit which primarly uses the batteries being loaded by solar panels, for powering some lightening, but when the batteries are low, the power should be taken from the energy network. So I did some google research and some thinking and finally got the following circuit:

Schematics

The red bordered area represents the batteries (the capacitor on the left) and the solar panels (the 12 Volt voltage source on the right and the switch on the top, simulating the sun shining on the solar panels). The 12 Volt voltage source left next to the red bordered area represents the power from the energy network after it has been transformed down to 12 Volt and having passed a rectifier. When the batteries are loaded, the P-Channel MOSFET is turned off, so the power is taken from the batteries. The diode which is passed by the current from the batteries, prevents the current to flow from the energy net to the batteries, so the batteries only will be loaded by the solar panels.

The part on the left (consisting of the bipolar transistor, the base resistance, the TVS diode and the consumer resistance) is a simple voltage regulator circuit as it can be found on wikipedia. The TVS diode of the circuit limits the voltage of the consumer to a fixed value. So if you choose a TVS diode with a breakthrough voltage of 12 Volt, the consumer will get a maximum voltage of 12 Volt. The bipolar transistor regulates the current flow in a way that it will be constant for the consumer.

When the voltage of the batteries drop, the P-Channel MOSFET will turn on, so the reduce in voltage and current flow will be compensated by the energy network. The lower the battery get, the more power will be taken from the energy network. In my simulation, the voltage of the batteries dropped from 12 Volt to ~9 Volt, then no more power was taken from the batteries and all power flowed from the energy network.