Do You Check for App Updates Regularly?

Do you let app updates happen automatically or do you regularly check for them? We’re … more

Find The Best Apps With Google’s Picks & Other Tricks

The Google Play Store, weighing in with more than 1.4 million apps at last … more

Dynamic Pop for Note 4 (N910T & 910W8)

With the release of the Canadian Lollipop ROM for the Note 4, T-Mobile users can also enjoy the … more

Sunday Debate: Better to Buy Older or Newer Hardware?

Join us in a fun Sunday Debate on New vs. Old. Come with your opinions and feel … more
Post Reply Subscribe to Thread Email Thread

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

17th April 2013, 07:19 PM |#1  
OP Recognized Developer
Flag Michigan
Thanks Meter: 1,250
 
1,279 posts
Join Date:Joined: Jan 2011
Donate to Me
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_...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


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
Attached Thumbnails
Click image for larger version

Name:	DSCN2938.jpg
Views:	3615
Size:	105.8 KB
ID:	1891003  
Last edited by kemonine96; 26th April 2013 at 12:55 AM.
The Following 11 Users Say Thank You to kemonine96 For This Useful Post: [ View ]
 
 
17th April 2013, 10:51 PM |#2  
Motorhead1991's Avatar
Senior Member
Thanks Meter: 274
 
341 posts
Join Date:Joined: Jul 2012
Donate to Me
More
Happy to be a part of it KemoNine. I'm all set with my simplified version but I'm still happy to have helped.
21st April 2013, 01:53 AM |#3  
sert00's Avatar
Senior Member
Flag cesena,IT
Thanks Meter: 505
 
1,082 posts
Join Date:Joined: May 2011
More
second!
great works kemonine96,curious to try it!
Last edited by sert00; 21st April 2013 at 01:59 AM.
21st April 2013, 04:54 AM |#4  
OP Recognized Developer
Flag Michigan
Thanks Meter: 1,250
 
1,279 posts
Join Date:Joined: Jan 2011
Donate to Me
Quote:
Originally Posted by sert00

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.
22nd April 2013, 03:34 PM |#5  
Nerve89's Avatar
Junior Member
Thanks Meter: 2
 
6 posts
Join Date:Joined: Jan 2011
Talking
Quote:
Originally Posted by kemonine96

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_...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


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
25th April 2013, 04:00 AM |#6  
OP Recognized Developer
Flag Michigan
Thanks Meter: 1,250
 
1,279 posts
Join Date:Joined: Jan 2011
Donate to Me
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.
The Following User Says Thank You to kemonine96 For This Useful Post: [ View ]
26th April 2013, 03:18 AM |#7  
OP Recognized Developer
Flag Michigan
Thanks Meter: 1,250
 
1,279 posts
Join Date:Joined: Jan 2011
Donate to Me
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.
The Following 2 Users Say Thank You to kemonine96 For This Useful Post: [ View ]
26th February 2014, 07:15 AM |#8  
Member
Shanghai
Thanks Meter: 38
 
65 posts
Join Date:Joined: Oct 2012
Quote:
Originally Posted by kemonine96

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?
26th February 2014, 01:50 PM |#9  
OP Recognized Developer
Flag Michigan
Thanks Meter: 1,250
 
1,279 posts
Join Date:Joined: Jan 2011
Donate to Me
Quote:
Originally Posted by Maplobats

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
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes