Here I will share some of my insights about embedded and PC software design and modern electronic hardware development. Everyone is welcome to engage into discussion.
Sunday, April 27, 2014
wxWidgets strange modal dialog crashes
Friday, August 24, 2012
Android-powered Tablet PC for reading books
P.S.: well, I already have bicycle and Tablet PC. The only thing left to buy is reflex camera, and I will completely fit controversial folklore image of a young programmer :)))
Saturday, August 18, 2012
Radio-controlled all-wheel drive Robot based partly on Arduino modules
Today I have attended Chaos Construction 2012 (in Russian) - computers and computer graphics, 8-bit music and demo scene annual festival. For me, one of the most interesting things there was presentation of all-wheel drive radio-controlled robot made partly based on modules from Arduino open-source electronics prototyping platform.
Robo-hobby blog (in Russian) is the official current webpage of these guys (those who are working on a robot, not those who develop Arduino). If you will ever want to learn anything about relatively easy-to-reproduce hand-made radio-controlled robots based on open-source hardware & software components, I would advice to check this blog. Authors share their experience about working on such a project. This is really interesting, even for me, professional electronics developer. I've already added RSS feed of their blog into my feed reader.
Saturday, August 11, 2012
Broken WM_DROPFILES (Drag-and-Drop) functionality in Windows 7
Friday, August 10, 2012
Dummy bicycle lanes in Moscow
This summer, I was in Moscow for a few hours, walking through the city while waiting for my train. My attention, among other things, draws to the fake (dummy) bicycle lane on prospekt Vernadskogo, near the "University" metro station. This "bicycle path" is actually one metre wide green band drawn on the pavement. The problem is that people do not regard it as a road for bicyles - instead, all pedestrians treat this piece of asphalt simply as part of pavement, and behave accordingly. Everyone who will try to move on this path on bicycle with a speed more than 15-20 km/h, will inevitably bump into someone else (pedestrian) during the first minute of trip. So this "bicycle lane" is absolutely useless, this is essentially just a mock-up. Even more, it is not only useless, but harmful for all cyclists. This is because if anyone wants to cycle with reasonable speed here, right solution would be to move in traffic area of this prospekt, in the first traffic lane, near the border. But Russian road laws states that cyclists should move through the special "bicycle lane", if there is one. So if any cyclist would bump into another object (car, bus, or pedestrian), while moving on traffic area of this prospekt, one could say that this happens because of he/she do not abide this particular rule of road laws. Shame on those who were responsible for this fake "bicycle lane".
Reanimating NiMh Battery Pack in home cordless phone
UPD: the same method works with NiMh AAA accumulators, I've just checked this today. 900 mAh acc. battery discharged to ~0.7 volts has been charging with ~90mA current for a few hours, after that I was able to complete the process with standard charger.
P.S.: Caution! In absense of temperature monitoring circuit, do not charge the battery with currents more that 0.1*C, for example, in my case I had battery with 600 mAh Capacity (designated by capital "C" letter), so max. safe charging current was 60 mA. Also, do not try to repeat this without proper setting of output voltage limit in your power supply. Put the battery into protective box for a period of charging to prevent damage from its possible explosion. Make sure that you are ready to quickly disconnect the power supply and to extinguish a fire in case if it will arise.
Sunday, June 10, 2012
Bugs in Windows Application Development
Wednesday, May 9, 2012
Bicycle off-city trips
Wednesday, March 14, 2012
How to reanimate Li-Ion or Li-Pol battery from your smartphone
To do this, cut off small pieces of plastic from both sides of the battery, to open access to the inner contacts of Li-Ion (Li-Pol) battery. You should see and have access to two metal stripes after this operation. Get laboratory DC power supply unit, with both constant current and constant voltage, modes of operating. I use SHENZHEN MASTECH HY3005D-3. Constant current mode is indicated by "C.C." red round LED at the front panel, while constant voltage -- by the nearby LED named "C.V.". My battery has capacity of 950mAh. The usual current for charging Li-Ion batteries is calculated as capacity x 0.2 (in the appropriate units, in my case, it would be 950 x 0.2 = 190 mA). Since we want to bypass control electronics, and will not monitor temperature of the battery, it would be safer to decrease this value, I think, two times will be enough, so I assumed charge current of 100 mA. I shortened outputs of one channel of SHENZHEN MASTECH HY3005D-3 power supply unit, and set short-circuit output current to this level. (Be aware also that maximum allowable current that USB port should be capable of providing by its spec, is 500mA. So if your device is charged through USB, do not exceed this value under any conditions. Even safer would be to use half of that value, that is, about 250 mA, as an upper threshold for charging current.) Then I set output voltage to nominal voltage of the battery, 3.7Volts in my case. After this, I connected output of power supply to inner batteries contacts. Initial current will be 100 mA, equal to short-circuit, and "Constant Current" LED should be active. During a few hours, the battery will be charging, after which voltage should rise to its nominal value (3.7 Volts in my case), current drops to near zero, and power supply switch to "Constant Voltage" mode. That's it. Now you can power off power supply, disconnected wires from battery, place it into your handheld device, and continue using it, without having to buy a new battery.
WARNING 1: Do not try to repeat the process without power supply with both "Constant Current" and "Constant Voltage" output mode, and without proper and carefully checked set-up values.
WARNING 2: Li-Ion batteries might fire and explode. It is safer to put the battery into the metal or other solid case during the process to avoid possible harmful accidents.
Tuesday, February 21, 2012
Simplified English
It seems that there is no "Velvet Way" or "Silver Bullet" that could solve the problem of communication between people with different native languages worldwide. I did not ever hear about language school that teaches "Simple, or Simplified Language". Just opposite, all of them claim that their method allows one to master English (or other language of interest) to maximum possible level, and this fact clearly indicates that there is no or little demand for learning Simple Language.
My conclusion is that there are no ways, except for long persistent systematic work, to learn any foreign language.
Monday, January 16, 2012
Requiem to Phobos-Grunt
Its short flight raised many questions to Roscosmos and even state's officials. Combined with several other satellite launch failures during last year, these questions are especially vital today. Maybe something in the area of top management of Roskosmos is really going wrong, maybe someone still think that world-class high-tech unique things can be developed for amount of money much less than world market suggests. Maybe something is broken at the bottom end of a technological chain, say poor quality control of production.
But here I want to point to only one side of the problem: nowadays, we have many strong rigorous math instruments that can be used to assess reliability and probability of failure for virtually any piece of hardware and software. Researches in the area of development of error-tolerant and reliable hardware and software systems allow one to employ many scientifically proved methods of designing and testing. This is XXI century, at last.
If scarce funding had really taken place, why main engineers and their bosses who were responsible for device subsystems could not just say: "Hey, guys, this is not enough to achieve the project's goals. You either will give us enough resources (time, money, people, equipment, etc.), or we will not sign for the work.". It seems that something is broken in the whole chain of decision making in Roskosmos. Sadly, but such conclusion came to mind after reading news.
Sunday, January 1, 2012
Digital Photo Frame Texet TF-618
Friday, December 30, 2011
Attentiveness in engineering work
Unfortunately, I spent about two months on this part of project instead of planned four weeks. The reason is lack of attention during initial schematics development and VHDL program writing. Little logical error in VHDL program and lack of thorough test simulations caused me to solder several wires to key logic nets of the design under consideration, connect them to special debug connector and examine its pins with oscilloscope. Physical layout of the two mezzanine PCBs does not allow to access all logic nets directly with oscilloscope probes. At the end, error in firmware was found and fixed, but at price of extra time and nerves.
After VHDL firmware was fixed, the device still did not function as it should. The reason traced to be a subtle difference in my schematics in comparison with third-party device to which my design should be compatible. My schematics was right, but incompatible with third-party software from manufacturer of that device. This was fixed by means of one 0603 resitor and two equipment wires.
Finally, this part of device passed all tests.
The lesson learned is the impermissibility of neglecting thorough and attentive requirement analysis and creating simulation tests during initial design phase.
Wednesday, November 2, 2011
Multi-Platform User Interface and GTK+
My conclusion is trivial: if you target only one platform, it is better to use GUI libraries created for this particular platform that fully complains with established de-facto standards.
Wednesday, October 5, 2011
Stupid Connector Pinout Problem
1 3 5 7 9 2 4 6 8 10In the User's Manual of industrial PC, to which I must connect, the picture looks like:
1 2 3 4 5 6 7 8 9 10I was slightly alarmed when I saw it the first time, but I thought that this is their right to re-order pins on their own module. Today, when I tried to get my PCB and this third-party industrial PC to work together, it was revealed that pins on its socket are actually ordered in a usual way, as shown in the first block. The unusual order that I observed in the manual was result of mere inaccuracy of their documentation writer. Strictly speaking, this is not my fault, but if I would check the actual ordering of pins before working on PCB, it would save me several hours of my life. Instead, today I have had to do some mounted-wire soldering on all manufactured devices to bring PCB footprints pinout to an actual state.
UPD: They fixed this error in the latest version of the manual. I should had to check for the latest version before using it.
Saturday, October 1, 2011
CRM and Electronics/Software Development
Crew Resource Management explanation on Wikipedia
CRM is all about preventing, detecting and correcting (even potential) human errors at the earliest possible stage, thus achieving the best flight results and safety. If you will regard flight of an aircraft as a multi-people PROJECT, you may naturally see that CRM principles can be applied also to electronics/software multi-people development PROJECTS. Unfortunately, I did not hear that even basics of such approach are studied in any university. This leads to very big role of project leader and his personal communication skills in overall success of any development project.
Such dependency could be mitigated, in my view, by working out and accepting concept of interpersonal communication in software/electronics development industry.
In particular, co-pilots are specially trained to correct the captain and to question potentially wrong decisions if it seems appropriate in a given situation. But in the area of electronics/software development, authoritarian project leader often has too much power and possibilities to send a project in totally wrong direction.
Monday, September 26, 2011
Wrong Pin Numbers in PS/2 socket
PS/2 connector on Wikipedia
Tuesday, September 20, 2011
Forms (Windows) Interface Font
Standard behavior would be to use default OS Dialog font.
To overcome this, in each form's OnCreate event, invoke the following procedure:
procedure SetFormFontToSystemDefaultFont(Form: TForm);
var
NonClientMetrics: TNonClientMetrics;
begin
NonClientMetrics.cbSize := SizeOf(NonClientMetrics);
SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, @NonClientMetrics, 0);
Form.Font.Handle := CreateFontIndirect(NonClientMetrics.lfMessageFont);
if Form.Scaled then
begin
Form.Font.Height := NonClientMetrics.lfMessageFont.lfHeight;
end;
end;
(Set ParentFont property to True for all controls on the Form for this to have effect).
Sunday, September 18, 2011
Delphi Inactive Forms Behavior
To remedy this, add the following code to your modal forms:
type
TMyForm = class(TForm)
...
protected
procedure CreateParams(var Para: TCreateParams); override;
....
end;
....
procedure TMyForm.CreateParams(var Para: TCreateParams);
begin
inherited;
Para.WndParent := GetActiveWindow;//to allow title flashing of child modal dialogs
end;
Friday, September 16, 2011
Electronic Component Misorientation Problem
It seems, that many engineering decisions are often driven by similar motivation - to ease manufacturing and/or repairing processes, at price of slightly increasing components cost.
It also reminds me that responsibility of everyone who design any type of interfaces, is to make every interface as clean and consistent as possible, and to make sure that working with this interface requires from user absolutely minimum of possible knowledge of a system.
SOT-23 drawing