Pages: [1]   Go Down
Author Topic: Using the Arduino as a Serial-TTL  (Read 6850 times)
0 Members and 2 Guests are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've got a Barracuda 7200.11 HDD. It's a very nice drive other than a small firmware error which causes it to permanently fail by becoming stuck in a busy state, resulting in the motherboard being unable to communicate with the drive at all. According to an online resource I found (which I cannot post now due to the forum's anti-spam measures), all I need is a serial to TTL converter and HyperTerminal to get things running again.

Instead of waiting for new parts to arrive or shipping my drive out, I would love to be able to use my Arduino MEGA as a bridge. Unfortunately, I'm not familiar with the nuances of programming with serial, and I wouldn't trust the state of my hard drive to my current knowledge.

Does this look feasible? If so, would simply programming it to write the input an RX pin to the serial TX (and vice versa) get it to respond the way I need it to? I get the feeling that waiting for a response from one end would interfere with writing to the other.

I would greatly appreciate any help you can offer. If there is a code repository where something like this might already exist, an in-depth guide to serial with the Arduino, or a quick outline of how I would go about writing something like this; any of these (or anything else) would be really useful. Thanks.
Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16540
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well I think there are two ways to utilize the Arduino Mega's USB serial converter chip to talk to your disk drive. One method using a active sketch running in the Arduino and one without using a sketch.

Method one. Wire a jumper from a Arduino ground pin to the Arduino reset pin. This will hold the processor in reset and free all it's I/O into tri-state mode. You are then free to use the serial pins 0 and 1 to wire to your disk drive. Run Hyper-terminal and the data should go to and from the disk drive to the PC. Pin 0 would wire to the Drives's serial receive pin and pin1 to the drive's serial transmit pin. I think this method would be the quickest and easiest to try first.

Method two. The Mega has four hardware serial ports and you could write a simple sketch to send anything received on serial port one to serial port two output, and send anything received on serial port two to serial port one. All the baud rates would have to be set the same. That should work in principle.

That make sense?
« Last Edit: November 21, 2009, 08:40:50 pm by retrolefty » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you so much! Tri-state mode worked perfectly, and it saved me a lot of time and effort, not to mention an over-priced hard drive.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I hate to bump an old thread, but how did you get your seagate drive running again?  I've got the tx and rx pins hooked to pins 0 and 1 , and when i connect to the serial port at 38400 8,n,1 I just get garbage in the terminal.  I also have ground connected to the ground pin on the seagate board.  Any pointers?  I got 2 years of work on this drive.  Also, I have a duemilanove, not a mega.  Can I use the tristate method above?  So far, I get nothing but garbage.
« Last Edit: June 21, 2010, 09:30:51 pm by pikoro » Logged

Pages: [1]   Go Up
Jump to: