ATMEGA USB 009

Blog entry 008 is not working… so here is 009

I installed electronic lock with Dallas (Maxim) i-Button chips. It was very simple, low security version of electronic lock as it uses DS1990A chips as the keys. Original lock was made using PIC mcu (the smallest available) and 24C16 serial eprom to store key numbers. I programmed the lock and read chip contents. I found same numbers in eprom as numbers engraved on key. After reading the datasheet I discovered that these chips are not good for real security keys as they don’t have any security features. It is simple serial rom with CRC, and only nice feature that it is using one wire for data and power transfer.

I decided to make few experiments with these i-button chips and to write so software for AVR. The problem is, that there are lots of software for 1 wire protocol, but most of software is based on commercial AVR C compiller with build in 1 wire functions. I am using free GNU C compiler and I need to find software for all 1 wire stuff. I spent few hours searching internet and at last I found it.

The hardware is very simple- I used my AVR USB board with LCD module. I connected i-Button to my “firmware” jumper. The only modification is 4.7K pull-up resistor.

i-button avr

The LCD module is displaying various information about connected i-Button. Top left corner is status. Possible information: OPEN, SHORT, OK and ERROR. Top-right is CRC read from chip. In source there is CRC recalculation routine to check it (untested). Bottom left: device family id. And last and longest number is 48bit device serial number. Same as number on the metal can of the chip.

i-button avr

Source code: 20071027.zip

There are more functions in source code. I am using only minimal set of possible features.

Now you can build your own security lock, the only problem is, that Dallas ID chips are not secure. I think it is possible to build emulator for Dallas i-button chip and program other serial number. Dallas is not responsible for this as this chip is not intended to use as the key:

The DS1990A Serial Number iButton is a rugged data carrier that serves as an electronic registration number for automatic identification.
…allowing the DS1990A to be used easily by human operators. Accessories permit the DS1990A iButton to be mounted on almost any object, including containers, pallets, and bags.

I think that this “commercial” lock is cheap alternative for very low security door lock.

Posted in Anything, MCU | Tagged , | 4 Comments

Dolby digital in cinema

Some time ago, I tore a piece of cinema film from local cinema theatre. The movie was some dark work, about vampires or something. Recently, in wikipedia I found article about Dolby digital encoding on the film tape.

Dolby Digital 35mm

I found my film strip and checked it for digital data. Under microscope I found dolby digital data encoded in matrix bar-code between perforation. Also, I found three additional low rate digital data tracks. There is no data what is encoded here. In wikipedia example there must be analog channels…

Dolby Digital 35mm

I made the photo using small microscope with 25x magnification. Width between two graduations with numbers are one millimeter. You can see Dolby Digital logo in the center of dot matrix . Last image is borrowed from wikipedia:

DD is Wikipedijos

Posted in Anything | Leave a comment

HDTV

HDTV, hdtv… whattheheck is that HDTV? Here is some screenshots to describe the size of unscaled HTDV image. You don’t need to know about pixels and lines, do not need to describe difference between 720p and 1080i… Just look to the image and find little windows start menu gadgets on the bottom of the image.

HDTV
HDTV
HDTV
HDTV

And some unscaled piece…

HDTV

Posted in Anything | 1 Comment

Attenuator

Oh, it is great treasure. I’ve made sweep generator, but I didn’t build any attenuation device for it. I’ve tested regular carbon variable resistor, but the output was too noisy. I’ve also tested high resistance wire wound variable resistor, but the inductance was too high and the attenuation in higher frequency was horrible.
By a chance I found very old (~1964) sweep generator made by some USA company. It was full tube design and not working and partially disassembled. But I was in luck and original attenuator was intact. Also, the device as build in stand alone version- two solid metal cans with BNC connectors. The only problem was t find some inch-based, American tools to unscrew all nuts. I live in normal world where metric system is used.

attenuator

These two metal cans are stepped variable resistors. But they are calibrated and designed to work in wide frequency range. One attenuator is for tens of decibels and other for apiece (ones). Smaller one has 0, 10, 20, 30, 40 and 50 dB attenuation and bigger one is in full scale from 0 to 10 dB and one very useful position- open circuit.
The device is very solid, very well build and working without any glitch. And device is about 43 years old!

Posted in Anything | Leave a comment

ATMEGA USB 007

I’ve already mentioned that I have small problems compiling Windows executable from source code. It is maybe my compiler’s problems. Maybe it is some strange version build or bad crack :). I was using Borlan Delphi Professional, Second Edition v7.2, Created 2006 by Lite Application.

After some experiments I managed to solve the problem is some strange way. It is just some workaround, not real problem solution. I am not Borland guru, but after I added some useless lines to source code the program is working fine. Description of changes are in source code and “readme.txt” file.

Here is modified USB-LCD software for windows with source code for Borland Delfi 7. It is working on my computer with WinXP Pro SP2, and P4HT hardware: 20071007.zip.

Posted in Anything | Leave a comment

23 inch screen

I’ve tested 23″ Apple Full HD wide cinema monitor. The difference in size compared to standard 17″ LCD monitor is not very big because width and height (aspect) ratio is different. For standard, old, LCD it is 4:3, while Apple monitor is 16:9. Width of monitor is measured in hypotenuse and the jump from 17 to 23 give us only ~1 inch gain in height (~7″ in width).

Full HD monitor

Native resolution of the monitor is 1920×1200 pixels. This is enough to display full HD 1080p standard images.

Full HD monitor

The resolutions enables to play HD movies in full resolution without any software tricks and resizing. The quality of the monitor is very good- not speaking about possibility of dead, stuck or hot pixels. Back-lit of the matrix is smooth and even. One very good feature used in Apple monitors is that all the wires are combined to one. So, USB, 1394 (firewire), video (DVI) and power lines are in one single chord. No more spaghetti on your desktop. There is USB and 1394 hub on monitor- no need to search empty slot to connect your USB flash disk, DV camera or 1394 hard disk.

Full HD monitor

Such big screens give us lots of space on the virtual desktop. We can place lots of icons and gadgets on the screen. The only problems is that when more icons on the screen, then more lag in the windows. Also, when there are hundreds of icons on the screen it is very difficult to find needed on. Wide screen is useful not only for HD movies, but in spreadsheet calculations or programing in MS Visual Studio. Especially in new versions- MS added many useless color borders in serious work software. I thing that Bill is still stuck in color crayon shop introducing WinXP and now he discovered aquarelle (water colour) department with his Vista windows. Working with Adobe products are fine too, but better is to use dual monitors for this.

Full HD monitor

There is small problems using big monitors in modern internet pages- there are many pages with static width design (my wordpress template is static too 🙂 ) and such web pages looks very ugly when opened in full screen mode on such devices.

There are lots of white space for notes in these web pages 🙂

Posted in Anything | Leave a comment

Cool resistors

I found very cool resistors in old equipment. They are very nice design. The values are almost unusable in our days, especially in hobbyist works, but resistors are very nice. Resistors are inside glass tubes. The resistance is very big- it was some timing selector in old scientific equipment.

The value are in quite strange line: 316.2MΩ. Yes! It is three hundred sixteen millions, two hundred thousand ohms. All other resistors are similar, it differs only in tens: 312.6, 31.62, 3.162M. Less the value, more precise resistors are. 3MΩ is 0.5%. Glass ones only 1%.

resistors

Resistors on other switch are: 316.2M+0.00068uF, 100M+0.0022uF, 31.6M+0.0068uF, 10M+0.022uF and etc.

resistors

The device itself was made using mixed technology. Mainly using discrete resistors, but high voltage part was made using electron tube. The print on the tube is: VICTOREEN 7234, CLEVELAND, MADE IN USA. Tube is made circa 1970. The tube was regularly checked as it is many handwritten numbers on it.

The tube is older than me 🙂

Posted in Anything | Leave a comment

Video over UTP

I installed video surveillance system at my work place. Nothing special 6 color CCTV cameras, one computer with few hundreds of gigs storing about a month of h.264 video. But I had a problem with one camera. The distance from camera to computer is not very big, about 300 meters (~900 feet). But the problem was that cable must pass several storage and manufacture workshops. With very electrically noisy environment. Also, the ground potential in the ends of cable is different. So, I decided to use already installed UTP cables. There are lots of commercial solutions to transport video over UTP cable. But my budget was very small, in fact I managed to empty it before this UTP problems… 🙂 I bought cheap, passive BNC to UTP video balloons. Connected… and it was great disappointment. Mine video baluns didn’t have galvanic isolation between UTP and coaxial cable. Also, the signal strength was very low and full of noise. This was my mistake- in fact, video balun is not simple 75 ohm to 100 ohm line transformer, but some auto-transformer. And the transformer rate is 1:1. don’t believe to all mystical distances adverted in balun description…

There were some problems to solve:
1. Galvanic isolation- to remove ground loop effect.
2. Convert asymmetrical coaxial cable to symmetrical and vice versa in wide frequency band. (50Hz…5MHz).
3. Cancel all possible interference from working devices in workshop.
4. Compensate loses in UTP cable.

The only solution is active amplifier. I selected old chip from Elantec (now Intersil) EL2044C (Low power, Low voltage, 120MHz Unity-Gain stable operational amplifier) from some video multiplexer. This chip is intended to use in video device, wide supply range (from 2.5V to 36V), output designed for 75 ohm video load.

Most complicated part in this design is transformer. It must be very wide frequency range. In transmitter side I used passive solution- I used that video balun. It will convert to symmetrical signal video output from camera without any additional devices. On the receiver size I build small box with PSU and video amplifier. May problem is transformer specifications- all internet is full of “buy it” solutions and no “make yourself”. I don’t know how many windings must be in the transformer and what size or core to use. So I decided to use “connect and test” version. Using spare UTP cable I connected “line emulator”. I had about 120 meters of cable, so I connected all pairs in serial to get 4×120, about half of kilometer of signal cable. Video source- DVD player. On other side TV. First transformer I selected made bad results- it was possible sometimes to catch video, but now colors and lot’s of other problems like shades. I connected oscilloscope to the end of cable and revealed, that there are lots of reflections in cable and high frequency part of signal is lost in transformer. Color in PAL is transferred using 4.43MHz frequency and all this color component is very low. I added some capacitors to increase gain in higher frequency, but this didn’t solve the problem.
Suddenly, while browsing the internet, I found some web-page about one man using transformer from old LAN card to transmit 10MHz signal over symmetrical cable. I grabbed old LAN card and used transformer… The “color” situation was better, but I’ve lost low frequency part of the signal… The final solution was a bit crazy: dual transformer. One for high frequency and other for low. Both transformers connected in serial. Don’t mix phases in transformer.

Final circuit diagram (schematics) of the amplifier:

Video over UTP

Upper transformer is from LAN card. Lowe one is some from some power supply- it was feedback transformer on ferrite ring.
I don’t remember real value of the capacitors. 100 ohm resistor near transformer is main line load. Capacitor is used to increase high frequency gain. 500 ohm trimmer is used to adjust the reflections in the cable. Horizontal 100 ohm resistor is less that 100 ohm. I don’t remember (about 47Ω). Transformers are 1:1.

5 kΩ trimmer is to adjust gain.

PSU is double voltage, +6V and -6V, made from 12V with synthetic ground.

Posted in Anything | 1 Comment

CIS

At work, sometimes, we need to print some papers in color. So we need some cheap color printing solution. First we used old HP 970cxi printer, but now we need to print more. Original cartridges are very expensive, so we used refilled ones. It is very easy to fill color cartridge, just add some ink using top hole. There some more work with black ink cartridge- the hole must be closed with steel ball. But the cartridge is too small. So I bought more powerful printer for this- HP Business Ink Jet 1000 series. It is “semi- professional” printer with unmovable cartridges. The cartridges contains much more ink than moving ones. But I bought this printer having idea about CIS (continuous ink system). In some Russian site I even find instructions how to build it and how to disable ink cartridge chip. But then I decided to use already made solution and bought CIS system from China in eBay. For about $90 (including shipping and handling) I received full CIS system prefilled with ink. Here is the photo of CIS system in our printer:

CIS for HP1000

We already added ink to the system. Just pour some in to the bottle and that’s all! The only problem is with magenta color- some problems with ink head. I don’t know what is causing the problem: bad ink, bad pressure of ink, bad parking or just coincidence.

Posted in Anything | Leave a comment

Paypal in Lithuania

Original post dated September 28th, 2007.

After about ten years of waiting, most popular online payment system is working in Lithuania. Few years ago we used Western Union online payment system, but it was closed. Meanwhile Paypal was afraid of Lithuanian hackers or our bank system. Now, from 28th of September, the system is working. You may donate any sum to support this web log using this image link:

Thank you for your support!

Posted in Anything | 2 Comments