![]() ![]() So I'm coming hat in hand to ask if someone can help me through by explaining exactly why the Mega was known to have reset issues with the first revisions of the ethernet shield, so I can at least have an understanding of how the resets work. I've read this forum a tonne and reviewed every old post relating to W5100 and issues with reset routine on the Mega, and tested lots of theories. When I plug the red board back into my old prototype stripboard on the Nano, it works like a dream. I have tried to figure out exactly what caused it to work when it did, but it's seemingly random. I literally can't get the thing to ping from a remote machine, let alone get MQTT working. ![]() I've gone to the following lengths: replaced ethernet cable, pulled apart my prototype and started from scratch, stripped the sketch back to its minimum code just for Ethernet and MQTT, tested with Arduino sketch for web server (can't get even this to work), and experimented with delays in the setup routine and even manually resetting the ethernet board by wiring it up to a tie-high resistor and switch and setting up the sketch to wait for me to reset then initialise ethernet library. The problem seems to be related to the reset process, but it's intermittent and therefore hard to pin down. In short, randomly after some change I made it stopped - and I've thrown literally HOURS of testing at the problem but haven't gotten to the bottom of it. ![]() No overheating, no random crashing, and apparently full reliability. Using this procedure my sketch worked beautifully for a week. After some googling I removed the reset line from ethernet board to Arduino during upload, replaced it after upload finished, then hit the physical reset button on the Arduino. I started having problems uploading the sketch. When I ported over to the Mega 2560, it worked when I used the correct pins: Mega 50-52 for SPI and Mega 10 for chip select. It seems safe to say there are no electrical issues with the red ethernet board for this reason. The red ethernet board and Nano V3 still work a treat. (See attached image.) Previously I used this board with my MQTT project using the standard ethernet library and the knolleary Arduino Client for MQTT on a Nano V3. I'm using the W5100 "red" breakout board purchased on eBay with a Mega 2560. With a view to the above, please be kind and help me to explain it better if I didn't manage! I'll try to explain my problem properly, but I've been struggling so hard with it over the last week and I know I haven't actually fully understood the problem, let alone managed to work out how to start solving it. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |