Author Topic: Connecting PI-800 to VEC 200 - cable not recognised  (Read 6058 times)

Offline StefanN

  • Confirmed
  • New Member
  • *
  • Posts: 6
Connecting PI-800 to VEC 200 - cable not recognised
« on: July 29, 2021, 09:52:15 PM »
Hi,

I'm trying to connect the PI-800 software to a VEC 200 controller using the cable supplied by GM.   I'm using a laptop with Windows 10 freshly installed.   When I plug in the USB cable it doesn't appear under Device Manager

The cable has the CH340 chip in it and the cable has 4 wires (red, black, yellow green).  I've plugged the USB cable into 2 different laptops and it's not recognised on either.

Is it likely to be a duff USB cable (although not much to go wrong in it)?   Can I use another CH340 based USB cable and if so, what signal level is the VEC200 expecting?

Thanks

Offline StefanN

  • Confirmed
  • New Member
  • *
  • Posts: 6
Re: Connecting PI-800 to VEC 200 - cable not recognised
« Reply #1 on: July 31, 2021, 09:24:01 AM »
UPDATE.

The USB to TTL CH340 device arrived from eBay and works as expected - I plug it in and it appears in device manager as a COM port.   I run PI-800 and the COM port is selected in the drop down menu at the top.  So that suggests the lead from GM is faulty?

On that basis, I need to set-up the serial port with the right comms parameters (baud rate etc) and set the USB device to use the correct voltage (3.3V or 5V).   Can anyone point me to this info?

Thanks



Offline StefanN

  • Confirmed
  • New Member
  • *
  • Posts: 6
Re: Connecting PI-800 to VEC 200/240
« Reply #2 on: August 05, 2021, 08:20:30 PM »
I measured the resistance between V+ and GND on the cable and the two are shorted together, so I suspect the problem is with the regulator or a simple short somewhere.  Opening up the USB plug confirmed that the 5V to 3.3V regulator was not putting out 3.3V - at least I know the signal level is supposed to be 3.3V

So, to test the USB-Serial driver and USB adaptor I had bought on eBay, I wrote a simple Arduino programme to listen to the TX from the programming cable and to echo it back on the RX pin.  Then with a free comms utility I sent characters to the USB adaptor and got them echoed back as expected.   SO, the driver and cable all seem to be working....but I still can't get the PI-800 software to connect to the VEC.

I noticed a label on the controller says its actually a VEC-240 - not sure if that's significant.   For reference the board inside the controller is a Lingbo LBMC-HA3x-CON-V1.0  (2017-04-10).

If anyone has got PI-800 connected to a VEC controller, it would be really helpful if they could go to Windows Device Manager and right click on the USB-Serial Port device and choose properties - then click on the tab "Port settings" and let me know the baud rate, parity, stop bits and flow control settings that they find there.

thx

Offline StefanN

  • Confirmed
  • New Member
  • *
  • Posts: 6
Re: Connecting PI-800 to VEC 200 - cable not recognised
« Reply #3 on: August 09, 2021, 03:54:18 PM »
In case its useful to anyone else, I found this partial description of the comms protocol that PI-800 uses.   I hope to use it to check the comms link (using the echo command). 
https://github.com/SunnyWolf/goldenmotor_protocol

Offline StefanN

  • Confirmed
  • New Member
  • *
  • Posts: 6
Re: Connecting PI-800 to VEC 200 - cable not recognised
« Reply #4 on: August 12, 2021, 06:50:24 PM »
I got another USB to TTL adaptor from eBay and connected my laptop with the PI-800 software to another laptop running a serial comms terminal that allows me to read and send hex.  This second laptop was taking the place of the VEC240 controller.  When I started PI-800 and pressed connect, the other laptop received a "hello" message (0x66 0x02 0x00 0x68).  If I send a "reply" to the "hello", then PI-800 sent out a "read data" packet (0x66 0x10 0x00 0x76).

So, the Windows laptop running the PI-800 is working and sending packets successfully via the serial port.

I think that leaves:
- the comms signalling to the VEC240 is wrong (inverse?)
- the comms baud rate etc to the VEC240 are wrong.  Might be but there's no mention anywhere of any other settings other than the default 9600 baud, no parity, 1 stop bit and no flow control.
- the comms hardware in the VEC240 is broken
- the VEC240 is running some other software (but it has basically worked so seems unlikely)

surely it should be easier than this!!

Offline Fm@4motec

  • Confirmed
  • New Member
  • *
  • Posts: 4
Re: Connecting PI-800 to VEC 200 - cable not recognised
« Reply #5 on: August 30, 2021, 10:10:44 AM »
Hi, StefanN

If you are still trying to get in to the programming interface(pi 800), make sure you have some driver for the ch430 installed.
I think the driver is used as a kind of interface for the pi-800 software.
As far as I know the needed voltage output should be 3,3V, but you are aware of that.
I use a USB to TTL converter just like you and in my case there is a switch in the converter board itself that lets me change the supply voltage from 5V to 3,3V.

I am not sure if your are still trying to programm your VEC200 (or VEC240 as it were), or I missread and you are actually trying to do something different.
 
greetings,
FM

Offline StefanN

  • Confirmed
  • New Member
  • *
  • Posts: 6
Re: Connecting PI-800 to VEC 200 - cable not recognised
« Reply #6 on: October 11, 2021, 10:06:17 AM »
Hi FM,

Yes still trying to connect.  Thanks for your reply.

 I can monitor the serial comms (with an oscilloscope) from the PI 800 software to the VEC200 and can see the correct hex being sent for the opening "Echo/hello" message.  What I still don't know is whether it's using the correct serial settings.   In your CH340 driver config, please can you check the comms settings to confirm the baud rate, parity and stop bits.

Since I've not found any documentation about this, I assume it uses the default 9600, N, 1.   However that's not working for me.