[Hardware][Arduino][Pre-boot] Universal Arduino Serial Adapter

Search This thread

kemonine96

Inactive Recognized Developer
Jan 27, 2011
1,349
1,288
Michigan
Overview
I have designed a "universal" serial adapter that the XDA community might appreciate. I recently needed access to a variety of devices using serial TTL and RS232 communication. The devices being a phone, router and firewall unit. I talked with a few friends that are in IT and polled some other ROM developers to get an idea on what they may find useful in a serial adapter device. Below is the result of the work. The idea is to have 1 serial adapter that takes care of all of your DB9 / null modem / goofy pinouts in one package.

Project Page
I have posted all of the code, pictures and an early circuit diagram to github: https://github.com/mcrosson/arduino_universal_serial_adapter . As I continue to develop and implement the project I will be pushing to github. Please note at this time the circuit diagram is a bit out of date. I am working on getting an updated diagram built but I am still learning Eagle and it will be a little while before I have it published.

Compatible Devices
  • Phone UART chips
  • Null modem serial ports
  • Cisco serial consoles

Working Features
  • Configurable line speed
  • TTL voltage adjustments (1.8V, 3.3V, 5V)
  • RS232 communication
  • Full UI

Future Features
  • Session recording to SD card
  • RTC for timestamped sessions and output timestamps
  • Inline display of serial communication on LCD Won't fix, LCD response is too low for this
  • RX/TX status via blinking the button LEDs

Known Issues
  • At 115200 line speeds the serial channel may drop characters -- This appears to be a speed limitation / bad code Fixed in dd981aa44d
  • UI timeout isn't reset when events occur Fixed in 7f60a42f9b
  • Timeout config doesn't reset / change current timeout Fixed in ebd4ac5d04

Code
IDE / Environment
This project was developed using stino (Sublime Text 2 plugin). It works slightly differently (read: more powerful) than the standard Arduino IDE. This project may or may not build under the Arduino IDE.

Configuration
The `Project.h` and `Project.cpp` files define the pinouts in use, Arduino pinout and a number of other items that may vary between builds. Please read through these [short] files and update the pinouts, addresses and anything else that may be different before uploading to your Arduino.

Prototype
attachment.php


Demo
I have posted some rough demo videos here (clickable) demonstrating some of the projects functions.

Parts
  • Arduino Mega
  • AdaFruit 1.8" LCD with MicroSD Card Slot
  • PSP Joystick
  • LED backlit buttons
  • Spark Fun MicroUSB breakout
  • AdaFruit logic level converter (bi-directional)
  • RJ-45 jacks
  • DB9 jack
  • Maxim Max3232 RS232 to TTL DIP IC's

Credits / Thanks
  • ChildOfTheHorn/Stacy Wylie
  • Adam Outler
  • Motorhead
  • utkanos
  • bhundven

Articles / Information Used For Project
 

Attachments

  • DSCN2938.jpg
    DSCN2938.jpg
    105.8 KB · Views: 4,438
Last edited:

Motorhead1991

Senior Member
Jul 6, 2012
403
401
Happy to be a part of it KemoNine. I'm all set with my simplified version but I'm still happy to have helped.
 

kemonine96

Inactive Recognized Developer
Jan 27, 2011
1,349
1,288
Michigan
second!
great works kemonine96,curious to try it!

Hopefully it works well for you. I've been hoping to find a solid solution to the problem of dropped serial data when running at faster line speeds. I'm thinking the code is setup in a way where it takes too long to process all of the input events. Going to be trying to set it up as an interrupt driven serial read/pass through to see if that fixes the problem any.

If not, I recently obtained an Arduino Due which should have enough CPU to keep up with everything compared to the standard Arduino Mega I'm currently using.
 

Nerve89

Member
Jan 20, 2011
6
2
Overview
I have designed a "universal" serial adapter that the XDA community might appreciate. I recently needed access to a variety of devices using serial TTL and RS232 communication. The devices being a phone, router and firewall unit. I talked with a few friends that are in IT and polled some other ROM developers to get an idea on what they may find useful in a serial adapter device. Below is the result of the work. The idea is to have 1 serial adapter that takes care of all of your DB9 / null modem / goofy pinouts in one package.

Project Page
I have posted all of the code, pictures and an early circuit diagram to github: https://github.com/mcrosson/arduino_universal_serial_adapter . As I continue to develop and implement the project I will be pushing to github. Please note at this time the circuit diagram is a bit out of date. I am working on getting an updated diagram built but I am still learning Eagle and it will be a little while before I have it published.

Compatible Devices
  • Phone UART chips
  • Null modem serial ports
  • Cisco serial consoles

Working Features
  • Configurable line speed
  • TTL voltage adjustments (1.8V, 3.3V, 5V)
  • RS232 communication
  • Full UI

Future Features
  • Session recording to SD card
  • RTC for timestamped sessions and output timestamps
  • Inline display of serial communication on LCD

Known Issues
  • At 115200 line speeds the serial channel may drop characters -- This appears to be a speed limitation / bad code
  • UI timeout isn't reset when events occur Fixed in 7f60a42f9b
  • Timeout config doesn't reset / change current timeout Fixed in ebd4ac5d04

Code
IDE / Environment
This project was developed using stino (Sublime Text 2 plugin). It works slightly differently (read: more powerful) than the standard Arduino IDE. This project may or may not build under the Arduino IDE.

Configuration
The `Project.h` and `Project.cpp` files define the pinouts in use, Arduino pinout and a number of other items that may vary between builds. Please read through these [short] files and update the pinouts, addresses and anything else that may be different before uploading to your Arduino.

Prototype
attachment.php


Demo
I have posted some rough demo videos here (clickable) demonstrating some of the projects functions.

Parts
  • Arduino Mega
  • AdaFruit 1.8" LCD with MicroSD Card Slot
  • PSP Joystick
  • LED backlit buttons
  • Spark Fun MicroUSB breakout
  • AdaFruit logic level converter (bi-directional)
  • RJ-45 jacks
  • DB9 jack
  • Maxim Max3232 RS232 to TTL DIP IC's

Credits / Thanks
  • ChildOfTheHorn/Stacy Wylie
  • Adam Outler
  • Motorhead
  • utkanos
  • bhundven

Articles / Information Used For Project

oh how i miss those breadboards
 

kemonine96

Inactive Recognized Developer
Jan 27, 2011
1,349
1,288
Michigan
I managed to solve the dropped characters issue tonight. I am now using the Timer3 library (look for Timer1 library on non-mega hardware) to control the serial IO using an interrupt timer.

Works great with the interrupt driven IO. Next up is RTC and SD card integration.
 
  • Like
Reactions: sert00

kemonine96

Inactive Recognized Developer
Jan 27, 2011
1,349
1,288
Michigan
Quick update on progress: I implemented some basic sd card logging and RTC functionality today. I also cleaned up some of the code and generally improved things.

Ran into an issue with sd card data transfers being "slow" which is forcing me to look into non-standard libraries for io purposes. My next step will be to be able to log data at 115200 baud to the sd card. Hopefully I'll have this rectified soon.
 
  • Like
Reactions: rew06 and sert00

Maplobats

Senior Member
Oct 12, 2012
67
38
Shanghai
Quick update on progress: I implemented some basic sd card logging and RTC functionality today. I also cleaned up some of the code and generally improved things.

Ran into an issue with sd card data transfers being "slow" which is forcing me to look into non-standard libraries for io purposes. My next step will be to be able to log data at 115200 baud to the sd card. Hopefully I'll have this rectified soon.

Not a lot of activity in this thread lately, but I'm just getting into this area.
Have you made any progress on logging data to sd card?
 

kemonine96

Inactive Recognized Developer
Jan 27, 2011
1,349
1,288
Michigan
Not a lot of activity in this thread lately, but I'm just getting into this area.
Have you made any progress on logging data to sd card?

No, I ran into some performance issues when I went to implement the feature. I believe I traced it down to some case statements but it's been awhile since I worked on the build.

Sent from my XT1053 using Tapatalk
 

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    Overview
    I have designed a "universal" serial adapter that the XDA community might appreciate. I recently needed access to a variety of devices using serial TTL and RS232 communication. The devices being a phone, router and firewall unit. I talked with a few friends that are in IT and polled some other ROM developers to get an idea on what they may find useful in a serial adapter device. Below is the result of the work. The idea is to have 1 serial adapter that takes care of all of your DB9 / null modem / goofy pinouts in one package.

    Project Page
    I have posted all of the code, pictures and an early circuit diagram to github: https://github.com/mcrosson/arduino_universal_serial_adapter . As I continue to develop and implement the project I will be pushing to github. Please note at this time the circuit diagram is a bit out of date. I am working on getting an updated diagram built but I am still learning Eagle and it will be a little while before I have it published.

    Compatible Devices
    • Phone UART chips
    • Null modem serial ports
    • Cisco serial consoles

    Working Features
    • Configurable line speed
    • TTL voltage adjustments (1.8V, 3.3V, 5V)
    • RS232 communication
    • Full UI

    Future Features
    • Session recording to SD card
    • RTC for timestamped sessions and output timestamps
    • Inline display of serial communication on LCD Won't fix, LCD response is too low for this
    • RX/TX status via blinking the button LEDs

    Known Issues
    • At 115200 line speeds the serial channel may drop characters -- This appears to be a speed limitation / bad code Fixed in dd981aa44d
    • UI timeout isn't reset when events occur Fixed in 7f60a42f9b
    • Timeout config doesn't reset / change current timeout Fixed in ebd4ac5d04

    Code
    IDE / Environment
    This project was developed using stino (Sublime Text 2 plugin). It works slightly differently (read: more powerful) than the standard Arduino IDE. This project may or may not build under the Arduino IDE.

    Configuration
    The `Project.h` and `Project.cpp` files define the pinouts in use, Arduino pinout and a number of other items that may vary between builds. Please read through these [short] files and update the pinouts, addresses and anything else that may be different before uploading to your Arduino.

    Prototype
    attachment.php


    Demo
    I have posted some rough demo videos here (clickable) demonstrating some of the projects functions.

    Parts
    • Arduino Mega
    • AdaFruit 1.8" LCD with MicroSD Card Slot
    • PSP Joystick
    • LED backlit buttons
    • Spark Fun MicroUSB breakout
    • AdaFruit logic level converter (bi-directional)
    • RJ-45 jacks
    • DB9 jack
    • Maxim Max3232 RS232 to TTL DIP IC's

    Credits / Thanks
    • ChildOfTheHorn/Stacy Wylie
    • Adam Outler
    • Motorhead
    • utkanos
    • bhundven

    Articles / Information Used For Project
    2
    Quick update on progress: I implemented some basic sd card logging and RTC functionality today. I also cleaned up some of the code and generally improved things.

    Ran into an issue with sd card data transfers being "slow" which is forcing me to look into non-standard libraries for io purposes. My next step will be to be able to log data at 115200 baud to the sd card. Hopefully I'll have this rectified soon.
    1
    I managed to solve the dropped characters issue tonight. I am now using the Timer3 library (look for Timer1 library on non-mega hardware) to control the serial IO using an interrupt timer.

    Works great with the interrupt driven IO. Next up is RTC and SD card integration.