Simple and extensible microprocesor driver for robots

Intro

I will start from saying that the board could be replaced by any Arduino plus some(s) its motor driver shield(s). So why I made it you may ask? Well, while I made this tiny tank-robot model presented on below pictures, I wanted to make at least some things by myself, and decide what I need and how I need it instead of only buying prefabricated stuff.

This is the result, hope you will enjoy it and that maybe you will find inspirations for your own stuff.

Her's what it has and what it can..

  • Handle two separate motors, each can run either "forward", "backward", or stop.
  • Motors can be powered from a separate power source (there's a jumper for that, if removed, power is taken from a source connected to a separate goldpin)
  • ATtiny24 manages the board, it's relatively small microprocessor, but I think that it will be fine for such project. All its pins are available via goldpins, I also added a couple goldpins connected to Vcc and GND to make easier connection to other boards, shields and stuff like that.
  • To make programming easier, 6 PINs ISP socket for the ATtiny24 is also included.
  • ATtiny24 can be removed and the motor driver can be managed from external source, e.g. an Arduino. This could be useful in future if the ATtiny24 would not be sufficient.
  • There isn't any voltage regulator, or step/up/down/ converter because it would make the board less flexible.

Circuit

The circuit is simple, consists only of a small microprocessor, motor driver, some filtering capacitors and a lot off connectors.

The hardware was designed in Eagle, the board is available on GitHub.

Software

PB0, PB1, PB2 and PB3 ports of the ATtiny24 are used to drive the motor, others are available for other purposes, e.g to communicate with the sensors. There's not a lot of them left, because the microprocessor is quite small, but I think that for such project, it will be enough.

DKP-50 dosimeter (radioactivity detector) tear-down

DKP-50 was a dosimeter produced for the Polish army during the cold war era. It indicates amount of radioactivity absorbed by the body, a soldier was equipped in this device in case of nuclear conflict. A scale has range of 0-50R (R = Roentgen, a legacy unit of exposure of X-rays and gamma rays). 500R in 5h is usually lethal.

It's based on ionizing chamber that changes radioactivity radiation to an electric current, current discharges a capacitor that is also used as a power source. The device measures discharge of a capacitor over time. This is done by using a wire that accordingly changes its position and optic unit to make those results available for the operator.

Sample result is visible on the picture. Note that it's inaccurate because the device was discharged and wasn't calibrated.

The deice, visible a plastic cap (with seal) to protect charging electrodes and a metal clip to attach the device to an uniform. On the cap, there're two names: "DKP-50" and "12".

Kirlian photography - a simple way of taking it

Kirlian photography is an interesting photographic technique of capturing corona discharge of objects. The images basically contain only edges in a form of blue glow. Note: one of those photos is visible in "The X files" intro - read the whole article to know why!

In this post I will present my minimalist approach with common materials and without complicated construction. The results aren't that good as with more complex setups, but I think that they are still really interesting.

Materials

  • A camera with modifiable ISO and exposure time.
  • 10-30kV high voltage supply.
  • Tin foil. I used a foil in a form of adhesive strips because it's easier to stick it to surfaces, but a regular one can be also used.
  • Small piece of glass.
  • Slats or other things to put everything in place.

High voltage supply (10-30kV) made from CRT television flyback transformer

Old CRT monitor or TV is a great source of electronic components that can be used in DYI constructions. One of them is a flyback transformer that can provide 10-30kV output. The input voltage can be in a range from a couple of volts to over a dozen of volts, power consumption is a couple of watts. In my construction input voltage is 9V, power consumption is 5W.

A flyback transformer is driven by one or two transistors that should be also extracted from the same TV or monitor, those are high voltage transistors, that are hard to substitute and if bought separably can be expensive.

Geiger–Müller counter with three STS-5 lamps

The Geiger–Müller counter is a relatively simple tool to measure ionizing radiation. My construction of the Geiger–Müller counter that consist of three soviet STS-5 lamp to increase sensitivity. It's important because for measurements of natural sources of (low) radiation like soil, rocks. I have also in plans building my home radiometric station (it would be part of part of a weather station) connected to the web, so I get the data wherever I am.

The electronic circuit of a Geiger–Müller counter

When high voltage (typically 380-480V) is applied to the Geiger–Müller tube, an ionizing radiation can create a pulse of current that can be observed by the detector. The level of ionizing radiation is proportional to the amount of pulses detected in an interval of time (typically from 20s to 2,5min).

Homemade Geiger–Müller simplified circuit

Similarly to diode, a Geiger–Müller tube has its polarity, when connected in the opposite direction it won't work correctly.

Inside the Geiger–Müller tube, mentioned current has a form of a spark gap, so the tube is connected in series with a resistor (typically 1-10M) to reduce the current and extend the lifetime of the tube.

There are a couple of ways to obtain a signal from the tube, in presented here, a resistor (typically 10-220k) is connected in series between the tube and ground, spikes of voltage on this resistor are measured.

Waring! The device uses high voltage that can lead to unpleasant shock, injury or death. Don't touch it when power is on, discharge capacitors after use or wait a couple of minutes before touching the PCB or GM tubes.

Simple tool to deobfuscate JavaScript code

The easiest way to obfuscate code is to remove white-spaces that are not necessary and to shorten the names of variables and functions. A couple of years ago a made this simple tool to parse such obfuscated JavaScript code.

An example how the code can look after obfuscation and before passing it to a more readable form is presented below.

(function(){var s=true,t=false,aa=window,u=undefined,v=Math,ba="push",fa="slice",ga="cookie",y="charAt",z="indexOf",A="gaGlobal",ha="getTime",ja="toString",B="window",D="length",E="document",F="split",G="location",ka="href",H="substring",I="join",L="toLowerCase";var la="_gat",ma="_gaq",na="4.8.6",oa="_gaUserPrefs",pa="ioo",M="&",N="=",O="__utma=",qa="__utmb=",ra="__utmc=",sa="__utmk=",ta="__utmv=",ua="__utmz=",va="__utmx=",wa="GASO=";var xa=function(){var j=this,h=[],k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";j.uc=function(m){h[m]=s};j.Nb=function()

[...]

After parsing it to more friendly form, we can spot functions, variables, loops and other things. Although the code still is far from being beautiful, it looks much better.

(function()
{
 var s = true,t = false,aa = window,u = undefined,v = Math,ba = "push",fa = "slice",ga = "cookie",y = "charAt",z = "indexOf",A = "gaGlobal",ha = "getTime",ja = "toString",B = "window",D = "length",E = "document",F = "split",G = "location",ka = "href",H = "substring",I = "join",L = "toLowerCase";
 var la = "_gat",ma = "_gaq",na = "4.8.6",oa = "_gaUserPrefs",pa = "ioo",M = "&",N = " = ",O = "__utma = ",qa = "__utmb = ",ra = "__utmc = ",sa = "__utmk = ",ta = "__utmv = ",ua = "__utmz = ",va = "__utmx = ",wa = "GASO = ";
 var xa = function()
 {
  var j = this,h = [],k = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
  j.uc = function(m)
  {
   h[m] = s
   }
  ;
  j.Nb = function()
  {
   for(var m = [],i = 0;
   i<h[D];
   i++)if(h[i])m[v.floor(i/6)]^ = 1<<i%6;
   for(i = 0;
   i<m[D];
   i++)m[i] = k[y](m[i]||0);
   return m[I]("")
   }
  
  }
 ,ya = new xa;
 function Q(j)
 {
  ya.uc(j)
  }
 ;
       [...] 

USB powered thermometer with an interesting data display

Almost each person interested in building electronic devices has built at least one thermometer and power supply in his life. I'm not different, to add to this, today I will present one of my thermometers.

Original concept was different, I wanted to use it as a weather station, wake up, go to my balcony, smoke a cigarette and check what on this device what is the temperature, humidity and air pressure. At the end I decided to build a small thermometer (in future with all mentioned features), that I could plug to my computer and check conditions in my home.

What is nice here is that the data is displayed original way, there are two rows of nine LEDs, if on the upper row second diode is on, and on the bottom row fifth diode is on, then the value presented by the device is 2*10 + 5 = 25. It can sounds complicated at first, but in practice it's fast and intuitive. Below is an example, value presented on the display is 25: