Search This Blog

Sunday, October 5, 2008

Carjacking - shortening the path for justice

As automobiles become more sophisticated, direct theft by tampering with the ignition system becomes a nearly impossible task. This narrows down the choices left for the criminals, who end up adopting the only choice where successful access to the vehicle is guaranteed: threatening the occupant(s) with a weapon in exchange for the car.

In general the criminals can get away with this type of crime if they are efficient and careful, leaving the victim with few evidence to help in the investigation and tracking of the vehicle.

However, once again we can put technology on our side, and in an attempt to be resourceful enough, take advantage of two broadly available devices: a cell phone and a GPS module. These devices
are becoming cheap enough to have dedicated in a discrete location inside the car for a single purpose: on demand location.

By being able to query the location of the car just by sending an SMS message to it and get a reply with the corresponding GPS coordinates, this could be a useful tool in the police work, as real time location would always be possible.

Following this idea, I've decided to attempt a simple implementation of one such system which I have designated "Vechicle Finder". Having as a platform a Nokia smartphone and a Bluetooth GPS device (both sitting on a board for convenient fixation of the apparatus), I have developed a Java application which reads the GPS coordinates and sends it as an SMS to the originator of the request SMS:



Upon receiving an SMS containing a special command and some optional parameters, this onboard device will reply with another SMS containing the following data:

  • Latitude;
  • Longitude;
  • Altitude;
  • Heading;
  • Speed;
  • Precision;
  • Number of satellites in view;
  • Timestamp.
By default only one sample of data is returned by the application, but depending on the value specified in the request, a bundle of successive messages can be transmitted automatically.

Sunday, September 7, 2008

The meanders of OBD-II protocols



As we travel through the history of automotive technology back and forth, we realize that at the heart of the machines that enable us to go from point A to point B faster than our legs, are a number of components that essentially haven't changed too much: engines still burn fossil fuels and the vast majority are based on pistons that transform the explosive energy of the fuel combustion into movement.

Only a large number of gradual improvements have taken place here and there, defining the milestones that fill the many stages of automotive evolution.

However, electronics and digital technology have envolved in a much faster and radical way. The first computers have very few resemblances to a computer from the modern days. In a few decades the speed and capacity of computing devices have grown thousands of times. Computers play a vital role in peoples lifes today, both personally and professionally.

Cars haven't envolved with the same rithm and pattern. The most important lines of evolution in car design and technology have been centered in improving the user experience (better handling, comfort, performance, design) , safety (as the number of people driving cars have been increasing, the rate of disasters with casualties have also increased over the years), fuel efficiency and low emissions (many regulations have started being imposed by the governments
in an attempt to force the industry to reduce the gas emissions that are known to contribute
to the greenhouse effect).

With all the requirements that are placed in the development of better cars, the use of modern electronics could not be disregarded, as it is at base of a large number of improvements that could not be achieved by any other means:
  • Fuel efficiency and low emissions: by adding an ECU (Engine Control Unit), precise control over the ignition timings and fuel injection have been made possible. The ECU, a specialized computer that receives information from many sensors mounted in different parts of the powertrain, ajusts the optimal fuel mix and ignition timing dinamically, varying the parameters as the conditions change (air temperature, engine temperature, air pressure, engine RPM, etc). As the engine ages, the parameters are also changed in order to obtain the best performance given the altered engine characteristics. By ensuring the optimal fuel mix it also decreases greenhouse gas emissions, as it ensures a correct burn that minimizes the more nocive substances at the exhaust.
  • Safety: the braking system is one of the most important items in a car's safety, which can play a vital role in preventing a crash or reducing the speed to minimize the effects of an unavoidable This is not trivial, as the natural instincts in a critical situation not always match the optimal result. In many cases it can be catastrophic, as applying excessive break pressure can cause the weels to block, thus increasing wheel slippage, preventing the car from stopping at a safe distance. Modern electronics allowed a layer of control to be put inbetween, causing the brakes response to be always optimal, regardless of user input. crash. However its efficiency have been dependent upon the proper skills of the driver in assessing the correct pressure to apply in order to achieve the right result.
    This system, called ABS (from the german expression Antiblockier-Bremssystem, which means Anti-locking System) have been a large improvement in reducing accidents specially in slippery terrains. The ABS relies on a small computer that has sensors which pickup the acceleration, speed at the wheels and brake pedal pressure, acting on the brakes hidraulic system, causing the user control to be partially overriden by this system, whenever necessary.
    Another important system is the one which governs Airbags inflation. By monitoring the car speed and information at the special impact sensor (a heavy duty accelerometer), in the event of a crash it should be deployed, as the decelleration is high enough to contribute to injure the occupants.
  • User experience: digital technology is present today in other aspects of a car, such as onboard navigation systems (GPS), car stereo/dvd, automatic air conditioning, etc.
On the technical backstage, it soon became a requirement that the critical electronics inside a vehicle (e.g.: upon an ECU failure the engine will stop running) should be monitorable and allow some sort of diagnostics link so that technicians could better track the problems without too much guessing. The way the car components could be linked to an external device for diagnosis (i.e.: a computer or some type of dedicated terminal) would vary according to each manufacturer. So in the early 90's there were several protocols, such as ALDL, OBD-I, K-Line protocol, etc.

But around early 1996, there have been some pressure over the industry to create a standard that would allow a single equipment to at least read a minimal ammount of important data from any vehicle no mater what make or model.

OBD-II is still quite generic in definition, as manufacturers usually implement a particular subset of the specification, specially at the type of bus(es) that is(are) used.

A complete device should be capable of recognizing the bus in use, switch to it and begin the proper handshaking.

Commercially available devices that allow a connection between the OBD-II bus from a car and the computer are usually expensive, even though material costs are low (manufacturers and resellers still benefit from the lack of competition in this market, and a reasonable sustained demand).

For those who are skilled with the soldering iron, the DIY alternative is quite advantageous. While a commercial OBD-II <-> RS-232 can cost up to 200 €, the DIY solution will cost as low as 60 € (30 € for the necessary microcontroller, 20 € for the J1962 connector - the one that attaches to the socket in the dashboard, and 10 € for the remaining components). About 7 hours of effort and you're done (yes, the microcontroller and the connector are expensive, and
the effort is not neglectable: the microcontroller you pay more because it's bundled with a
commercial firmware, and the connector is supplied by a car accessories reseller).


Saturday, March 22, 2008

Decoding ACARS transmissions


Just as with other radio related hobbies, this is quite an interesting one:

  • Using an appropriate air band receiver (or any receiver capable of tuning frequencies between 108 and 137 MHz in AM);

  • and a home built 1/4 wavelength antenna (approx 2 dB gain):


  • With an adequate ACARS decoder software (which decodes signals using the soundcard), information transmitted through this protocol can be seen, as long as you are tuned to the right frequency. For example in Europe the frequency would be 131.725 MHz:


ACARS mode: 2 Aircraft reg: .######
Message label: 10 Block id: 8 Msg. no: M80A
Flight id: ######
Message content:-
FTX01.LGWKOGT
COULD YOU ADVISE THE
FOOTY SCORES. TA


Combining this hobby with the actual airplane spotting can be very fun, making it ideal for a relaxing weekend, when no more activities seem to exist :)

Saturday, March 15, 2008

Long-haul WiFi - new developments

Returning to the WiFi topic, here is the new antenna development that I had promissed in the early post, once the dual "cantenna" design was finished.



The dual cantenna is quite efficient, as I realized by connecting it to reasonably distant access points (in excess of 200 meters, with many obstacles between, including houses). By verifying the antenna efficiency was the expected, I assumed that in better conditions the range could be far greater, by establishing a link between two antennas of this type or other type of optimal configurations.



However, I knew I could push it a little further, so I decided to buy a 12 euro 45 cm dish from a regular satellite TV system, and the materials to build a biquad feed. I installed the dish on top of the tripod used for the cantennas, and attached the biquad feed (built according to these instructions) to it:







Instead of using the SMC repeater I've used before, I decided to get my hands on two foneras with a fresh new version of OpenWRT and do a slighlty different setup: one of the devices would connect as client to the remote network, having the dish antenna attached to it. The second device, linked to the first through the Ethernet port, would be configured as Access Point and provide DHCP to the clients on the local WiFi network. The first fonera could additionally do NAT and have a few firewall features activated.




So far the efficiency tests have not revealed far superior results, most likely because of the low quality coaxial cable (RG-58) used for the connection between the antenna and the fonera.



This type of design could be ideal for building small weather stations where power is a significant constraint and some data needs to be periodically transmitted. Other application could be for surveillance cameras where the location of the camera could turn impratical the use of a wired link.













Monday, January 7, 2008

Water Fuel Cell - DC voltage results

Today I performed some tests measuring gas production with DC voltage. The tests were performed in order to obtain aproximately the same consumed power, namely 22 Watts.


DC test performed:




High frequency test (100 KHz) at same voltage:


The DC test shows a clear increase in efficiency (almost 25%) relative to the pulsed electrolysis.
Still to compare these results with low pulse frequencies (it is likely that power losses are quite high at 100 KHz).

Sunday, January 6, 2008

Water Fuel Cell - more results

For one measurement taken without the inductor coil, we have the following values:

Friday, January 4, 2008

Water Fuel Cell - measured results

I performed two consecutive runs without changing the conditions. The data obtained is as follows:

Considering that it consistently took 4 minutes to produce 80 ml of H2 + O2, this
gives a rate of 1.2 litres/hour of H2 + O2.

Water Fuel Cell - back to business

After reparing the WFC and adding extra safety measures, here is the entire setup producing hydrogen at 12 Volts DC and 1.94 Amps. Next I will provide a grid with measured values, including gas volume:


Thursday, January 3, 2008

Water Fuel Cell - cleaning the mess and repairing the electrolyser

After yesterday's mishap, and of realizing how lucky I was to still be in one piece, it is time to take a deep breath and after looking into what went wrong, follow all the safety measures to prevent one such event from ever happening again.

I started by getting a new lid for the electrolyser and putting a new seal rubber in it, this time with two clamps instead of one. Now only the clamps are used for holding the lid. The original ring around the lid was discarded. By itself this doesn't provide extra protection against an explosion, apart from the slight probability of the lid popping out in one piece instead of fragmenting into several pieces (today I still found fragments of the lid in distant corners of the room).

Considering that there is not much to be done in therms of safety with the electrolyser itself, I am starting to employ more effort in building two cascaded bubblers, with two main features: be long enough to maximize the distance between gas input and output (allowing for a large water barrier in case of a back-flash) and each bubbler be made from a material which will not fragment into many pieces in case of an explosion, or the lid be allowed to pop-off in this case. The major problem with the electrolyser lid lies in its acrylic nature, which when broken will fragment into many sharp pieces. When propagating at the speed of sound these fragments will cause damage to whatever is in the way.


Here is a picture of the refurbished electrolyser:




Safety goggles is also an extremely important item to wear during the elecrolyser operation:





Supersonic fragments will most certainly rip an eye off, in case you be in the path of the explosion.

Wednesday, January 2, 2008

Water Fuel Cell - HUGE ELECTROLYSER EXPLOSION

Sometimes mistakes can be the death of the artist. In this case I got closer to it than desirable: after building a tiny bubbler for testing sustained combustion I hooked it up to the electrolyser (aka: Water Fuel Cell) - one tube going from the electrolyser to the bubbler and another tube from the bubbler to the gas exit, where combustion would be tested.

The bubbler was working fine, air tight as necessary. After approaching the output from a flame, small explosions along the tube would occur, without affecting the WFC.

But after pressing the tube and letting some pressure build-up, as it was released close to the flame, the gas immediately exploded, propagating to the WFC. The entire process occured instantly, blowing-up the thick polycarbonate lid from the WFC, and scattering fragments all over the room (some could be found 4 meters away from the point of explosion). A lamp that was just overhead was partially damaged by the blast, and the ceiling was slightly bruised by one of the fragments.

Conclusion: bubbler design is a critical part of the system. A good bubbler will provide proper separation of water between the input and the output, in order to ensure that the fireball from the explosion will not advance through the liquid, reaching the tube that leads to the WFC, where the greatest concentration of hydrogen and oxygen can usually be found. It is also important that the volume of gas the bubbler will allow to be formed be minimal, in order to ensure the effects of an explosion inside it be under control. A good solution can be the combination of small gas volume with a mechanism of pressure limiting in case of explosion. Added to that there should be a minimum of two cascaded bubblers, further limiting the effects of an explosion. It is worth to remind that the hydrogen combustion is about 1000 times faster than propane gas, so even at atmospheric pressure the violence of such an explosion is a lot greater.

Picture of the hazardous bubbler used:



Electrolyser after explosion (water removed before the photo):






Damage to the ceiling:




Fragments of the lid:




Tuesday, January 1, 2008

Water Fuel Cell - inductive load added

Just as refered by several people doing this type of research, adding and inductive element to the load would create a resonant LC circuit, with the WFC as a capacitor. I used as an inductive load the secondary coil from a 220 V / 12 V transformer which was added in series with the WFC. The most notable effect was the suppression of the high frequency signals at the WFC, along with a voltage dropout of nearly 5 volts. The curious thing however is the fact that the gas production doesn't seem to be affected for the same input voltage/current conditions. As the transformer becomes hot after a couple of minutes of operation, this shows that there is less energy going to the WFC.

This sample video shows the cell in operation under these conditions: