Pages: [1]   Go Down
Author Topic: Sending serial out from arduino to an FTDI chip  (Read 492 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a toy which can be controlled via the computer, using a USB cable that connects to a serial in FTDI port. For portability, I'd like to control this using an arduino, however when I send text commands using Serial.println() my toy device doesn't respond.

Does anybody have advice on how to do this? My only thinking is that the toy FTDI is expecting the data to be wrapped up by a driver, like it would be if it were sent via a computer.

Thanks,
Erl.
Logged

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12631
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So you current have

Quote
PC -> USB cable -> FTDI -> TTL serial -> toy

and you want to change that to

Quote
Arduino -> TTL serial -> toy

Is that right? In that case do you know what the TTL serial configuration is (speed, start/stop/parity bits) and what messaging protocol is used over that serial link?

Or are you actually using

Quote
Arduino -> USB host shield -> USB cable -> FTDI -> TTL serial -> toy

In this case you need to know what sort of USB device the FTDI adapter presents itself as and find or write a suitable USB host driver for it - writing a USB driver is a very substantial piece of work.
« Last Edit: April 13, 2013, 08:42:45 am by PeterH » Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I want to do the second one,
Quote
Arduino -> TTL serial -> toy

However whenever I try and do it I don't get a response. The toy device just takes simple text commands like A10\n\r and so on.

Thanks.
Logged

UK
Offline Offline
Tesla Member
***
Karma: 124
Posts: 7086
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It might be worth putting the Arduino in place of the toy so that it can receive the codes that the toy normally gets. Then you would know exactly what the toy needs to receive. There may be some "control" characters that are not normally visible. Alternatively the Arduino might be inserting unwanted line-feeds or the like.

Using the Arduino as a receiver would also allow you to check the baud rate etc.

...R
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The toy device is FT232 USB-Serial chip (Linux lsusb call it: 0403:6001). I have already tried using usbmon to sniff all the data being sent to the USB device but it's close to gobblegook.

Putting an arduino in place of the toy sounds useful, but how exactly would I get the data back off the arduino if I'm using the serial data to send commands to it. Should I save it to EEPROM?

Thanks.
Logged

UK
Offline Offline
Tesla Member
***
Karma: 124
Posts: 7086
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I guess using the EEPROM may be simplest.

I wonder will it stay alive if you power it separately from the USB connection so that you can disconnect from the controller and reconnect to your PC?

...R
Logged

Pages: [1]   Go Up
Jump to: