Go Down

Topic: Sending serial out from arduino to an FTDI chip (Read 590 times) previous topic - next topic


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.



Apr 13, 2013, 03:38 pm Last Edit: Apr 13, 2013, 03:42 pm by PeterH Reason: 1
So you current have

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

and you want to change that to

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

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.
I only provide help via the forum - please do not contact me for private consultancy.


I want to do the second one,
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.



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.



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?



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?


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131