[Sanity Check] RS485 PWM-Slave

Go To Last Post
11 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey freaks,
I proudly present my first completly self made schematic :)

Project: It will be a LED cube private, build 3 times tops, maybe presented to university as bachlor thesis. Lacking money I'll prolly solder everything on breadboards.

One computer science student programms a GUI
another cs student programms a USB-RS485 Bridge using an USBKey. I'm a electronic engineering student and provide the hardware part.

The GUI generates animations, sends it via USB to the Bridge which is acting as a RS485 master and sends the pictures slightly compressed to my PWM slaves.

The cube will be build of 1000 two color LEDs. To drive it I need 210 independant PWMs. Unable to find matching silicon I build my own ones. I'm currently using M644s which I programm in ASM.
Here is my schematic and a sketch of my 485 protocol, called cBus.

Can anyone find some major or minor flaws in my design?
Can I run into problems with my ISP connection? Did I choose PNP/NPN types in my powerstage corrrectly? Is my style of schematic drawing good? Should I put some fuses in it somewhere?

I'd like to use some 7805 types as power supply. Maximum 200 LEDs will be turned on at the same time. If each draws 20 mA I'll need like 4 A. Prolly more because of multiplex.
Is it a good idea to wire some 7805 parallel? (using protection diodes to prevent current flowing into the output) All 5 V voltage regulators I found so far supply max 1 or 2 A or cost me like 50 bucks :/

PS: labels like "0a" or "5b" are the software PWM output

PPS: after clicking on the thumbnail: a click on the picture enlarges it again

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wow, that is lots of work!! Any chance we can see a demo of the finished product?

Quote:
Lacking money I'll prolly solder everything on breadboards.

Laying out your power bus seems like a challenge - distributing your four amps! I got blasted on here once for suggesting 7805's in parallel. I am not an EE. You are so maybe you can see some way to use a separate power bus and common ground to distribute your load. Using a common source for your 7805 input and then grouping your LEDs (your largest load) in a separate bus perhaps).

John

Just some guy

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Deleted part, I have misunderstood the schematic.

So you plan to use the RS485 as a one-way bus right ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

right

@john: ah thanks, it's so easy^^ I get my "primary" 5V out of a PC power supply. For micros etc it's a bit unstable so I use 7805s.
For the power stage it should be good enough. So no regulator for Vcc at all :)
(no connection between GND_micro and GND_pwr-stage)

We'll definatly present pictures and videos.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

no one?

I repeat my questions one time:

Quote:

A)Can anyone find some major or minor flaws in my design?

B)Can I run into problems with my ISP connection?

C)Did I choose PNP/NPN types in my powerstage corrrectly?

D)Is my style of schematic drawing good?

E) Should I put some fuses in it somewhere?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Your choice of sync values is a bit suspect - one would expect the data payload to contain all ons and all offs. Try something less prevalent. Why do you not use DMX512?

For power distribution, either have two 5V rails - one for logic the other for the leds, or run a higher voltage rail and have local regulators for the logic. Be sure your 0V wiring is large enough as it will have to cope with the led current as well.

Fuses or other forms of circuit protection, yes. Remember the fuses are there to protect the wire, so the location and size of the fuses depend on how you intend wiring it. If powering from a PC supply that will easily give you 20+amps, i'd suggest you have fusing otherwise your wire will act as the fuse.

Your transistors are wrong!

NPN to switch the 0V, E to 0V. BC547
PNP to switch the VCC, E to VCC, BC557

Why the reset circuit? The AVRs have built in brown out and reset timers onboard. Tie the reset signal high via a resistor - you need this signal for ISP

No thanks for posting the circuits on popup freakin central.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Kartman,
The payload does carry all ons and offs. The sync is ment to syncronize all slaves. Without it everyone starts displaying his new data as soon as it is received. In my model they buffer the payload and output is all together when a sync arrives.
Well, maybe I skip this and hope the eye won't recognize.

Reset circuit: I want to be able to reset it via a switch. The diode etc is for protection from EMI.

Thank you very much for the other hints. I'll use the forum pic upload next time.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I understand the reason for the sync, but your choice of sync chars is poor. I mention DMX512 as it has a specific way of doing the sync by using a break.

How does your diode in the reset circuit protect you from EMI?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The reset line has no protection diode to VCC as all others do. This to allow the 12V needed for high voltage programming.

IIRC the diode is recommended in an appnote.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yup, besides the switch and LED it's copy and paste from Atmel.

Why is my char a bad choice? My protocol never uses FF at all. To make any allowed Byte FF there need to be at least 6 Bit swapped to 1. Well, ok a Sync Byte could be corrupted and cause a picture loss.
I'm not sure if it's worth the extra recources to avoid this (starting a timer after each received Byte, writing timer ISR)
Are there other downsides to my sync method?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If 0xFF is unique, then I see no problem using it as a sync character. But I would not use sync,cbus_ctrl,sync. Far easier to use sync,sync,cbus_ctrl, or just sync,cbus_ctrl.

That way you have a unique start of packet you can easily reset everything on. With your method you do not know if the sync is before of after the control word if one of the sync gets lost.