August 13th, 2009

Baudrate Converter

Baudrate Converter

A great tool for microcontroller hacking activities you might want to take on in the future is the Baudrate Converter, a device that automatically detects the baud rate of an MCU-based device you wish to hack. Using this method makes things a lot easier, so you don’t have to detect the actual baud rate using the PC or an oscilloscope – it saves a lot of time and energy and it’s also pretty simple to make.

The usual serial transmission has the Tx line on ‘high’ when idle and a single byte starts with a ‘low’ value (the startbit) and ends with a ‘high’ value (the stopbit). The idea is that, based on a few characters, the device measures the times the signal is ‘low’ and sorts them lowest to highest, detecting the real bit-time.

The baud rate converter uses the ATtiny2313 microcontroller from Atmel and the FT232 USB UART chip from FTDI. The latter supplies the power for the ATtiny. The converter has no capacitors for the crystal and runs at 20MHz using a 3.3V voltage, but it seems to be working nonetheless. The software that makes everything work is written in C and uses the 16-bit timer of the ATtiny extensively. After you connect the unknown serial port and send a few characters via a terminal-emulator, the device will detect the baud rate and the transmission of the bytes will be done accordingly, using the appropriate baud rate. If errors are detected, the converter will repeat the autobauding process.

The device has a detection range from 110 to 115200 and can help a great deal if you encounter baud rate conversion difficulties. The source code is available for released under GPLv3 license and is available for download in the link below (a .hex file is also available).

Baudrate Converter: [Link]

rgm-3550lp-gps-modules-connected-with-asus-eee-pc

The idea behind this project was born when a friend asked me too take a look at he’s broken GPS unit (MyGuide 3000) to see if I can fix anything. I started checking various parts like voltage regulators, but found nothing wrong. The gps unit was still not powering up so I checked the cpu, an ARM9 from Samsung and found it broken. Of course I couldn’t do anything about that, because of the BGA package and the bootloader needed after replacing it so the gps unit became a source for parts. The most useful and interesting parts from the GPS were the LCD display and the GPS module.

The GPS module is a RoyalTek RGM-3550LP which has an integrated antenna and is powered by SiRF Star III technology. I immediately connected the gps module to my computer’s serial port(using a max232) to test if it was still working. To my surprise the gps module was working and sending NMEA compliant sentences. Then I had this idea of using the gps module as a navigation system together with a notebook computer, but notebooks don’t have a serial port so I had to use a UART to USB bridge.

RoyalTek rgm-3550lp-gps-module

The most common used UART-USB bridge is the FT232 manufactured by FTDI which is about $4 which is a fair price because you don’t need any external parts for this chip except some bypass capacitors and that saves you time and money. I never used the chip before but it was really easy to get it working. It even has this custom utility that let’s you program some features saved in the internal EEPROM like the maximum bus power and the product and manufacturer descriptor strings. Anyway these are the only two settings that I tinkered with, but the utility let’s you change some more stuff.

ft232rl-usb-uart-bridge

The next thing I had to worry was where to get the power for the GPS unit, because it needs 3.3V and the acquisition current is 50 mA. The FT232 has an internal voltage regulator which provides 3.3 V and 50 mA but I decided not to use that in order to extend it’s life so I ended up using the TPS2148 which is a 3.3V LDO from Texas Instruments. It’s specifically designed for USB peripheral power management, and it’s tiny package(MSOP-8) made it ideally for my application. The TPS2148 handles the current limitation so I didn’t had to worry about that either.

tps2148-msop-8-package

After figuring out the parts I was going to use and the schematic, I had to chose an enclosure for this project. The main target was to get it as small as possible but the limit was the gps module size, I couldn’t of got it smaller then the module :). So I went and searched for a plastic enclosure, and I found one just perfect for what I needed, the PP85D from Supertronic. The gps module fits just nicely between the screw channels.

Then after I got the enclosure, I made the pcb using the photo etching technique.. I assembled and tested it, and to my surprise everything worked just fine from the first try. I’m usually not that lucky when I make stuff using new IC’s that I haven’t used before. Sometimes I don’t pay enough attention to the datasheet and I get some small stuff left behind and that messes my entire circuit. Anyway, happy as I was that everything worked from the first try, I put everything inside the enclosure and snapped some pictures of it. As a final note, this was a great project which I enjoyed making, and I really recommend you do something like this if you have a gps unit laying around.

more pictures:

parts-for-the-usb-gps-project gps-module-and-pcb ft232rl-board

board-inside-the-enclosure pcb-with-gps-module-inside-the-enclosure new-hardware-found

parts list:

  • RGM-3550LP gps module x1
  • FT232RL x1
  • TPS2148 x1
  • capacitor 10uF x3
  • capacitor 100nF x3
  • led x1

schematics and board files were designed in Eagle and can be downloaded here.



© 2007-2011 YourITronics | Any logo, trademark and project represented here are property of their respective owners | Wordpress | Privacy Policy    RSS