Dec 28

Using MOSFET for reversed power polarity protection

Reversed power protection using N-channel MOSFET

Trivial topic indeed: why one would ever need to protect a circuit from a rolled-over power supply? There are countless potentials for mistakes that can result in an electronic developer pulling out his hairs and staring at his design worth of many hours or days of work - the one that he bricked just a moment ago.


To name just a few:

Continue reading

Dec 26

DIY Galvanically Isolated Solid State Relay for mains power controlled by 5..20mA current loop

Many of articles on this site might look trivial. So they are. But this is the result of my personal experience: I got tired catching myself re-inventing the wheel again and again. Thus I decided to post whatever proved to be useful for me at least once, in the hope that it might save some time to myself and others in the future.The industry makes it all for you. One can purchase a Solid State Relay (SSR) that would fulfill virtually any imaginable requirements. The only question is money: a decent device capable of handling mains power load of few hundred Watts would cost as from $10 and up. While if we lower the bar and look for an SSR capable of switching say 100mA - it would be possible to get one for less than a dollar.Here is a very simplistic (and relatively inexpensive) SSR implementation that is capable of managing heavy loads. It uses a TRIACas the main power switch and a "telephony" SSR controlling it. Continue reading

Dec 04

Compliant Constant-Current Source (c) TCJ

[Читать на русском]

Somehow CCS implementations became a theme of the year 2011 for me. This little scribble is here just to make sure I do not forget a nice topology I came across. Apparently this one has been invented by someone else, not me.Here's the original source where I saw it for the first time: Tube CAD Journal' blog entry from 15 November 2011.

Shadow Constant-Current Source a.k.a. "Compliant CCS" by John Broskie

Continue reading

Oct 11

HotFET Pre: J-FET audio preamplifier schematics

[Читать на русском]

At a first glance there's nothing difficult in building a unity-gain preamp: the well known and fairly simple source follower should do the job. However in my case it turned out to be quite an adventure. Why "HotFET" - please refer to this article.

HotFET-Pre (c) - prototyped in a "networking" case

The design is pretty simplistic. There were many calculations, tests and Continue reading

Sep 29

HotFET Pre: J-FET audio preamplifier (backgrounds)

HotFET Preamplifier prototype assembled in a "networking" case
HotFET Pre - prototype

[Читать на русском]

The story has begun long ago with the perplexity caused by the fact that amplifiers based on vacuum tubes consume lots of power, get hot and do sound great; while the vast majority of silicon-based audio devices can stay cool and produce somewhat mediocre results. It did not feel right. Hence my attempt to bring some extra controversy into the world of high definition sound reproduction.


The basic idea of this design

The basic idea of this design was: let's put transistors into the "hot operation mode". Continue reading

Jul 22

VLC Babyphone: a webcam baby monitor – quick solution

Our baby started to crawl and he did it fast: he would fall from a bed or such before one can hear him. Hearing him crying afterwards was no joy at all, thus an audio-only baby-phone was definitely not a solution. I wanted to get something up very quickly, w/o purchasing extra h/w or spending much time. VLC came at resque. Nevertheless it took me some time to get it right - that's why here's yet another "webcam streaming server how-to".

Note: I did it all on Linux machines. But Windows adepts must not be discouraged: VLC runs there very well too, and it's a truly free software!

My video-surveillance streaming client-server set-up

First of all Continue reading

May 15

Interlocked exchange on Linux: undefined reference to `__sync_add_and_fetch_4′

I am pretty conservative in selecting the tools I use for my projects, thus sticking with good old C++. To be really productive on C++ - using of some sort of smart pointers is a must. And to make things a bit more complicated there are multi-core machines, that run different OS'es and the project has to build correctly for 32 and 64 bits. Here we got things to protect...Using atomic barriers in GCC (supported since v.4.1.0 or so) may allow significant performance gain in comparison to pthread' mutexes. Though I've not done any benchmarks of this matter on Linux (yet), the gain on Windows while migrating from critical sections to interlocked exchange was pretty significant.The GCC built-in functions for atomic memory access work wonders: only problem - it did not compile on 32 bit Linux, throwing the following linker error at me:

undefined reference to `__sync_add_and_fetch_4'

Defining the compiler's option:


solved the issue (i486 worked here Ok too).