HDC2450 serial communication
12 years 2 months ago #29525335
by klick
HDC2450 serial communication was created by klick
I\'m having issues communicating via serial port on a HDC2450. I\'ve used the USB port with no issues, i connect directly from linux inside my program, send commands, that works fine. I wired up the 3 wires (ground, tx, rx) to a serial port, and can\'t get it to work. the HDC2450 seems to be the first to require 115200 8N1 no flow control, which i\'ve tried those settings, don\'t work. I tried the settings for the older models, don\'t work. I\'m no stranger to rs-232 and serial programming, i\'ve tried 3 different USB to serial adapters, all different chipsets, none work.
So, i dunno, also i know hte tx of my serial port needs to be connected to the rx of the Roboteq device, although in desperation I tried both setups. I tried 3 different ground points.
The USB works but has EMI issues, out of all the USB devices, it\'s the only one affected by them, and they are extremely minor. Firing off a relay that pulls 2 amps from a 12 volt source knocks the USB offline. I even attached the relays to a different battery, grounds where connected though, and that made it last about 3 times of turning it on and off, but they it knocked it off too. I figured the serial connection would be more reliable and not have to worry about the strange USB chip in the roboteq. In linux it shows up as /dev/ttyACM0, which i\'ve never seen out of any USB serial type connection, i have no idea what usb chip they are using. Should of used an FTDI one, they are very reliable...
So is 115200 8N1 no flow definitely right? I tried 8E1, 7E1, 7N1, i dunno, every combination i could think of.
Any help would be nice, thanks.
So, i dunno, also i know hte tx of my serial port needs to be connected to the rx of the Roboteq device, although in desperation I tried both setups. I tried 3 different ground points.
The USB works but has EMI issues, out of all the USB devices, it\'s the only one affected by them, and they are extremely minor. Firing off a relay that pulls 2 amps from a 12 volt source knocks the USB offline. I even attached the relays to a different battery, grounds where connected though, and that made it last about 3 times of turning it on and off, but they it knocked it off too. I figured the serial connection would be more reliable and not have to worry about the strange USB chip in the roboteq. In linux it shows up as /dev/ttyACM0, which i\'ve never seen out of any USB serial type connection, i have no idea what usb chip they are using. Should of used an FTDI one, they are very reliable...
So is 115200 8N1 no flow definitely right? I tried 8E1, 7E1, 7N1, i dunno, every combination i could think of.
Any help would be nice, thanks.
Please Log in or Create an account to join the conversation.
- roboteq
12 years 2 months ago #29525341
by roboteq
Replied by roboteq on topic Re:HDC2450 serial communication
115200, 8bit, no parity, one stop bit is definitely correct.
All you should need for communication is 3 wires: RxD, TxD, ground.
You must connect pins 2 to 2, 3 to 3 and 5 to 5 on the 25-pin connector of the HDC and the 9-pin connector of the serial.
Check that your serial port is working by first just making a wire jumper from pin 2 to 3 on the 9-pin connector (withoug the controller attached). This will cause the Tx data to go to the Rx. So you should see the sent characters echoed back.
Also, immediately after power up, the controller will send the string \"Starting....\" pause and then \"FID=Roboteq v1.2 09/04/2010\". You should be able to view this as long as the controller Tx channel works and your serial adapter & software are OK.
All you should need for communication is 3 wires: RxD, TxD, ground.
You must connect pins 2 to 2, 3 to 3 and 5 to 5 on the 25-pin connector of the HDC and the 9-pin connector of the serial.
Check that your serial port is working by first just making a wire jumper from pin 2 to 3 on the 9-pin connector (withoug the controller attached). This will cause the Tx data to go to the Rx. So you should see the sent characters echoed back.
Also, immediately after power up, the controller will send the string \"Starting....\" pause and then \"FID=Roboteq v1.2 09/04/2010\". You should be able to view this as long as the controller Tx channel works and your serial adapter & software are OK.
Please Log in or Create an account to join the conversation.
12 years 2 months ago #29525345
by klick
Replied by klick on topic Re:HDC2450 serial communication
Well I got it working, connecting the RX to TX was a good way to test. I hadn\'t enabled software flow control properly, after i fixed that it started working.
I\'ve only tested for a few minutes, but i\'m having no EMI issues, i\'m controlling 4 relays which connect to hydraulic solenoids to direct the flow of hydraulic fluid. The motor commands work with the digital outs telling it which direction to go, no issues so far. I got a few bugs on my side i need to finish.
I gotta say, so far this controller is nice, I love the watchdog with serial commands as well, if my computer locks up and my throttle is at 100% that would be very bad, i haven\'t found any other controller that does that in this size range. since my controller is hooked upto 2 motors that are 8hp continuous rated, locked up throttle would be bad. Anyway, that doesn\'t have anything to do with my serial issue, just thought it was a nice feature and i like the controller so far.
Thanks,
Ross
I\'ve only tested for a few minutes, but i\'m having no EMI issues, i\'m controlling 4 relays which connect to hydraulic solenoids to direct the flow of hydraulic fluid. The motor commands work with the digital outs telling it which direction to go, no issues so far. I got a few bugs on my side i need to finish.
I gotta say, so far this controller is nice, I love the watchdog with serial commands as well, if my computer locks up and my throttle is at 100% that would be very bad, i haven\'t found any other controller that does that in this size range. since my controller is hooked upto 2 motors that are 8hp continuous rated, locked up throttle would be bad. Anyway, that doesn\'t have anything to do with my serial issue, just thought it was a nice feature and i like the controller so far.
Thanks,
Ross
Please Log in or Create an account to join the conversation.
Moderators: tonysantoni
Time to create page: 0.057 seconds