Thursday, June 21, 2018

Mainly debugging the CP2102 breakout boards, while the project itself seems to be functional

USB TO TELETYPE INTERFACE DEBUGGING

I received my replacement USB board (CP2102 board specified by the designer of the interface), plugged it into my two PC and one Mac systems, but it continues to be rejected as malfunctioning. I have wasted two hours doing shutdowns with battery removal for five minutes, restarts and other actions to try to get the board to talk to a PC of any type.

I hauled out my Surface Pro, yet another windows PC, and got the same error message. These little boards are s***t. I did order a brand new microUSB cable, just on the one in a million chance that my cables themselves are bad. We shall see.

Meanwhile, I need a plan B. The maker of the chip that is on the USB board has its own evaluation kits, which might get me some official support. Also, they are more likely to work than these low cost boards from China. The kit does not have the DTR and DSR pins connected, while the China board brings these out to the headers.

The interface design bridges DTR and DSR, but if the module is to work while loose, where they are not connected, then this seems superfluous. This is important because the evaluation kit boards from SiLabs do not bring out DTR or DSR to any accessible point. If I don't need them, then this board could be a suitable replacement.

Alas, the one feature that is required to run at 45 baud is called baud rate aliasing, and it is not supported by the newer CP2102N chip and the evaluation board. I would have to ensure I got a board with the original CP2102 chip to have this work. Before anyone suggests the rock solid FTDI based boards, they can't be configured below 214 baud.

There is such a board, but it is not the same form factor and connectors as the one from China. It will cost me about $35 plus shipping for this board and I might not be able to fit this into the case for the interface project since it depended on the small micro-USB board rather than this larger one.

I will wait for my new USB cable and continue to bash away at all the machines until I get one to accept the module. This is extremely frustrating when a single component isn't working and blocks progress on a larger, complex project that uses it.

I did a return of the module, second in a row that didn't work. I still have the first one, the unit where I had removed the angle pins and connected it to my board. I will use that as a final check with the new cable coming tomorrow.

Once the cable arrives and doesn't fix the problem, I will pull the trigger on the more expensive SiLabs evaluation kit board. I will then have to work out the technicalities of mounting the board since it does not match the holes established in my main PCB.

If my cable fixes it, I will stick the board back on my main PCB and test, of course. One way or another, I need a usable serial port operating at 45 baud to communicate with the project. I supposed I could go old-school and wire up a voltage translator and DB9 to use an actual serial port on an old PC, although there is no guarantee that the PC UART can operate at 45 baud so this is not a good alternative.

I decided to test my main board using a current limited power supply and some jumpers to trigger various conditions. The first is /SUSPEND, which should cause my Power LED to glow brightly. The second is TX, which should flash the Data LED. I can make various voltage and current measurements to prove out the rest of the board.

Discovered several things. First, the signals from the USB daughter card to the main PCB will be detected as high unless I ground them. They don't need 3.3V to activate. With /SUSPEND floating, it is high and my board powered up

Second, I discovered that the damned documentation for the project is wrong. The PCB has a triple LED module, three vertically arranged green lamps, claimed to signal Power, Motor and Data from top to bottom. Wrong! In fact, from top to bottom they signal Data, Motor and Power.

Grounding various pins on the PCB that would connect to the missing USB board, I confirmed that Power lights properly as soon as I flip on the on/off power switch. Now, for the voltage checkouts. Test points were provided on the board to test out its behavior. The main bus voltage should be 5V if the switch is on and the /SUSPEND line is high. I checked, pulling /SUSPEND to ground which validated proper operation. 5V when it should be, matching the Power LED.

When I ground RTS/CTS lines, the Motor LED lights.  Another deviation from the documentation which claims that Motor Control goes on when RTS/CTS is high, but in fact it only goes on when they are low. This is fairly useless as developed. I will think about adding an inverter between the USB board and the CTS/RTS lines, ensuring that this works as intended.

When I hook the TX incoming bit line to 3.3V, the Data LED turns on. Leaving it floating or at ground turns off the LED. However, while working on the board I noticed that my Power LED would blink off about once a second - the power draw went to zero coincident with those excursions. It appears that the internal power regulator is detecting overcurrent from the main bus and protecting itself in that periodic pattern.

The big question is why I am exceeding the current that this design should use. Time to check continuity and parts to look for possible issues. This may simply be due to an unconnected load and steady MARK or SPACE for relatively long durations.

I found a CP2102 board which has a full size (A) USB connector and all the requisite signals, although not matching the pins or outline of the twice defective board. I should have it on Saturday and can see if this can talk to Windows or OS X. If it works, then I can address the mounting challenges and use discrete wire to connect each signal to the main PCB board header pins. 

No comments:

Post a Comment