Ramius
If it's the RS232 cable to the PC you are trying to lengthen try setting the RS232 baud rate slower.
As a rule reliability goes up when the baud rate is slower.
Norm
Ramius
If it's the RS232 cable to the PC you are trying to lengthen try setting the RS232 baud rate slower.
As a rule reliability goes up when the baud rate is slower.
Norm
Last edited by Normnet; - 7th August 2013 at 18:59.
Ed,
Sometimes that 3v/5v converter for the communication lines are not needed. Are you converting the SPI lines to 3v going into the sensor? For a long cable there are already losses. Try your setup without the DC/ DC converter.
Robert
"No one is completely worthless. They can always serve as a bad example."
Anonymous
Hi All!
Basically the sensor goes into a TXB0104 at 3v and from the TXB0104 at 5v into the PIC. I have been trying to extend the 5v side from the TXB0104 to/from the PIC with Shiftin and Shiftout. This has clearly been a problem for others after several hours of searching the internet and no one seems to have published a solution. From the PIC 18F1320 through a MAX232CPE into Com1 using the ICD in PicBasic Pro you can see all the readings. While very difficult to do I did manage to place a 47mfd tant. cap to the back of the sensor so it could not be any closer/shorter! Attached is the drawing. Ed
Last edited by Ramius; - 8th August 2013 at 03:17.
Hi Ed,
Personally I would not trust the 3.3V power supply setup you've got going there. The current consumption of both the sensor and the "A-side" of the TXB0104 will most likely not be constant meaning the voltage drop across that resistive divider will change resulting in an unstable 3.3V supply rail. Now, the cap you fitted obviously will help but I still don't think it's good solution. I'm not saying it will fix your issue but I would at least try with a proper 3.3V supply for the sensor and the A-side of the TXB0104 - at least to rule it out.
Also, make sure you have a decoupling capacitor on the VccB pin of the TXB0104. As you extend the cable length the capacitance of the cable increases, that capacitance will need to be charged and discharged by the driver circuitry in the TXP0104. It'll need proper decoupling.
Are you generating the 32.768Hz clock for the sensor with the CCP module in the PIC?
/Henrik.
Parallel a 0.1uF capacitor across the 47uF. Whilst the 10k pot to derive the 3V supply is very crude you show no decoupling of the 5V supply itself or the attached ICs - all of which are required.
The data lines to the PIC should be via twisted pair and, if necessary, decoupled to ground themselves.
Good advice on decoupling 5V, but not good advice about adding 0.1 uF across the 47 uF. In some instances, for example using a large electrolytic capacitor with high ESR/ESL this could help with high frequency noise, however tantalum devices are likely as good as the ceramic in this case, so this will not do anything useful and will drive you crazy trying to solder it on. Worse, in some cases, you could introduce instability with a second pole in the filter, so this approach should be used with caution. And adding caps to the data lines will reduce the range and degrade the signal - very bad idea. Also twisted pair will be more harmful than helpful in this instance, since the signal is unbalanced.
Honestly, the problem is most likely the poor 3V supply - fix that before investing any time in other approaches.
Bookmarks