For the first time since you have started this thread I finally understand what you are meaning when you say you short tx and rx together on the router. So it wasn’t a loop back test, you aren’t unplugging anything, you are just shorting them on the breadboard with EVERYTHING STILL CONNECTED.
If the SSC-32 receives a query it WILL transmit a response. Nothing on the outside world would have any effect on the SSC-32’s right, permission, or ability, to bang these values out the serial port. For some reason the router is treating the reply from the SSC-32 differently than your processor.
This is Mike, the SSC-32 developer. Jim asked me to chime in with ideas on this.
If I understand the above description, the following sequence occurs:
Initially, the terminal window does not show any reply from the SSC-32 to queries;
The SSC-32 is disconnected from the circuit;
The router’s TX and RX are shorted together (invisible to the SSC-32);
Some messages are sent from the router, and appear in the terminal window due to the loopback;
The TX/RX short is removed;
The SSC-32 is reconnected;
Now the terminal window shows replies from the SSC-32.
Did I understand correctly?
In the above sequence, all the SSC-32 sees is that it is disconnected and reconnected. It doesn’t know about the shorted TX/RX, since that was only done on the router side.
The router, on the other hand, does see the short between TX and RX. It seems more likely to me that the above sequence causes a change to the router’s behavior than the SSC-32’s.
The behavior when you substitute an Arduino instead of the SSC-32 is still a mystery. I can think of 2 things that are different between the Arduino test and the SSC-32 test:
The response from the Arduino is different (returns “a is read!\n” rather than ‘0’ or ‘1’)
The timing of the response is different
In order to have a valid comparison, I would recommend changing the Arduino sketch to return exactly the same thing the SSC-32 does, just a single byte ‘0’ without a newline. The timing is harder to match exactly since we don’t know how long the Arduino takes to send its reply. But you can adjust the SSC-32 timing using the R1 and R2 settings to see if that has an effect.
The ultimate troubleshooting tool for an issue like this is a two-channel scope or a logic analyzer. Do you have the ability to directly observe the signals between the router and SSC-32?
Proud to have the help from the developer of this wonderful device.
Many thanks to Jim and others of Lynxmotion for the GREAT support they always maintain.
Absolutely.
I agree, and I’m very eager to know what this change is, that does not exist for Arduino. In a short time I’ll do this with a standard PIC to get free of the bootloader of Arduino too, toward a simpler setup.
This is part of the program I am developing to control the bot with Arduino. I altered it as you instructed, but at the first time I used “println()”, then removed it and repeated again. On the screen shot you see the Arduino sketch after removing “println()”. The neckEncoderPin is connected to a TCRT5000 sensor which is faced to a coded-wheel. I rotated the wheel by hand to get the 0 and 1’s. It is the neck of my robot.
Unfortunately I don’t have oscilloscope but I can ask from people who have it. Please instruct me and I’ll provide the technical information you need. (this will take some time, but I’m responsible and do all what needed to solve this thread).
I’ve suggested some trouble shooting with the router that might prove informative, but till it is done I’ll just speculate that the router rx line is floating high causing the router to have issues. The state of the arduino tx and ssc-32 tx when they start and operate may be different. If the arduino tx goes low (to ground) when it starts to transmit and between high bits, the router will be able to see the change in voltages. If the ssc-32 tx is at high impedance between bits with nothing to remove the voltage, the router rx line may stay high preventing the router from seeing any change in voltage. The touching of the tx and rx lines together probably makes some type of electrical change on either the router tx or rx lines (or both) that allows the router to see data and start its data collection. Not knowing anything about how the router serial port works or how the programming on the router imports the bits makes everything just a guess. I suggested putting a high resistance resistor on the router rx line to keep it low when not receiving data, but don’t know if it ever got tested.
Zoomkat, thank you for your support.
I didn’t forget about those question to measure rx/tx, I’ll soon publish information obtained.
For the moment, I’d like to mention that I have bought parts in double: two SSC-32, two routers, etc. so that to use for troubleshooting purposes. After this problem started, I opened a “brand new” router and tried it. So if the idea that rx line is floating high is right, then it is a design problem, as both routers have it. I can hardly believe such a design issue in WRT54GL (easily could be catched by the design team or revealed soon by professional users). Also, I tried with both serial ports of 0 and 1 in both routers and this yet with both my ssc-32 (I don’t have two arduino).
I tried to implement a software serial port to understand how Arduino handles the communication better, but failed. Source of information: arduino.cc/en/Tutorial/SoftwareSerial
I modified it so that to have two serial ports, to get commands from router with one port (ordinary one) and send them to ssc-32 (by software port).
Do you think that a standard PIC must behave the same as Arduino in this setup, or SSC-32?
Could you please tell me exactly what “high resistance” (volt?-amp?) to obtain to try this idea?
I will do all of these tests, but I more support the above mentioned idea of Mike:
You would connect a high value resistor between the router rx line and the router ground. I would try a resistor value of 47k ohms or higher to prevent the rx line from developing a voltage charge on it. The higher the resistance, the less the impact on the rx communications.
Ok, but I still don’t see where to place this 47k ohm resistor in my voltage divider. You can see my voltage divider wiring in my answer to one of your posts in the first page. Could you please tell me, exactly where to put it? As I think it is not right to take 12k one out!
Yes, after a second look, the rx is always tied to ground thru the 18k resistor, so the 47k probably won’t make any difference. I also notice tx0, tx1, rx0, and rx1, so I’m not really sure how he has this thing wired up. Is the arduino also connected to tx1/rx1, or is it tied to tx0/rx0? Which tx/rx pins are shorted to make the setup work? A lot of questions haven’t been answered, so I think I’ll take a rest on this one.
I mentioned before: I always “completely” replace one with the other, as Arduino is playing a role of toubleshooter only. I just repeat exactly the same scenario, with one or the other.
Well, the other thing to try is connect the 47k resistor between the tx and ground on the router like below. When your router boots up, there is electrical activity on the router tx line as indicated by the led activity on the ssc-32. This may be causing some issue.
I’ve think I’ve had a previous brush with an open collector setup. If the “open collector” is the same as I remember in the past, it will sink or source current/voltage depending on what the connected gizmo wants. One probably could test for this using a multimeter in the voltage measuring mode. If it is a problem then a diode or transistor setup could make it single direction.
I don’t have such detailed specs, and I don’t know much about the chip-set but only that the processor is Broadcom. I’m currently struggling with flu. I’ll return to this as soon as I debug flu from me out