Electronics > Beginners
Creating controller for LED display, help / review needed
(1/12) > >>
muktupavels:
I am trying to create controller for LED display (p10 hub12 led modules). The main/biggest problem is that I have no knowledge in electronics (probably not exactly true at this point). The whole thing consists of following parts:
[PC] -> [A male to B male USB cable] -> [USB to RS485] -> [shielded cat5e cable] -> [Controller] -> [LED display]

I have managed to write PC software, create USB to rs485 adapter and controller in way that does work in my home, but it did not work as expected when test controller was connected to real display. There was two visible problems:
- communication with controller somewhat worked once and then it completely stopped working.
- controller restarted at random times.

First cat5e cable shield is not connected, I expect that this is one of all problems. Otherwise my guess is that problem is noisy environment (car service). Trying to communicate with controller RX led was blinking too fast and received data was not usable. The only way I could reproduce something similar at home is plugging monitor or notebook power adapter into extension cord in way that produces sparks.

Searching I found that I might need pull-up resistor for reset pin. By adding it controller no longer restarts (in way I was able to reproduce it without resistor). Controller was saying that it was external reset and datasheet says that RESET pin has internal pull-up resistor. Why does extra pull-up resistor seems to solve restarting problem?

Both PCBs are single sided and are created so I could etch them at home. Are PCBs created so badly that I am just lucky that it works? The end goal is to use double sided boards (home etched boards was meant only for testing), any recommendations with what should I keep in mind when I will try to redo PCBs with two layers?

Help is needed with shielding, it is currently unconnected, because I simply have not understood how to do it / seems that there are multiple ways to do it... On USB to RS485 I have added place / option to connect shield to GND with small capacitor. I really have not understood if that is good way to do it. If I understand correctly then shield should be connected only at one end so it seems that I should connect shield at controller side, because usb device might be unconnected and then shield would not be connected or that should not be problem?

What should I do with extra / unused pairs in cat5e cable? Is it ok to leave unconnected them? Reading about RS485 somewhere I read that unused wires should be connected to GND with resistor, unfortunately seems I have not saved link about it.

Do I need to provide any extra info?
Lt_Flash:
In regards to RESET - it's usually not sufficient to have only internal pull-up enabled, usually you would have something like this, with a button, for a RESET to work properly and to have a bit of debouncing for push-button. Pull-up is usually 10k-100k, but with this MCU I used a much higher one because MCU allows to do so and this is ultra low-power design. Basically, this is based on Atmel's reference designs for their evaluation boards.
capt bullshot:
I'd strongly recommend you to connect the USB and CAT5 cable shields to GND, using a solid ground plane, on both ends. One can see often other strategies to connect the shield, from my experience the solid GND connection is the only one that works reliably. Maybe (depending on your setup) an isolation may be required to break a ground loop from the PC to the LED display.

For the unused pins of the CAT5 cable, one could connect them to GND, or just leave them open. More GND is most cases a good choice.
muktupavels:

--- Quote from: Lt_Flash on May 02, 2018, 06:24:03 am ---In regards to RESET - it's usually not sufficient to have only internal pull-up enabled, usually you would have something like this, with a button, for a RESET to work properly and to have a bit of debouncing for push-button. Pull-up is usually 10k-100k, but with this MCU I used a much higher one because MCU allows to do so and this is ultra low-power design. Basically, this is based on Atmel's reference designs for their evaluation boards.

--- End quote ---

I don't use reset button, only thing that is connected to RESET is PDI. I have no problem adding pull-up resistor, 10k seems to work, but I would like to understand what might have caused RESET pin to go bellow 1.32V to trigger RESET. Or maybe it is not only RESET pin, but all power has dropped too low? But then should not chip report that it was brown-out reset not external?

I guess I should remove pull-up and make sure that brown-out is enabled and see if controller will report now that it is brown-out reset not external reset...


--- Quote from: capt bullshot on May 02, 2018, 07:53:04 am ---I'd strongly recommend you to connect the USB and CAT5 cable shields to GND, using a solid ground plane, on both ends. One can see often other strategies to connect the shield, from my experience the solid GND connection is the only one that works reliably. Maybe (depending on your setup) an isolation may be required to break a ground loop from the PC to the LED display.

--- End quote ---

Well almost every time I read about and RS485 I see that shield should be connected only at one end. So I am even thinking about using unshielded connector at USB to RS485 adapter side to make sure that it is never connected at both ends.

Also the problem is that I have not understood how to properly connect shield to GND, because it seems that I should not connect it directly to GND. Is small cap "right" thing to do?


--- Quote from: capt bullshot on May 02, 2018, 07:53:04 am ---For the unused pins of the CAT5 cable, one could connect them to GND, or just leave them open. More GND is most cases a good choice.

--- End quote ---

So one pair for A and B and all other directly to GND?
Lt_Flash:
Yes, that's quite strange, I've checked the manual and it says "The RESET pin includes an internal pull-up resistor" and it's a 25kOhm resistor, which is more than enough to keep it steady. You can check reset status register after such reset occurs to see the cause of it.  Maybe that was a WDT reset? I got cought by that when I was starting with Atmel SAM devices, WDT was enabled by default and was resetting the device every 16 seconds.
Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod