Friday, July 23, 2010

High voltage oscillators

I've been thinking in how interesting it is that exceptional people like Tesla [1] envisioned things like oscillators using very simple technology and without using active components like tubes, transistors or diodes. One of the common tools they used to build commuting systems was
the understanding of the behavior of dielectrics before and after the rupture tension. When
a dielectric is inside an electric potential it redistributes its electric charge. If this
potential is high enough, the dielectric gets completely ionized and then starts conducting electricity with a comparatively small resistivity. Without being ionized, the conductivity of
air is between 0.3x10^-14S/m[2]. However, after the rupture voltage( around 33kV/cm ),
the air starts conducting, allowing the formation of electric arcs.
Using this simple principle, a very simple kind of oscillator can be built. A capacitor can be charged using a voltage source and a resistor. If a spark gap is placed
in parallel with the capacitor, then an arc is formed when the capacitor potential is high
enough. Once this happens the capacitor discharges through the arc until its charge is too
small to deliver the necessary current. When this happens, the arc is interrupted and the capacitor starts to get charged through the resistor. This produces a continuous oscillation.
The stability of this kind of oscillator greatly depends on the dielectric used in the spark gap. In the case of air, its variability renders oscillations very variable.

Tesla coils and pulsed lasers have been built using this simple principle. One of the advantages of using capacitors is that they can discharge very quickly hence producing large currents during brief periods of time. This enables them to release great amounts of "instantaneous" power.

[1] http://en.wikipedia.org/wiki/Nikola_Tesla
[2] http://en.wikipedia.org/wiki/Electrical_conductivity

Thursday, July 15, 2010

Using postgres from R

To use postgres from R, you can follow these steps:

1. Install R
http://cran.r-project.org/bin/linux/ubuntu/

2. Install a postgresql client
https://help.ubuntu.com/community/PostgreSQL

3. From R install packages DBI and RPostgreSQL
Download the packages DBI and RPostgreSQL from CRAN.
Then install them:
sudo R CMD INSTALL DBI_0.2-5.tar.gz
sudo R CMD INSTALL RPostgreSQL_0.1-6.tar.gz

Now you should be able to connect to postgresql databases from R.

To do so, you can use this code fragment:

library(DBI)
library(RPostgreSQL)
drv <- dbDriver("PostgreSQL")
con <- dbConnect(drv, dbname="my_database_name",host="my_host_name", user="my_dbuser", password="my_password", port= database_port_number)
tableXX <- dbGetQuery(con, "select * from tableXX")

NOTE: In Linux this process is very straightforward. In Windows you have to make sure your Postgres bin directory is contained within your path variable definition. (http://support.microsoft.com/kb/310519)

Wednesday, July 14, 2010

My plasma speaker

I've been recently making some sort of experiments with high voltage (3kV to 70kV). I have two interesting conclusions:

1. High tension transformers have a narrow frequency response. That means that you have to know their frequency of operation to make them work properly. That also makes them suitable to use as FM decoders.

2. Once an arc is produced, the current used to make the system work is not necessarily very high (I used 15V 1.2A, or about just 18Watts).

To put this facts to work, and for the fun of making it, I built a plasma speaker:



Not quite efficient but WTH!

Tuesday, July 06, 2010

Video edition in Linux

Today I found cinelerra, a decent open source video edition program for Linux. I am quite happy with the first results and the flexibility of the tool. It has transitions, multiple video/audio channels, special effects and multiple codecs. You can copy/paste and move fragments of your videos quite easily.