Yenya's World

Tue, 01 Jul 2014

Static Transfer Switch

Static Transfer Switches (STSs) are amongst the most important parts of power distribution in our datacenter. Some of the datacenters are designed with redundant power paths in mind (as required e.g. by TIER 3 specification). The problem with TIER 3 is, that it requires all the equipment to have two or more power supplies. Some appliances (for example, ethernet switches) are much cheaper with a single PSU. An ethernet switch with two PSUs is usually from the vendor's top line, and is of course priced as such. We have decided to design our datacenter power distribution with single-PSU equipment in mind.

According to our experience, the majority of the power outages in our previous datacenter were either the planned outages, or were caused directly by the failure of the equipment which was supposed to provide higher availability (e.g. the UPSes themselves). So we have planned the datacenter to be able to bridge around the failed part of the equipment, while still providing the uninterrupted power even for the equipment with single power supply.

An STS can be viewed as a box with two incoming power lines and one outgoing line. It monitors the incoming power paths, and can quickly switch to the alternate path, should the currently-used path become faulty, providing uninterrupted service of the outgoing power line even in case of the failure of one of the incoming power lines. The "Static" part in the name means that there are no mechanical parts involved in the switching itself (such as relays), the switching is done by SCRs:

Our STSs are Inform InfoSTS. Their communication protocol and documentation is pretty bad, so I cannot really recommend them. Their proprietary Windows-only management software is even worse. For example, an attempt to set the time fails when the time is before 10:00, because the management software sends the time as H:MM, while the STS itself expects HH:MM even for hours less than 10. I have nevertheless managed to decode the protocol and write my own web-based management application for it (screenshot above).

Probably the most interesting part is that it is the first time I used SVG inside the web page, and Javascript for modifying it when the new data is read. So the schematics can be edited in Inkscape, and provided that the object IDs are unchanged, the application layer can still work with it. I plan to connect it with MRTG or Zabbix, and make all the numbers clickable, leading to the graph of the history of that particular variable.

Section: /computers (RSS feed) | Permanent link | 0 writebacks

0 replies for this story:

Reply to this story:

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)

Mon, 30 Jun 2014

Časopis "abc"

Jedno z drsnějších setkání s realitou: koupil jsem dětem časopis "abc", který jsem jako kluk měl dost rád. Dnešní "abc" asi už nemá dovětek "mladých techniků a přírodovědců", zato je tak z poloviny vyplněno reklamami. Vystřihovánky jsou tam značně zjednodušené (kam se hrabou stavební stroje z asi 150 dílů, které byly za mých časů).

Tak nějak mi to připomíná bulvární tisk. Představte si třeba elektrokolo, které filtruje vzduch (aniž by výrazně brzdilo jezdce aerodynamickým odporem), provádí fotosyntézu (i když na většinu plochy kola nesvítí slunko, protože je ve stínu jezdce), a vůbec je celé zelené. A vozit všechny tyhle vymyšlenosti sem a tam na elektrokole se vyplatí daleko víc, než provádět fotosyntézu třeba stacionárními rostlinami. Zaplnit město takovými koly, byl by tam vzduch jako na horách (klikněte na obrázky pro zobrazení ve vyšším rozlišení, podstatný je hlavně text):

Některé texty podle všeho píše polodementní absolvent žurnalistiky odněkud z Bronxu. Ale ty basy, woe, ty tam nejsou, je to příliš malý:

Správný pirát má dálkáč, woe:

No ale nejsou piráti jako piráti. Když nějací podivíni navrhli zbraň vyrobitelnou na 3D tiskárně, americká vláda to samozřejmě zakázala. Ale považte, projekt umístili na _pirátských serverech_(sic!), odkud si jej stáhlo přes sto tisíc lidí!

Zeptejme se, Kdo za tím stojí? Pokud by získání zbraně stálo jen pár stovek, nezbude každému, než aby se taky ozbrojil (podtext: a to je samozřejmě špatné, ááno!). Prostředí Internetu totiž nahrává hlavně pirátům:

A tak podobně. Na kladnou misku vah je třeba přičíst obrázkový kurz Blenderu a koupající se slečnu (byť decentně zakrytou osuškou) v jednom komixu.

Zdá se, že časopis "abc" se od dob mého mládí významně posunul. Nejspíš ale ne k lepšímu.

Section: /czech (RSS feed) | Permanent link | 3 writebacks

3 replies for this story:

Milan Zamazal wrote:

No, ty poslední dvě věty jsou něco, u čeho se také občas přistihuji: Příznaky nadcházejícího stáří projevující se v trousení poznámek o tom, že tráva dříve byla zelenější. Racionálně vzato, že se časopis během dynamického čtvrstoletí významně posune je zcela očekávatelné. A jestli k lepšímu nebo horšímu se nám trochu těžko posuzuje, můžeme kroutit hlavou nad kravinami, na druhou stranu co by asi naše děti řekly seriálu Strážci a na komplikované vystřihovánky dnešní běžné dítě sotva bude mít čas, trpělivost a motivaci (zní to hrozně, ale tímto způsobem fungujeme všichni) a navíc jejich tehdejší legendární tvůrce byl asi i ve své době výjimečný. Já zase kroutím hlavou nad tím, na co moje děti s oblibou čumí v televizi, přitom ale zjišťuji, že některé ty kraviny jsou třeba 20 let staré. Takže ono je to asi svým způsobem pořád stejné, některé věci jsou kvalitní a jiné ne, přitom se občas mění anebo nemění obal, obsah a název.

Yenya wrote: Re: Milan Zamazal

Tak já si ani náhodou nemyslím, že dřív byla tráva obecně zelenější. Spíš je to ve většině věcí naopak. No a ty vystřihovánky - nejkomplikovanější co si pamatuju byl Lotus F1 s řititelnými předními koly, a to už nebylo od arch. Vyškovského. Takže určitě není pravda, že by to záleželo na jednom člověku. No a nakonec: cílem tohoto blogu není ukazovat, že některé věci jsou kvalitní a některé ne.

J.C. wrote:

Podle me vetsina (nejen barevnych) casopisu konverguje k bulvaru.

Reply to this story:

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)

Meta: New Section "Czech"

One of the reasons of why I started to write this blog was to improve my English (not sure whether this mission is successful, though :-). Apart from that, I wanted to point out things that I found interesting. Occasionally, there are things that make sense only for people speaking Czech or having the knowledge of the Czech Republic. It does not make much sense to write about them in English, and then point to the resources and documents in Czech.

So I have created a new section of this blog, named simply "Czech". The articles in this section will be in the Czech language. My English-only readers (should there be any :-), please accept my apology, and skip this section entirely.

Section: /czech (RSS feed) | Permanent link | 0 writebacks

0 replies for this story:

Reply to this story:

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)

Mon, 09 Jun 2014

Politically Correct Media Players

Hello, welcome to today's issue of your favourite "Bashing the Questionable Fedora Desktop Decisions" series. Today, we will have a look at the politically correct media players.

In a civilized world, there is no place for such insane things like software patents. Unfortunately, there are less free parts of the world, which includes the United States of America. So the companies originating in the U.S. are forced to do absurd decisions like shipping audio players which really cannot play most of the audio files out there (which are, unfortunately, stored in the inferior MP3 format), or video players which cannot play almost any video (which can be encoded in wide variety formats, almost all encumbered by software patents).

For Fedora, the clean solution would be to have a package repository outside the U.S. jurisdiction, and offer it as a part of Fedora by default. Such a repository already exists at rpmfusion.org, and it provides everything needed to play audio and video in free parts of the world. But it is not as promoted as it should be in free parts of the world. However, Fedora does something different: they ship empty shells of audio and video players, such as Pragha or Totem, which in fact cannot play most of the audio and video files. The problem is, that these applications shamelessly register themselves as the handlers of audio/mp3, video/h264, and similar MIME types. Only after the media file is handed to them, they start to complain that they don't have an appropriate plug-in installed.

Hey, Fedora desktop maintainers, stop pretending that the US-based Fedora desktops can handle MP3 and H.264 files, and admit that your inferior but not U.S. software-patent encumbered players cannot handle these files by default. It would be fair to your users. Fedora users: is there anybody who really uses Totem instead of VLC or Mplayer?

Section: /computers/desktops (RSS feed) | Permanent link | 2 writebacks

2 replies for this story:

petr_p wrote: Desktop files

Both named players are based on gstreamer. Thus it's not possible to tell at build-time what media types are supported. This is a story about static desktop files. The only improvement I can imagine is declaring capability of audio/* and video/* instead of specific subtypes.

Vasek Stodůlka wrote:

Yeah, its's weird, but at least it can be fixed by installing VLC. But have you seen iPad? You can't even copy unsupported files there without some hack. :-)

Reply to this story:

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)

Tue, 27 May 2014

MPEG Transport Stream

Today I have investigated why some files with the .MTS extension do not have their MIME type detected. The file starts with the following bytes:

$ od -tx1 file.mts | head -n 1
0000000 00 00 00 00 47 40 00 10 00 00 b0 11 00 00 c1 00

According to the current /usr/share/magic from Fedora 20, it is quite similar to the following entry:

0       belong&0xFF5FFF10       0x47400010
>188    byte                    0x47            MPEG transport stream data

Also, the shared-mime-info package contains something similar:

<match type="big32" value="0x47400010" mask="0xff4000df" offset="0"/>

Note that both files expect the 0x47 byte to be at the beginning of the file, not after four NULL bytes as in my example. Yet mplayer(1) can play these files, and ffprobe(1) can detect it as "mpegts" with an audio and video stream. Looking into the ffmpeg source, I have discovered it does horrible things in order to detect a file format. For example, for mpegts, it scans the file for a 0x47 byte at offset divisible by four, and then evaluates some other conditions. The probe function returns score, and a file format with greatest score is returned from the probe function. Ugly as hell, but probably needed for handling real-world data files.

So, what should I do next? Should I submit a patch to file(1) and shared-mime-info to accept also the magic number at offset 4? Are we getting to the point where the already-complicated language of the /usr/share/magic file is not powerful enough?

Section: /computers (RSS feed) | Permanent link | 4 writebacks

4 replies for this story:

petr_p wrote:

file suffers from lack of tests and the parser rules are horrible. Fedora maintainer is pondering complete rewriting becuse of some fundamental insuffuciences in the languge (e.g. early text and binary format fork). There are always funny bug reportes to file (like today's one [https://bugzilla.redhat.com/show_bug.cgi?id=1101404]). I think you can submit your patch and look forward to various regressions :)

Ondřej Caletka wrote:

As MPEG TS is consisted of almost independent 188-bytes long packet, there is no room for good header. AFAIK the only way to detect TS is to seek for 0x47 packet start mark and then check that this mark repeats every 188 bytes. However, for TS stored in file, there is no reason why 0x47 shouldn't be the first byte. Maybe your file is not a raw MPEG TS stream but some MPEG TS stream augumented with packet timestamps.

jm wrote:

This is likely a Blu-Ray video, where the 188-byte pathets are prepended with 4 byte timecodes. http://en.wikipedia.org/wiki/MPEG_transport_stream#Use_in_digital_video_cameras

jm wrote:

packets, of course :)

Reply to this story:

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)

Tue, 13 May 2014

A Collapsed Dam

Last weekend we went to Jizerské hory, and we have visited an interesting technological sight there: the collapsed dam on the Desná river. Here are my photos together with a short description, as it apparently does not have its own English Wikipedia page, just a dead link from the Desná disambiguation page. More can be read in the Czech Wikipedia (Přehrada Desná).

The dam collapsed less than year after being built, in 1916. The forest workers spotted a tiny leak, and informed the dam keeper, who in turn informed his supervisor, and was given a permission to open the slide valves. In spite of this, the dam collapsed in about 70 minutes. The resulting flood wave killed 62 people. In the picture, there is the dam body from the side, together with the valve tower, and the river Desná flowing to the left through the gap in the dam.

The view down the river shows the huge gap where the part of the dam collapsed. Behind the new wooden bridge the entry to the water outlet tunnel can be seen.

The outlet chamber and the valve tower. There were two slide valves in the dam: one in the tower, and the second one in the outlet chamber. When the dam started to leak, the first valve was fully open, while the second one was half-open.

The second slide valve. After being informed about the leak, the dam keeper tried to fully open also the second valve, but he was forced to flee from the valve chamber in order to save his life. The valve has remained open at about 75 %.

In times of torrential rains, it was possible to divert part of the incoming water to the neighbouring dam Souš by a tunnel more than one kilometer long. Nowadays, the tunnel is closed, as it is a nature reserve of bat wintering.

Here is a modern analysis of the catastrophe and the reasons of the failure of the dam (in Czech, sorry).

An interesting fact about the political and economical system of that time: this dam and several others in Jizerské hory were built by a non-profit organization (Vodní družstvo, in English something like Water co-operative), formed by local works owners and other local persons and organizations, which were endangered by annual floods from the mountain rivers. The local people paid for the whole system of dams. I wonder why we pay enormous taxes and then build anti-flood infrastructure using the money from Brussels. I would guess the percentage of money lost in this process is huge compared to what our forefathers did.

Section: /world (RSS feed) | Permanent link | 0 writebacks

0 replies for this story:

Reply to this story:

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)

Wed, 07 May 2014

GMail Spam Filter

Apparently, GMail spam filter got too zealous. I have my own domain, and I run my own SMTP server on it. Now it seems Google has decided to reject all mail from my server:

<my.test.gmail.account@gmail.com>: host
    gmail-smtp-in.l.google.com[2a00:1450:4013:c01::1b] said: 550-5.7.1
    [2a01:...my.ipv6.address...] Our system has detected that this
    550-5.7.1 message is likely unsolicited mail. To reduce the amount of spam
    sent 550-5.7.1 to Gmail, this message has been blocked. Please visit
    550-5.7.1 http://support.google.com/mail/bin/answer.py?hl=en&answer=188131
    for 550 5.7.1 more information. o49si12858332eef.38 - gsmtp (in reply to
    end of DATA command)

In the mentioned page, they recommend putting "SPAM" in the subject of forwarded mail :-/ in order to trick GMail to accept it. But then, it is not forwarded mail at all, it is mail originated on the same host from which the SMTP client is trying to send it to GMail.

So, are we getting to the world where only Google and few other big players are allowed to run their own SMTP servers? And after that, they wil "suddenly" decide to stop talking to each other, as we have seen in the XMPP case with Google Talk. The morale of the story is: don't rely on services you cannot control for your private data and communication. They will drop your incoming mail as supposed spam and you will not be able to do anything about it.

UPDATE 2014/05/21: Workaround Available
Apparently, this is indeed IPv6-related, and the workaround is either to use IPv4 for Gmail, or better, make Postfix fall back to IPv4 after trying IPv6 first. This way, Google gets a penalty of two connections, and hopefully will have motivation to fix their problem.

The solution is described here, and more can be read in the postfix-users list archive (another source). The solution is:

Add the following to /etc/postfix/main.cf:

smtp_reply_filter = pcre:/etc/postfix/smtp_reply_filter

Create a file named /etc/postfix/smtp_reply_filter with the following line:

/^5(\d\d )5(.*information. \S+ - gsmtp.*)/ 4${1}4$2

and reload the Postfix configuration using postfix reload command.

Section: /computers (RSS feed) | Permanent link | 4 writebacks

4 replies for this story:

Milan Zamazal wrote:

Do you have both SPF and DKIM set up for your mail domain? If not then you should and it'll probably solve the Gmail problem. (Of course, I wouldn't recommend using Gmail to anyone, but we sometimes need to communicate with their users.)

Yenya wrote: Re: Milan Zamazal

Nope, I don't have SPF nor DKIM set up. Anyway, the outgoing mail in question was sent with envelope sender (MAIL FROM) from another domain than mine (that domain also does not have SPF/DKIM set up). However, I have also tried to send a test mail with MAIL FROM being in my own domain, and Google has rejected it as well. The strange thing is that after several test mails, it has started to pass through the Gmail filter, including the very same messages which have been previously rejected.

misch wrote: IPv6?

I had similar experience ... but ONLY on IPv6 connections. As soon as I switched to IPv4-only for sending mail via google mailservers, every mail was accepted. And when I switched back to IPv6, google started rejecting my mail again. DKIM was enabled (and working) and DNS PTR record was also set-up correctly. And, most important, every other mailserver had no problem accepting mails from me via IPv6 ... except for google. Strange.

Yenya wrote: Re: misch

Interesting. Yes, it is over IPv6.

Reply to this story:

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)

Fri, 02 May 2014

Rocketry

I bought a model rocket for my children (and myself, of course :-). We have assembled it, and on Thursday, we went out to give it a try.

model rocket

We have found a large field near Hády, and tried the rocket with an A8-3 motor. The weather was nice with almost no wind, and the rocket has returned after a nice flight about ten meters away from the launch pad. I would guess it reached the altitude of 50 to 100 meters. Another try with the same motor type gave a similar result. Then we attempted to use the strongest motor we had, a C6-7.

In the documentation it is stated that with C6-class motors it can reach about 335 meters of altitude. It was indeed something very different than A8-3. The rocket quickly disappeared out of sight. After several seconds, we managed to get a glimpse of it, as it deployed the parachute. However, there was apparently a stronger wind above, and despite having plenty of space in the field around us, the wind has carried it above the forest.

Despite searching for the rocket for half an hour or so, we have lost it. If you visit Hády in the near future, you can look for our rocket around this place.

Anyway, model rocketry is pretty interesting. Our next project is a 3D-printed rocket. We would like to start with something like the disposable rocket (I already have my own OpenSCAD variant of this design, without slanted fins), and move towards a full-fledged rocket with a return parachute, maybe carrying an on-board camera.

Section: /personal (RSS feed) | Permanent link | 2 writebacks

2 replies for this story:

Richard Lastovecki wrote: R[o|a]cket

I would never expect that you can be involved in racketeering :-)

Vasek Stodulka wrote:

Nice one. :-) I have to try it too, as a fan of Kerbal space program.

Reply to this story:

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)

Tue, 29 Apr 2014

The Grand C++ Error Explosion Competition

The daily ROTFL: if anybody still considers C++ being a sane language, look at this: http://tgceec.tumblr.com/.

Section: /computers (RSS feed) | Permanent link | 0 writebacks

0 replies for this story:

Reply to this story:

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)

Sat, 26 Apr 2014

Datacenter Power

As some of you may know, I am on a long detour from programming and system administration to the area of civil and electrical engineering, building supervision and datacenter design. Hopefully this detour is nearing to its end, as our new faculty building with its datacenter is almost ready.

I would like to share some photos of our infrastructure. Here are photos from our power distribution room (image labels are in Czech only, sorry):

And here is the image gallery from our UPS room and its service area. We use Dynamic UPS (DUPS), which does not maintain its backup power in the lead cells, but instead uses a huge flywheel, which allows to bridge the short gap between the power outage and start of a diesel engine:

More to come in the CVT FI blog, available to those who have access credentials to IS MU.

Section: /computers (RSS feed) | Permanent link | 0 writebacks

0 replies for this story:

Reply to this story:

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)

Fri, 25 Apr 2014

Buzzword Bingo

And the winner of today's Buzzword Bingo is ...

Project Atomic:

"Project Atomic integrates the tools and patterns of container-based application and service deployment with trusted operating system platforms to deliver an end-to-end hosting architecture that's modern, reliable and secure."

There is even the word "cloud" mentioned somewhere in their home page. I wonder what has happened to hackers and computer enthusiasts, when they are able and willing to put such a crap in their home pages. Apparently, the translation of the above is something like "We can run Docker applications under SElinux."

Section: /computers (RSS feed) | Permanent link | 3 writebacks

3 replies for this story:

dan wrote:

Agreed, but it's not that bad yet. Try to beat this :-): "The first of its kind to support IT's needs for data governance, security and oversight, and business users' desire for self-service discovery."

Yenya wrote: Re: dan

ROTFL

MartinK wrote:

Actually IIRC project Atomic (which is a fancy name for the underlying rpm-ostree project/tool) does atomic OS updates/deployments. You can install an update on your testing server, see if everything works and then generate an ostree delta. Then you can deploy the delta to your ostree using machines and atomically switch to the updated OS state (and back if you don't like it after all). This could work quite nicely for updating Docker containers. But indeed, it is not really apparent how the thing works from the default description.

Reply to this story:

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)

Tue, 31 Dec 2013

PF 2014

I wish a pleasant year 2014 to everyone who reads this blog.

PF 2014

Section: /personal (RSS feed) | Permanent link | 0 writebacks

0 replies for this story:

Reply to this story:

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)

Thu, 19 Dec 2013

Arduino SCX Digital to USB interface

I have a SCX Digital slot cars set, and some years ago I bought an interface box for connecting it to the PC using a RS-232 serial port. PC then can be used as a timer, lap counter, and race management. Now I wanted to make some modifications to the firmware (it uses AVR Tiny 2313 chip). I have discovered that the author does not sell this version anymore, it has been replaced by a newer version with USB. So I kindly asked the author whether he can provide me the source code for the firmware for the old version. I have got the following reply:

Hi Jan
Sorry, I do not share any of my software.

Well, whatever. It is of course his choice to keep the firmware of the abandoned version for himself. But in the meantime, I've got some experience with electronics and microcontrollers (see my other projects).

Introducing SCXreader, my own SCX-to-PC/USB interface, built with Arduino Nano. It is fully open, including the source code of the firmware. It costs about US$ 6.50, way less than the current SCX-to-USB SEB interface.

Section: /computers (RSS feed) | Permanent link | 8 writebacks

8 replies for this story:

Tomáš Pecina wrote: What about the clamping diode?

Myself, I wouldn't go for this. There is a clamping diode between the data pin and VCC, and I don't think it is a good idea to expose it to currents of more than 5mA when VCC is grounded. A lot of heat to dissipate for a tiny little diode...

Yenya wrote: Re: Tomáš Pecina

I do not understand. The data pin is configured as an INPUT pin, so there is no way it can source any significant current when Vcc is grounded (I suppose that by Vcc you mean the Right rail pin). And also note that the diode is not between Vcc and the data pin. Anyway, this configuration is tested, and I have verified there is no significant heat generated.

Tomáš Pecina wrote:

No, there is a protection diode between any pin and VCC of the embedded processor (I don't know which Arduino model you use so I cannot look up the catalog data). If Arduino is powered down, the Zener diode will stay closed and all the current (of some 6 miliamps) will go right through the on-chip diode in Arduino. Take a meter and measure the voltages on R1 and Z1 when VCC=VSS and you'll get a picture.

Yenya wrote: Re: Tomáš Pecina

Ah, I understand now. Two objections: 1) why would I clamp Vcc to GND? At the worst case, Vcc will be left floating, not clamped anywere. And 2) even if I will connect Vcc to GND, the current is limited by R1 resistor, so it would be at most 6.66 mA. Given that ATmega328 pins can source and sink up to 40 mA for each pin, I would guess that even the current between the data pin and Vcc pin of ATmega going through the protection diode should withstand similar currents. 6mA is not so much in terms of ATmega GPIO pins.

Yenya wrote: Re: Tomáš Pecina

One more thing: the protection diode is - well - a diode. Provided that it directly connects the pin and Vcc, clamping Vcc to ground and having the pin connected to +18V via 2K7 resistor would mean that the total power dissipation on ATmega would be proportional to the forward voltage drop on the protection diode. Which is - i guess - somewhere between 0.25 and 0.5 V. For 6.6 mA current, the power burned inside the MCU would be somewhere around 3 mW, which is way less than the MCU normally handle. The rest would be burned at the resistor outside the MCU. So I think even connecting Vcc and GND on the MCU side would not bring any significant problems.

Tomáš Pecina wrote:

1. Wrong. VCC won't be left floating, if the power supply is disconnected, it will power the whole Arduino plus any peripherals you may have left hooked up. Some designs are based on this setup (see, eg, http://hackaday.com/2009/06/27/avr-rfid-tag/). 2. The AVR can sink up to some 50 milliamps, right, but the path is through an open CMOS transistor with negligible voltage, not through a junction, which has some .65 volts of residual voltage on it. I'm not saying your circuit is going to destroy the AVR, only that it is a flawed design and definitely not in compliance with the catalog values under which the chip may be safely operated, ie, something I would never do to any of my three beloved Arduinos :-)

Yenya wrote:

I got a multimeter, unplugged Nano from the USB port (leaving it plugged to the above mentioned circuit. The voltage between the data pin and GND is not very stable, but it oscilates between 0.3 and 0.4 V. Which is well inside the specs: the datasheed says that the maximum voltage on the data pin should be Vcc + 0.5 V.

Tomáš Pecina wrote:

Great! So Z1 is closed and the +18V is sourced, via R1, right into the protective diode, the current trough it being approx. 7mA. My recommendation is to insert a 27K resistor between D2 and the cathode of the Zener, which will make your design safe and robust, with negligible impact on its function.

Reply to this story:

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)

Sun, 15 Dec 2013

Slot Car Tyres

The tyres of our slot cars are not as good as they used to be, so I wanted to buy new ones. However, the local seller has been less than helpful, so I searched the Net. Apart from U.S. slot car supply sellers (tyres for US$ 7.50, shipping into the Czech republic for US$ 25+), I have found this page, so I have decided to create my own tyres. The original tyres look like this:

Firstly, I have created the box for a new mold, using heavier paper with smooth finish:

The tyres are fixed at the opposite sides using dual-side adhesive tape. This allowed me to make a single-part mold only, and provide the pouring and air escaping holes:

The mold is made from OOMOO 30 silicone, bought at www.silikonycz.cz. I have used parafine release agent to avoid the original tyres sticking to the mold, but I think it was not necessary after all.

The mold removed from the paper box:

Removing the original tyres from the mold. OOMOO is really stiff and soft, my previous experience with Lukopren 1522 silicone is worse - Lukopren would snap off when removing the models so deeply enclosed in the mold.

For the tyres I have used urethane rubber. I have tested two types with a different hardness. The red one is softer - Vytaflex 30, and the blue one is harder - Vytaflex 40. I have used So Strong pigments for making the rubber red and blue. All those materials were also acquired from www.silikonycz.cz.

And here is the final product:

It is much softer than the original tyres, and a bit looser on the rims (I have not used any glue so far, though). With the original tyres, the best lap time with F1 cars was slightly under 7 seconds. After the short testing ride with the Vytaflex tyres I clocked the best lap of 5.15 seconds, and average laps around 5.50 seconds. Impressive.

Section: /personal (RSS feed) | Permanent link | 0 writebacks

0 replies for this story:

Reply to this story:

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)

Thu, 28 Nov 2013

A Not-so-New Pet

I have forgot to write about our new pet, so with an appology for the delay, here it is:

Testudo Hermanni Testudo Hermanni

It is Hermann's tortoise (želva zelenavá in Czech). It is about year and half old now. FWIW, we didn't bought it from the pet shop, but from the breeder at www.euzelva.cz.

Section: /personal (RSS feed) | Permanent link | 0 writebacks

0 replies for this story:

Reply to this story:

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)

About:

Yenya's World: Linux and beyond - Yenya's blog.

Links:

RSS feed

Jan "Yenya" Kasprzak

The main page of this blog

Categories:

Archive:

Blog roll:

alphabetically :-)