Kelvin Generator Upgrade

KelvinGenerator

This is my Lord Kelvin Generator design with an rotary vaporizer power upgrade. This device will produce High Voltage.  Probably with enough ampere to kill you, so be careful.

Basically you have two options.

1. * Build it like in the picture. The rotation disc should be of insulating material. The inner fat ring and the outer ring should be out of conductive material. Use simple tap water.

2. * Remove the the inner fat ring and make the rotating disc out of conducting material. Connect this disc not with the opposite outer ring.

Note: the conduction between th outer rim an the inner  through the water stream is to high

(Additional option:  Just use the rotating disc vaporizer to create snow when it is very cold outside.)

Schauberger Egg

Schauberger_egg_3_0

Schauberger_egg_4_0 Schauberger_egg_4_1 Schauberger_egg_4_2 Schauberger_egg_4_3

 from pylab import *

# The Egg is created by cutting with a straight line through a parabola vortex container

def showParab(k,const):
  #A cutting line params
  #k
  #const
  x=arange(0.1,4,0.001)
  #line formula
  y_line=k*x+const

  #the parabola formula
  y_parab=1.0/x

  ##see how the cutting looks
  plot(x,y_line,x,y_parab,x,-y_parab)
  axis([0,4,-4,4])
  grid()
  show()

showParab(-0.8,1.8)

#A cutting line params are k and d

def showEgg(k,const):
    #showParab(k,const)

##calculating boundaries
xstart=sqrt((1/k)+(const/(k*2))**2)-const/(k*2)
xend=sqrt((-1/k)+(const/(k*2))**2)-const/(k*2)
xx=arange(xstart,xend,0.0001)

##the egg formula
Egg=sqrt((1/xx)**2-(k*xx+const)**2)

###ploting the Egg
plot(xx,Egg,xx,-Egg)
axis([xstart0.2,xend+0.2,-max(Egg)-0.3,max(Egg)+0.3])
grid()
show()

#rounder egg
showEgg(-1.0,2.2)

#more typical egg
showEgg(-1.0,2.02)

#more typical egg
showEgg(-0.8,1.8)

#egg on the edge
showEgg(-1,2.0)

 

 
 
 

Make your wintergloves touchpad compatible

We all know in Winter when sitting outside with the Computer, the problem is your hands get freezing cold rapidly. Then you want to put some gloves on, but wait it looks like your Capazitive Touchpad doesnt works with them. Which often ends in the situation of having to get back inside even though the sun is shinning nicley.

But you can avoid this by making your gloves touchpad compatible by this simple setup.

All it need is two pieces of aluminium foil and a wire.

Here is the setup:

Just wrap one piece of the foil around your finger and the other piece around your wrist. Then connect the two foil pieces with the wire together. Now yout touchpad thinks it is sending the current through your finger but it will be sent through your wrist. And if you really don’t care, just wrap the second piece of foil around your heart !!.

DSC05645

MJPEG Server for Webcam in Python with OpenCV

Features of the mjpeg Server:

  • Can show html files from the local directory
  • Can show jpeg images from the local directory
  • Can serve multiple client simultaniously with a mjpeg stream ( multithreaded )
  • Image Quality of the stream can be set by the client.

The Stream can be watched in a Browser or by e.g. VLC-player by opening the url: http://localhost:8080/something.mjpeg
In order to get the Streamquality adjusting interface open in a browser with: http://localhost:8080/index.html (index.html must exist in the directory where the server is executed. The content of index.html is shown below)
Dependencies:

  • Python with OpenCV and webcam

The Webserver .py file:

#edited by Norbert (mjpeg part) from a file from Copyright Jon Berg , turtlemeat.com,
#MJPEG Server for the webcam
import string,cgi,time
from os import curdir, sep
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
from SocketServer import ThreadingMixIn
import cv
import re
capture = cv.CaptureFromCAM(-1)
img = cv.QueryFrame(capture)
cameraQuality=75
class MyHandler(BaseHTTPRequestHandler):
    def do_GET(self):
        global cameraQuality
        try:
            self.path=re.sub('[^.a-zA-Z0-9]', "",str(self.path))
            if self.path=="" or self.path==None or self.path[:1]==".":
                return
            if self.path.endswith(".html"):
                f = open(curdir + sep + self.path)
                self.send_response(200)
                self.send_header('Content-type',	'text/html')
                self.end_headers()
                self.wfile.write(f.read())
                f.close()
                return
            if self.path.endswith(".mjpeg"):
                self.send_response(200)
                self.wfile.write("Content-Type: multipart/x-mixed-replace; boundary=--aaboundary")
                self.wfile.write("\r\n\r\n")
                while 1:
                    img = cv.QueryFrame(capture)
                    cv2mat=cv.EncodeImage(".jpeg",img,(cv.CV_IMWRITE_JPEG_QUALITY,cameraQuality))
                    JpegData=cv2mat.tostring()
                    self.wfile.write("--aaboundary\r\n")
                    self.wfile.write("Content-Type: image/jpeg\r\n")
                    self.wfile.write("Content-length: "+str(len(JpegData))+"\r\n\r\n" )
                    self.wfile.write(JpegData)
                    self.wfile.write("\r\n\r\n\r\n")
                    time.sleep(0.05)
                return
            if self.path.endswith(".jpeg"):
                f = open(curdir + sep + self.path)
                self.send_response(200)
                self.send_header('Content-type','image/jpeg')
                self.end_headers()
                self.wfile.write(f.read())
                f.close()
                return
            return
        except IOError:
            self.send_error(404,'File Not Found: %s' % self.path)
    def do_POST(self):
        global rootnode, cameraQuality
        try:
            ctype, pdict = cgi.parse_header(self.headers.getheader('content-type'))
            if ctype == 'multipart/form-data':
                query=cgi.parse_multipart(self.rfile, pdict)
            self.send_response(301)

            self.end_headers()
            upfilecontent = query.get('upfile')
            print "filecontent", upfilecontent[0]
            value=int(upfilecontent[0])
            cameraQuality=max(2, min(99, value))
            self.wfile.write("<HTML>POST OK. Camera Set to<BR><BR>");
            self.wfile.write(str(cameraQuality));

        except :
            pass

class ThreadedHTTPServer(ThreadingMixIn, HTTPServer):
#class ThreadedHTTPServer(HTTPServer):
    """Handle requests in a separate thread."""

def main():
    try:
        server = ThreadedHTTPServer(('localhost', 8080), MyHandler)
        print 'started httpserver...'
        server.serve_forever()
    except KeyboardInterrupt:
        print '^C received, shutting down server'
        server.socket.close()

if __name__ == '__main__':
    main()

The index.html file:

<HTML>
<BODY>

<div id="hiddenDiv" style="display:none;visible:hidden;">
  < iframe src="hidden.html" height="1" width="1" border="0" scrolling="no" name="hiddenFrame" id="hiddenFrame" >< / iframe>
</div>

<img src="camera.mjpeg" alt="Smiley face" height="480" width="640">

<form target="hiddenFrame" method='POST' enctype='multipart/form-data'>

    <div align="center">
        Set Quality:
        <select name="upfile" width="50">
            <option value="2"> 2 </option>
            <option value="5"> 5 </option>
             <option value="10"> 10 </option>
            <option value="20"> 20 </option>
             <option value="30"> 30 </option>
            <option value="50"> 50 </option>
            <option value="75"> 75 </option>
            <option value="80"> 80 </option>
            <option value="90"> 90 </option>
            <option value="96"> 96 </option>
             </select>
        <input type=submit value=Set>
     </div>
</form>

</BODY>
</HTML>

 

VHDL when else vs. case is (part 2)

Ok there are two implementations. The implementation basically does a data mapping of 88 random 11 bit wide  indata values to 88, 11 bit wide outdata values. Everything is done combinatorically.

The first implemntation looks like this:

p1: process(indata)
begin
case indata is
when “11100000001” => outdata<=”10000110111″;

when “10000110111” => outdata<=”00001011001″;

…….(86 more mappings)

when others => outdata<=”———–“;
end case;
end process;

And the second one implents the same thing with exactly the same numbers but uses an alternative statement:

outdata <= “10000110111” when indata=”11100000001″ else
“00001011001” when indata=”10000110111″ else

………………(85 more mappings)

“11110110011” when indata=”00001000001″ else
“———–“;

 

To make the story short, here is the result from Quartus v11.1 :

First implemntation with case is:

Total logic elements : 261 / 33,216 ( < 1 % )

 

Second implemntation with when else:

Total logic elements : 932 / 33,216 ( 3 % )

 

Yes thats quite creapy. Thats nearly 4 times as much logic.

VHDL when else vs. case is

I recently i tried to compress some random numbers. 😉  The idea was to use hierarachical state maschine to generate the random looking data from them. To do this i would need to generate the transistion logic of the state maschinne out of the random data. I thought KV-Diagramms or the quine mccluskey algorithm should work since they minimize the logic function.

As i know modern synthesis tools use these technics, so i just thought, why not  put the combinatorical transition logic of some random numbers into a vhdl description and see how many LUT4’s (each 16 bits) it would take.

What i ended up doing was compering and wondering the synthesis result between the VHDL:

when else  statment and the case is statment. (Results in the next blog)

Electrostatic field sensing

The video can probably show some of the potential of electrostatic field sensing. 😉

Sensor Schematic:

The first Operational amplifier has a very high input resistance

Sensor Picture:

Explanation and thoughts:

Measurment of the environment with extrem high Impedance value. The values form the operational amplifiers are  sampled with the at90usb1287 (microcontroller) ADC and are send via USB to the computer. Python and mathplotlib is used to display the values at the screen in realtime.
The blue thing which i swing around is a ordinary rope. The rope is not connected to the computer in any way other than the coupling through the electric field in the environment.  (well also through the air and preassure waves)
The sensor dont seems to respond to magnetic fields.
If you want you can probably say it is a electric scalar wave transmission system.
Since the rope always carries some residual charges. Swinging it creates charge fluctuations in the environmental field. No charges are exchanged! The sensor plate is insulated.
It seems to create a electric compression wave which compresses and expands every charge/Atom/electron? around in the environment. It seems quit similar to a sound wave but more of electrical nature.
Inside the house or outside beneath a high voltage transmission line i always meassure a 50Hz sinewave base signal from the main line (In this test te notebook runs on battery, so no direkt connection to the 50 Hz line). These waves seem to compress and expand also all the charges in our body all the time. Thats probably the reason why i feel so calm when there is a power blackout. The same calmness appears to me when i am in the forest or under a tree. And the cool thing which supports my feelings, is that i was not able to measure the 50Hz signal in the forest or under a tree. Trees seem to block or absorb these electric compression waves at 50 Hz.
I therefore conclude that the 50 Hz main lines, which are basically installed in every house are not good for my well beeing.

So what should i prefer? Live in a house where i feel as well as when i take a walk through the forest, or live  my complete live in a house where i always get this small slight hardly recogniseable unpleasant feeling?
The solution ? I don’t know yet, anyway
Take care

The 10 Euro Quiz!

If you have the first satisfying answer to the Question for the following video i will reward you with 10 Euros. (no joke)

The Question:

Why is the magnet turning upwards in free fall and not in  the direction of the north pole?

Some ideas:

Is the magnet pushing against the aether? Has it todo with the earth electrostatic field? Is it some interaction with the earth magnetic field? Is this  violating F= m*g ?

Try it -> it is really fascinating!

If the answer isnt answered in three weeks i will add another 10 Euros to the budget. I also hope for some ideas on how to exploit this effect in a device.

Tracking the rotation of our Earth

Here i show a simple system i built to track the Sun passing the sky. Some people call it Sun tracking, but i dont like it because it suggest that the Sun is moving. Yeah the sun is indeed moving, but it is not what is tracked.

Electrical parts used:

1 x Photoresitor, 1 x Transistor, 1 x Solarpanel, 1 x Operational amplifier, 2x Potentiometers, 1 x Motor with gear

Operation:

If the Photoresistor is under direkt Sunlight the Motor is switched on. This rotates the complete device. This will move the shadow over the Photoresistor. This switches of the Motor.

Python Hardware Cpu

Running a very small subset of python on an FPGA is now possible.  This Python Hardware CPU (written in an hardware description language) can directly execute a very small subset of python bytecode with one bytecode instruction per Clock cycle.

This is a implementation of a kind of a microprocessor in myhdl which can directly  execute, very limited python bytecode. This myhdl description of the processor can be converted to standard VHDL. Since myhdl is written in python the CPU programm and some additional (if needed) hardware description can be handled in the same file. This simplyfies designing a lot.

I was able to run the Python Hardware CPU on the lattice pico development board. Soon i will create a additional page with more information on that for more information on the CPU visit here.

The approach is to directly execute python bytecode (but without all the dynamic features of python) where nearly every instruction is executed in one Clock cycle.

In the end i was able to successfully run python code which is as complex as the following.

global_argument=2

def kate(Cycles,argx):
  global PORTC_OUT,PORTD_OUT
  x=0
  PORTD_OUT=PORTD_OUT+argx
  while x<Cycles:
    x=x+1
    PORTC_OUT=PORTC_OUT^8
  return 2

def delay(Cycles1,Cycles2):
  global PORTC_OUT
  x=5
  while x<(Cycles1+Cycles2):
    x=x+1
    PORTC_OUT=PORTC_OUT^4
  x=0
  while x<kate(1,global_argument):
    PORTC_OUT=PORTC_OUT^2
    x=x+1

def CPU_main():
  global PORTA_IN,PORTB_IN,PORTC_OUT,PORTD_OUT # at least output ports need to be defined as gloabals
  x=0
  a=7
  b=8
  var_argument_b=3
  var_argument_b=var_argument_b+1
  while 1:
    x=x+1
    #funcas(kkt(3)) # calling a function with an function as an argument would not work
    delay(global_argument,var_argument_b)
    if PORTA_IN==1:
      PORTC_OUT=PORTC_OUT^1
    if x<20:
      PORTD_OUT=x
    elif 20<=x<25: #x>=20 and x<25: #both work 
      PORTD_OUT=(2**6)+x
    else:
      PORTD_OUT=x
    a,b=b,a
    PORTD_OUT=a<<1

Another interessting approach for example would be to use a standard  microcontroller from opencores or etc.., which can execute c or c++ and than use “Shed Skin” or “Pyrex” or  to convert the python code to c or c++ and then load it into a microcontroller on an FPGA or so. Probably “Shed Skin” makes use of some heavy libraries which would blow up the hole thing. Just an idea.