|
|
View previous topic :: View next topic |
Author |
Message |
icesynth
Joined: 03 Sep 2007 Posts: 32 Location: Edmonton, Alberta
|
18F67J60 Ethernet Link Problem... |
Posted: Mon Sep 03, 2007 3:06 pm |
|
|
Hi!
I am having a problem getting the 18F67J60 Microcontroller Ethernet to link up. I have tried 3 Ethernet switches, the only one that will cause a link to start is a D-Link DSS-8+, even then the link will come up erratically, lasting no more than 1 second.
What I find strange is that the board is drawing 25mA with the Ethernet module disabled, and about 37mA with the Ethernet module enabled, when in the spec sheet the Ethernet module is rated to draw 130mA even without any transmit activity. The board was being powered directly from a linear power supply @ 3.3V for the current measurement, not through the switching regulator.
What I am using:
Microcontroller: PIC18F67J60
Clock: 25MHz
On-Chip ENVREG Enabled
PCB-Version 4.049
PCM-Version 4.049
PCH-Version 4.049
CCS TCP/IP Stack/Library ( UDP Example Code ), PICEEC Selected.
Here is a link to the schematic of my development board:
https://www.sylvertechnologies.ca/users/chris/www/Files/Persist/Protel_-_Sylver_Technologies_NTM_0707002.pdf
Test point voltages:
TP1=3.30V
TP3=3.29V
TP4=1V
TP5=3.29V
TP6=1V
I'm not sure if it is a hardware or a software problem:confused:
Does anyone have any ideas about what the problem is? Or has anyone had something similar to this happen?
Thanks,
--Chris Burchett--
I am releasing the schematic into the public domain for non-commercial use, feel free to distribute and use as you see fit, but please give me credit
[ Document link updated to reflect file path change - 2008/10/02 ]
Last edited by icesynth on Thu Oct 02, 2008 7:10 am; edited 1 time in total |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Tue Sep 04, 2007 5:21 am |
|
|
You have either inadvertently disabled the Ethernet module or you have a hardware fault on the transmit side.
To rule out a software configuration problem, erase the PIC and retest the current consumption figures. This ensure the Ethernet module is enabled (reset default).
A common mistake with these projects is the incorrect connection between the PIC and the RJ45 connector. If you have ruled out software, then this is where I would look first. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
icesynth
Joined: 03 Sep 2007 Posts: 32 Location: Edmonton, Alberta
|
|
Posted: Tue Sep 04, 2007 12:33 pm |
|
|
Thanks for the reply, it pointed me in the right direction. It turned out that the wrong transformer was ordered, and the one used had a slightly different pinout
Thanks for the help _________________ Programming for the the real world.
--Chris Burchett
Sylver Technologies Inc. |
|
|
icesynth
Joined: 03 Sep 2007 Posts: 32 Location: Edmonton, Alberta
|
|
Posted: Fri Feb 15, 2008 6:21 pm |
|
|
Sorry to resurrect an older topic, but I have new problems with the Ethernet link...
Everything was working fine, until I used a long Ethernet cable in my application!
A little background:
- The software is using the CCS TCP/IP Stack to send out a UDP packet every 15 seconds to a server on the network, the packet contains raw data from the temperature sensor in ASCII format.
- Using the PIC18F67J60 with the Ethernet module enabled.
- Everything works fine when a CAT6 Ethernet cable shorter than 6 meters is used.
- Board power draw is about 150ma while on.
The problem:
When a CAT5 or CAT6 Ethernet cable over 6 meters is used, the PIC unit appears to link up, but will fail to communicate. It appears that the unit is sending un-corrupted packets because the switch is receiving them and has an CRC error count of 0, but the PIC unit does not appear to receive the packets being sent to it.
Extent of problem: Verified problem exists with 15 different boards.
Any ideas on what I should try?
Has anyone come across this type of problem before? _________________ Programming for the the real world.
--Chris Burchett
Sylver Technologies Inc. |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Fri Feb 15, 2008 6:43 pm |
|
|
Check you are using the correct bias resistor and check that you have correctly wired the rj45. Make sure you have not transposed the receive pair. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
zilot
Joined: 21 Nov 2006 Posts: 16
|
|
Posted: Wed Sep 24, 2008 8:12 am |
|
|
Is ferrite bead necessary ? On this image, will circuit work without it, just connected to Vcc=3.3v at the middle point of resistors? I have problem to make this circuit working, I haven't put that ferrite at all, and have connected that point on 3.3v, it hangs, there stands that voltage differences at TPout+ and TPout- is produced by current differences at that pins. I checked several times RJ45 transformer output and according to its datasheet (and measured resistance on the PCB side, it should be working, resistances are R=0 between TPout+-, and between TPin+-). Do ethernet LEDs should be blinking when connect to LAN?
|
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Wed Sep 24, 2008 8:51 am |
|
|
As note #2 in your drawing says, the ferrite bead is to prevent the Ethernet signal from leaking onto the 3.3V supply rail and then radiating as EMI. Without the bead your Ethernet should still work fine, just you might have some difficulty getting FCC approval of the end product. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
Guest
|
|
Posted: Wed Sep 24, 2008 10:27 am |
|
|
SherpaDoug wrote: | As note #2 in your drawing says, the ferrite bead is to prevent the Ethernet signal from leaking onto the 3.3V supply rail and then radiating as EMI. Without the bead your Ethernet should still work fine, just you might have some difficulty getting FCC approval of the end product. |
Thanks
So it should be enough to connect that middlepoint to 3.3v directly, right?What I am confused about is how voltage difference at TPout+- is achieved. If they act as current sources, then connection to 3.3v is necessary to obtain bias current through TPout+-, when it enters mode for transmission it will alternate current through TPout+- and via resistors and capacitor make voltage difference. |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Wed Sep 24, 2008 11:22 am |
|
|
Yes a direct connection is fine as far as the Ethernet connectivity is concerned.
TPout+ and TPOUT- are alternately pulled low by current sources. The 49.9 Ohm resistors are just to establish a line impedance and eat standing waves. (That 1% resistor spec is industry standard, but really excessive. The wire impedance isn't that tightly controlled, so the resistor tolerance is moot.) _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
zilot
Joined: 21 Nov 2006 Posts: 16
|
|
Posted: Wed Sep 24, 2008 12:02 pm |
|
|
So, due to high frequences, middle point of resistors can be considered as ground (AC sweep), and current of TPOut+- goes through 49.9 resistros and 1:1CT. If you say 49.9 resistors are for stand waves eliminating, it means that voltage on TPOut+- is obtained by internal structure of transmission gate, right? just small amount of current goes through 1:1 CT transformer , and huge goes through 49.9 resistors. What happens if resistors are not 49.9 but 100 for example, it should lead less current than, and 1:1CT more, or it will increase TPOut+- voltage difference?
Thanks |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Wed Sep 24, 2008 12:21 pm |
|
|
When TPOUT- is pulled low current flows in the center tap, through the bottom winding, into TPOUT-, and to ground. This causes TPOUT+ to be driven high by the mutual inductance of the transformer windings to a theoretical max of 6.6V. Each of the 49.9 resistors now has 3.3V (max) on it and therefore a little current flows through the resistors. The majority of the current is through the transformer.
If you double the resistors you might save a little current, but depending on the length of your wire and your bit rate you could have signal reflections traveling on the wire adding to or subtracting from the driven signal and distorting the signal at the receiver. This is bad. It is best to stay with resistors that match the line impedance as seen through the transformer, in this case likely 50 Ohms. You could probably use 51 Ohm 5% resistors, or maybe 47 Ohm 10% resistors. But don't stray too far from 50 Ohms. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
zilot
Joined: 21 Nov 2006 Posts: 16
|
|
Posted: Wed Sep 24, 2008 11:51 pm |
|
|
Thanks, now it is clear |
|
|
zilot
Joined: 21 Nov 2006 Posts: 16
|
|
Posted: Thu Sep 25, 2008 1:57 am |
|
|
That point of 3.3v was whole problem, I didt conect and there where no bias current to ethernet moduel, now it works nicely. The problem one can have here is RJ45 connector with transformer isolation. The scematic drawn in example book is not proper for some type of these connectors, firstly I connected according to schematic, but CviLux RJ45 has different pinout, I spent a lot of time searching for this part data sheet and finaly found, so this is the image
and this is mechanical description with pinout for foot print.
Again I didnt put ferrite bread, and connected PICs TPOut-+, and TPIn-+ versus on the tutorial schematic, so this can be pluged directly into PC. As I know switches recognises crosses devices, so this works with no cross over cable at all. |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Thu Sep 25, 2008 4:25 am |
|
|
Quote: | If you say 49.9 resistors are for stand waves eliminating, it means that voltage on TPOut+- is obtained by internal structure of transmission gate, right? just small amount of current goes through 1:1 CT transformer , and huge goes through 49.9 resistors. What happens if resistors are not 49.9 but 100 for example, it should lead less current than, and 1:1CT more, or it will increase TPOut+- voltage difference? |
Basically, the twisted pairs have 100 ohm termination (50+50) at both ends, as you can eaysily see from the respective receiver circuit at the near end. Neglecting transformer leak inductance, the differential current source has a load of 100 ohm local termination (differentially) in parallel with terminated 100 ohm transmission line. For longer cable lengths, it's clearly advisable to keep this both side terminated configuration. Otherwise, the connection would much less reliable, even if it works in most cases. The driver strength is well considered for this kind of termination, also for the losses expectable with cables up to 100 m CAT 5.
Quote: | As I know switches recognises crosses devices, so this works with no cross over cable at all. | It would be bad design practise to rely on that assumption, to my opinion. But, it may be a means to stay in contact with your customers.
Unfortunately, there are at least two different pin configuration of integrated magnetics RJ45 jacks in use. So you have to care for an exact part specification for production. |
|
|
zilot
Joined: 21 Nov 2006 Posts: 16
|
|
Posted: Thu Sep 25, 2008 7:54 am |
|
|
This was just experiment, because I want to switch on ethernet LAN communication between hardware and PC in SCADA system for some industrial process. So far I've made systems with modbus, with 18f4520 and I'm not quite satisfied, especially in noisy environment cable infrastructure became more critical. It is messy to implement good modbus stack, one I use is from CCS, and it had a lot of bugs I had to correct. This way with ethernet is elegant, there are ready made cables, connecting points (switches, routers)....TCP protocol as guaranteed for good performances.
Any advices (tricky parts) about such systems with 18F67J60 family? What about immunity on noise, experiences with distances etc....... CAT5 CAT7 should provide good insulation. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|