Thank you for your answer Ray.
I have no problem in controlling the HB-25 from a PC (via a USB Servo Controller).
However, the Position Controller of the kit have precisely the role of motion controllers and I would like to use them if possible (they are able to control a HB-25 and use some information from the position encoders).
In a nutshell, I would like to find a way to interact with the Position Controllers from a PC via USB (in order to control speed, acceleration, but also get finer position control and feedback).
Hello,
I have been searching like crazy, and I have found an adaptor that could maybe work to connect from USB to the Position Controllers:
Basic ATOM Nano USB2Serial Adapter #B0083 http://www.basicmicro.com/Basic-ATOM-Nano-USB2Serial-Adapter_p_35.html
Like the Position Controllers, it is using a 1 wire bus, but I am not sure that it is the exact same concept.
The 3 pins of this adapter are defined as:
SER pin is a bidirectional serial I/O (Transmit bidirectional serial data, CMOS drive output 5VDC, TTL input 5VDC)
RES is the reset control pin (Controls target RESET pin, 5VDC output)
GND is the common (VSS).
However, in the case of the Position Controller, the 3 pins are defined as:
DATA, Communication line used to send and receive data Connect to single-wire UART bus
+5V Regulated DC Supply Voltage (VCC)
GND Common Ground
Could someone please confirm or refute that this adapter is compatible with the Position Controllers?
Thanks,
Alexandre
It looks like the Basic ATOM Nano USB2Serial Adapter should work. You'd have to make some connection adapter since the pins don't match up. You'd connect the SER pin of the Adapter to the DATA pin of the Controller and you'd connect the two GND pins together.
Look at the schematic for the Basic ATOM Nano USB2Serial Adapter. You'll see that it uses what's called diode logic to implement an OR gate between the transmit output of the FTDI chip and the receive input of the chip with SER connected to the receive input. When the transmit line is high (idle), it's effectively disconnected. When it's low, it pulls SER low. That's exactly what you want.
It looks like the Basic ATOM Nano USB2Serial Adapter should work. You'd have to make some connection adapter since the pins don't match up.
I am not sure I understand when you say that "the pins don't match up". If I understand you correctly, I have to connect "the SER pin of the Adapter to the DATA pin of the Controller", +5VCC pin to +5VDC pin, and GND to GND, which are in the same order on the adapter side { SER, VCC, GND } and on the controller side { DATA, VDC, GND }.
If this does work, it could be an idea for Parallax to have a similar and tested item in store.
For the record, here are links to two other relevant discussions on a related topic, which I have discovered after I had started this thread:
There is no +5V pin on the position controller side. DO NOT try to connect the +5V pin on the Adapter to any pin on the position controller.
Thank you for the warning, as this is what I would have done...
But now I am lost, and feel my lack of knowledge in electronics.
On the controller side, the three pins are { DATA, +5 VDC (Regulated DC Supply Voltage), GND }. Should'nt this "+5 VDC" pin get connected to something for the controller to get any power? The problem lies probably in the fact that I do not understand the difference between the "+5 VDC" pin of the controller and the "5 VCC / RES" pin of the adapter (the name of this pin varies: VCC on the picture, RES in the documentation).
Thank you again for your time.
Cordially,
Alexandre
The adapter provides a limited amount of current at approximately 5V (5V VCC or Vdd). This current comes from the PC's USB port and is limited to 100mA when the USB serial port is active. Depending on how the adapter is designed, it may provide up to 500mA after it negotiates this with the PC. Unless you know how much the controller draws at 5V and how much the adapter can supply, it's best for you to have a separate 5V regulated power supply that is designed to supply the amount of power that the controller requires. There are all sorts of AC powered +5V regulated supplies available that would work.
Note that RES is very very different from VCC. Most Parallax microcontrollers use their reset input to force the microcontroller into download mode. The adapter's RES output is intended to connect to the reset input for this purpose.
Dear G Nag,
No, I did not have sufficient time to dig more into this issue, and I ended up doing without the position controllers (also due to the fact that I had doubts concerning to their ability to allow driving straight and then turning smoothly without having to stop in between).
However, I am still very much interested in a documented way of how to use them...
Thanks to Mike Green for the support so far.
Best regards,
Alexandre
Thank you Mike Green and Alkarex
I'll dig into this issue until it is solved and tested. Then I'll make a simple documentation for it.
Alkarex: I just want to make sure. Did you buy the Nano USB2Serial Adapter and didn't work?
or you just didn't have time to try it? I'm planning on trying it first.
Alkarex: I just want to make sure. Did you buy the Nano USB2Serial Adapter and didn't work?
or you just didn't have time to try it? I'm planning on trying it first.
No, I did not try the USB to serial due to my doubts that even if this communication worked, the position controllers might not be working as I intended.
I ran across a couple of your posts while searching for a solution to the same problem. If you have come up with a solution, please let me know! If not, I am working on it and I think that the key is to find or create a class that will write to usb without any drivers (or perhaps a generic driver) . Then we can do the usb/serial conversion to send the commands to the position controller via the single line UART. It is indeed becoming a lot more complex then I ever imagined!
Hello princeplanet,
For the time being, I am not using the position controllers at all, which is a pity indeed. I do not really understand why Parallax is not clearer about the matter :frown:
Best regards
Comments
PC-->[custom software]-->motion controller --> HB25 --> motor... would be the top level
where [custom software] becomes
... --> usb (or serial) bidirectional interface--> command interpreter --> motion controller driver --> ...
I have no problem in controlling the HB-25 from a PC (via a USB Servo Controller).
However, the Position Controller of the kit have precisely the role of motion controllers and I would like to use them if possible (they are able to control a HB-25 and use some information from the position encoders).
In a nutshell, I would like to find a way to interact with the Position Controllers from a PC via USB (in order to control speed, acceleration, but also get finer position control and feedback).
Any suggestion?
Best regards,
Alexandre
I have been searching like crazy, and I have found an adaptor that could maybe work to connect from USB to the Position Controllers:
Basic ATOM Nano USB2Serial Adapter #B0083
http://www.basicmicro.com/Basic-ATOM-Nano-USB2Serial-Adapter_p_35.html
Like the Position Controllers, it is using a 1 wire bus, but I am not sure that it is the exact same concept.
The 3 pins of this adapter are defined as:
- SER pin is a bidirectional serial I/O (Transmit bidirectional serial data, CMOS drive output 5VDC, TTL input 5VDC)
- RES is the reset control pin (Controls target RESET pin, 5VDC output)
- GND is the common (VSS).
However, in the case of the Position Controller, the 3 pins are defined as:Could someone please confirm or refute that this adapter is compatible with the Position Controllers?
Thanks,
Alexandre
Look at the schematic for the Basic ATOM Nano USB2Serial Adapter. You'll see that it uses what's called diode logic to implement an OR gate between the transmit output of the FTDI chip and the receive input of the chip with SER connected to the receive input. When the transmit line is high (idle), it's effectively disconnected. When it's low, it pulls SER low. That's exactly what you want.
I think I will give this adaptor a try then.
I am not sure I understand when you say that "the pins don't match up". If I understand you correctly, I have to connect "the SER pin of the Adapter to the DATA pin of the Controller", +5VCC pin to +5VDC pin, and GND to GND, which are in the same order on the adapter side { SER, VCC, GND } and on the controller side { DATA, VDC, GND }.
If this does work, it could be an idea for Parallax to have a similar and tested item in store.
For the record, here are links to two other relevant discussions on a related topic, which I have discovered after I had started this thread:
All the best,
Alexandre
Thank you for the warning, as this is what I would have done...
But now I am lost, and feel my lack of knowledge in electronics.
On the controller side, the three pins are { DATA, +5 VDC (Regulated DC Supply Voltage), GND }. Should'nt this "+5 VDC" pin get connected to something for the controller to get any power? The problem lies probably in the fact that I do not understand the difference between the "+5 VDC" pin of the controller and the "5 VCC / RES" pin of the adapter (the name of this pin varies: VCC on the picture, RES in the documentation).
Thank you again for your time.
Cordially,
Alexandre
The adapter provides a limited amount of current at approximately 5V (5V VCC or Vdd). This current comes from the PC's USB port and is limited to 100mA when the USB serial port is active. Depending on how the adapter is designed, it may provide up to 500mA after it negotiates this with the PC. Unless you know how much the controller draws at 5V and how much the adapter can supply, it's best for you to have a separate 5V regulated power supply that is designed to supply the amount of power that the controller requires. There are all sorts of AC powered +5V regulated supplies available that would work.
Note that RES is very very different from VCC. Most Parallax microcontrollers use their reset input to force the microcontroller into download mode. The adapter's RES output is intended to connect to the reset input for this purpose.
No, I did not have sufficient time to dig more into this issue, and I ended up doing without the position controllers (also due to the fact that I had doubts concerning to their ability to allow driving straight and then turning smoothly without having to stop in between).
However, I am still very much interested in a documented way of how to use them...
Thanks to Mike Green for the support so far.
Best regards,
Alexandre
I'll dig into this issue until it is solved and tested. Then I'll make a simple documentation for it.
Alkarex: I just want to make sure. Did you buy the Nano USB2Serial Adapter and didn't work?
or you just didn't have time to try it? I'm planning on trying it first.
I ran across a couple of your posts while searching for a solution to the same problem. If you have come up with a solution, please let me know! If not, I am working on it and I think that the key is to find or create a class that will write to usb without any drivers (or perhaps a generic driver) . Then we can do the usb/serial conversion to send the commands to the position controller via the single line UART. It is indeed becoming a lot more complex then I ever imagined!
For the time being, I am not using the position controllers at all, which is a pity indeed. I do not really understand why Parallax is not clearer about the matter :frown:
Best regards