High speed I2C on PI Zero

After playing with the I2C bus on the Pi Zero I found that I was unable to change the baudrate with either of the commands

[code]]czozNjpcIm1vZHByb2JlIGkyY19iY20yNzA4IGJhdWRyYXRlPTIwMDAwMFwiO3tbJiomXX0=[[/code]

or

gpio load i2c 2000

Apparently you now need to set the I2C speed in /boot/config.txt

Mine now reads:

dtparam=i2c_arm=on
dtparam=i2c1=on
dtparam=i2c1_baudrate=500000

Of course it does need a reboot to change.

Strangely dtparam=i2c1_baudrate=1000000

won’t work, but that may be due to my receiver and not the PI

 

Headless Raspberry PI (PIZero) setup

The PIZero Simple setup without network or monitor. (Requires some prior knowledge of RS232 adapters and serial port setup)

First start by getting a PI SD image I used Raspian Jesse Light https://www.raspberrypi.org/downloads/raspbian/

Install into a sd card and make sure it runs (green light at least)

With a 3.3v RS232 adapter connect earth and RX/TX to your PI. Be careful some adapters are only 5V and will damage your PI’s UART pins.

PiZero

Setup your PC (I use Tera Term) serial adapter for 115200, 7 bits, even parity, 1 stop bit.

Boot your PI

If you get a screen of gobbledegook then good, otherwise swap your TX and RX around. When the gobbledegook has finished, press return a couple of times, and you should get a login prompt.

For some reason the console and boot up output at different baud rates (Caused by auto baud rate detect, settings above amended so this shouldn’t happen now)

Configure your PI the usual way. You will need some network to get your updates, but apart from that you have a working PI.

If you are brave (or idle) you can connect the +5v line from your serial adapter to power your PI too so you don’t need another usb power lead. Just be very careful that you attach it to the correct pins, otherwise your PI will be damaged.

 

Useful links.

(although I found the baud rate setting wrong everywhere I looked. Either auto baud rate detect at work, or it changes from distro to distro)

Element 14 no display using the raspberry pi serial console

RPi Serial Connection

 

Update:

The baud rate is auto detected, the native speed is 115200 (amended above) The auto detection only happens at the login prompt. The auto detection won’t pick up changes in bits/stop bits/ or parity. You can change the console getty port/speed/parity settings look at RPi serial connection above.

WiFi

If you have a wifi adapter and micro USB to USB lead, you can connect to WIFI. After connecting via RS232 edit the file [code]]czozOTpcIi9ldGMvd3BhX3N1cHBsaWNhbnQvd3BhX3N1cHBsaWNhbnQuY29uZlwiO3tbJiomXX0=[[/code] using sudo nano

add in the lines

[[code]]czoyNDg6XCJuZXR3b3JrPXsNCiAgICBzc2lkPVwiWW91cl9XSUZJX1NTSURcIg0KICAgIHBzaz1cIllvdXJfd2lmaV9wYXNzd29yZFwiDQp9e1smKiZdfQ0KDQphbmQgcmVib290IHRoZSBwaSBzdWRvIHNodXRkb3duIC1yDQoNCnJlIGxvZyBpbiB0byB0aGUgcGkgYW5kIHR5cGUgaWZjb257WyYqJl19ZmlnIHRvIGZpbnMgdGhlIHdpZmkgSVAgYWRkcmVzcy4gDQpUaGVuIHlvdSBjYW4gc3NoIHRvIHlvdXIgUEkgYW5kIGV2ZW4gYmV0dHtbJiomXX1lciB1cGRhdGUgdGhlIHNvZnR3YXJlLg0KDQpcIjt7WyYqJl19[[/code]]
Note : for Pi 3. You may need some changes to get the headless conf working, especially at non default baudrates, take a look at http://www.briandorey.com/post/Raspberry-Pi-3-UART-Boot-Overlay-Part-Two

 

 

 

 

 

 

 

The 1MV Tesla coil myth – Spark growth

It is often said to me that a Tesla Coil produces 1,000,000 V or more.

This is a common misconception. Unless you have an absolutely huge Tesla coil, the actual voltage at the top load is much smaller.

The mistake comes from the widely accepted rule of thumb that the voltage that an electrical discharge will jump determines the voltage present, in normal air at atmospheric pressure this equates to 30Kv per cm .  [Paschen’s Law] So it is easy to see that if a tesla coil produces sparks that will jump 30 cm or so, this means that the voltage on the top load must be roughly 1MV.

Unfortunately the situation on a tesla coils top load is a bit more complicated and the 30KV/cm rule does not apply in quite the same way.

The physics of the arc itself needs to be taken into account and the Radio frequency AC that is created. The Tesla coil is effectively a high voltage, high impedance AC current source [Tesla Coil – Output voltage] . So when the spark is being created as the spark grows it forms a  capacitor that draws current from the tesla coil reducing the top load voltage.  This effect happens as soon as the torroid breakdown voltage has occurred and gets progressively worse as the spark leader forms. This is therefore governed by the voltage breakdown of the minor diameter of the tesla coils top load

The maximal achievable potential is approximately equal to the sphere radius R multiplied by the electric field Emax at which corona discharges begin to form within the surrounding gas. For air at STP the breakdown field is about 30 kV/cm –  [https://en.wikipedia.org/wiki/Van_de_Graaff_generator]

So the voltage on the top load of a tesla coil tends to be slightly more than the standoff voltage of it smallest diameter.  Vmax = R·Emax (R = Radius, Emax = Breakdown voltage in air 30Kv). For a teslacoil with a 20cm (minor) diameter top load this is around (20cm/2) * 30Kv = 300Kv

The minor diameter is d
The minor diameter is d

But… 300Kv will only give sparks of 10cm according to the 30Kv/cm rule, Tesla coils can easily achieve better than that?

This is where the second aspect of the tesla coils output comes in to play. The voltage on the top load is both AC and Pulsed. Each burst or pulse of Radio Frequency (RF) creates a 10cm long (using the example above) arc leader from the available 300Kv. This heats and ionizes the air, making it conductive this is what you see as the arc in the air.

If very rapidly after the first burst of RF comes another,  the channel won’t have had time to dissipate so there is a conductive channel the new pulse can use. The energy rushes to the end of this ionized channel and tries to create another 10cm leader there. Not only does this almost double the spark length, but the energy also re-ionizes  the channel. This continues with the third, fourth, n … pulses, each time adding on a slightly diminishing (due to losses) leader to the existing spark.

This continues until something disrupts the channel usually the air rising as it get hot.

This can be easily proved with a modern electronic tesla coil. Set the coil to produce a single burst of RF, this gives a discharge that can be measured using the 30Kv/cm rule and can give a fairly accurate indication of the terminal voltage.

So unless you see a tesla coil with a 66cm minor diameter top load it isn’t producing 1MV

The BIGG coil of Oklahoma, probably the only true 1MV tesla coil.

Save