Here is the situation i just got my sparc and wanted to use it to control a Neato XV-21 robot vac (kinda like roomba). I am able to control the unit when i hook it up to Ubuntu and it shows up as /dev/tty1 and I can send it command via echo “Playsound 1” > /dev/tty1
It looks like the usb port on the Neato XV-21 is a glorified serial to usb device. So my question is could hook up the Sparc’s usb to that and get it to connect and send commands like a serial connection?
If the Neato is set up to talk to a host as a USB slave, then connecting it over USB to Spark is not going to work, since Spark is also a USB slave. If the Neato can act as a host, then it could work.
If the Neato has a USB to serial converter chip inside like the ubiquitous FTDI parts, then if you can solder, you might be able to jumper out the USB to serial chip and drive it with Spark (with a level-shift possibly being required).
Neato does act as the host. Any direction on how i could get started with it?
Thanks for the quick reply!
In regards to bypassing the usb to serial that was my first thought. I ripped it appart and mapped the usb port to where it connects and its to this which has a bunch of different options on it as far as connection types. One being usb another being UART. Red circles are TX and RX http://www.nxp.com/products/microcontrollers/arm9/LPC3143FET180.html
There is no way in hell i can jump off of that my skills aren’t that great plus if I use the usb option other people can easily do the mod buy just plugging in. So i would be interested in seeing my option with USB.
I would start there. If your Neato is a USB host, then you should just be able to plug the core in as a USB slave serial device and run a serial program on it.
I am sure you know that the NXP chip is an ARM processor, so it depends on the how the code for it is written.
Yep, and there is serial code in there since older version worked. They just removed the pins for serial and left the functionality on there or so i have been told.
Thanks for the link! I wasn’t sure exactly how i would handle that or if the spark was capable. Final question and i will get to it. Is there a way i can completely shut of the usb port so that it breaks the connect. One of the draw backs with connecting via the usb port to the XV-21 is any commands that you throw at it to make it move will not fire until the usb is disconnected. I was able to do this via linux by just unbinding the interface. Would i be able to do this with the spack?
The processor on Spark cannot be a USB host (master) just a peripheral (slave). You would need another host if you want to use USB.
If you can get back to hardwired serial, that might work (with level shifters etc.). I don’t see a way to get to those pins under that BGA package without a lab full of equipment.
There is no shield you can use with the spark for USB host? I even found found a perfect spot where i could tap into the charger. I wouldn’t want to do it off the serial internal connection because I would like this to be an easy mod for most people.
Kenneth, you should follow the post :). I have, along with mapping the ARM chip outputs to the USB and an unconnected serial. For this to be a “non-surgical” mod it has to be usb or nothing at all. Roomba has a PS2 type connector which is really a TX and RX serial with ground and power on the exterior. So thats why its so easy for spark to work with it. Damn neato for removing the serial port.
yea hopefully its not too much, very little experience in embedded system programming but wouldn’t mind giving it a go. Just looking for the easiest way to get from Spark to a slave serial usb interface on the neato. Do you know if its just a matter of hooking up wires and just using native functions with the spark api or is it more than that?
Too bad they dont make a Serial to USB host that way i can send serial command to the device which in turn connects and sends to the neato
Sounds good i am gonna run some it by Andy, and i might just order one
Just throwing this in here for reference. This is how the neato shows up in a nix environment
May 27 16:41:54 raspberrypi kernel: [ 430.890271] usb 1-1.2: new high-speed USB device number 6 using dwc_otg
May 27 16:41:54 raspberrypi kernel: [ 431.000287] usb 1-1.2: New USB device found, idVendor=2108, idProduct=780b
May 27 16:41:54 raspberrypi kernel: [ 431.000323] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
May 27 16:41:54 raspberrypi kernel: [ 431.000342] usb 1-1.2: Product: Neato Robotics USB v2
May 27 16:41:54 raspberrypi kernel: [ 431.000359] usb 1-1.2: Manufacturer: Linux 2.6.33.7 with fsl-usb2-udc
May 27 16:41:54 raspberrypi kernel: [ 431.027894] cdc_acm 1-1.2:2.0: ttyACM0: USB ACM device
Program it independent to be a serial bridge sort of, have it wait for command on teensy serial interface which in turn passes back and forth through the usb and then just have the spark write and read to its serial port which is connected to the teensy? Thoughts?
Neat -> Teensy USB -> (Custom Arduino Code) -> Serial <- Spark Core Serial (Custom Spark Code)
Almost like a usb serial to serial bridge, that way eliminate any code porting or compatibility