New Controller desi...
 
Notifications
Clear all

New Controller design

131 Posts
26 Users
0 Reactions
44.7 K Views
Posts: 255
(@frankv)
Reputable Member
Joined: 17 years ago
buckanear wrote: The problem as I see it the dimming of a LED is not a linear function, instead a square law function. The current through a diode is not linear from off to full on. It follows a square law or near square law path. Intensity is dependent on current through the diode and not so much voltage. If you want to get a linear dimming of a diode you do not change the RMS voltage across the diode linearly. Your voltage steps needs to be logarithmic function instead of linear. Resolution steps alone will not do it. Now a logarithmic curve can easliy be stored in a table and addressed in 256 steps/512 steps/etc. This takes ROM space depending on how many bits needed to best fit the curve.

The first question to be answered is how is light intensity perceived by the human eye...

From http://www.telescope-optics.net/eye_spectral_response.htm

Eye response to signal intensity (brightness) is logarithmic for the most part (Weber's law). This means that the perceived signal strength is nearly in proportion to the logarithm of its actual strength (that is, illuminance). For point-like sources, the logarithm base is 100^0.2, upon which was built the familiar concept of stellar magnitude.

Looking at a MOC3023 as an example, fortunately the current is approximately exponential relative to voltage... (from the datasheet graph Fig 1, at 25C, 1.08V = 1mA, 1.2V = 10mA, 1.45V = 60mA). So perceived brightness will in fact be somewhat proportional to voltage.

100^0.2 ~= 2.511

So, if you want 255 levels of perceived brightness, you need to have steps of current I, I*2.511, I*(2.511*2.511), etc, up to I*(2.511^255) i.e. I*1E102). If I = 1 nanoAmp, then at full intensity you're supplying 1E71 TeraAmps!!! Obviously, 255 levels of perceived brightness isn't achievable.

Looking at a MOC3023 with a minimum current of .01uA and maximum current of 60mA (if I read the datasheet right), I figure you can get about 20 levels of perceived brightness. Empirically, my eye distinguishes about a dozen light levels.

I'm no expert in these types of calculations... it would be a good idea if someone was to check (and correct) my figures.

And, just to be difficult, the brightness of an LED varies greatly with angle... you would need your LEDs to be aligned in the same direction to be able to accurately control relative perceived brightness.


Reply
Posts: 1041
(@n1ist)
Noble Member
Joined: 19 years ago

Looks good. Just a few things that jump out to me:
- The 5v rail looks uncomfortably close to the fuse.
- I would move C2 closer to IC4 to reduce trace impedance
- Power traces to the drivers are a bit thin. Similarly with the ones for U$40
- I would add 100n bypass caps to the drivers and oscillator. General rule of thumb is one cap per power pin, right next to the pin.
- There are no mounting holes.
- On the AC input connector, top pin should be NEUTRAL
- I hate autorouted boards; there are many places where a little change will remove vias and make things cleaner

/mike


Reply
Posts: 183
(@buckanear)
Estimable Member
Joined: 15 years ago
dirknerkle wrote:But what is the TOTAL current that the chip can source/sink. If you're talking about 24 or more channels, can it accommodate the total draw if all outputs are on simultaneously -- not an uncommon desire...

Unlike most micro-controllers which have one one, maybe two VCC pins, the Spartan3 has at least one VCC/GND pair per I/O bank. These are separate from the main core VCC. Much like the processors within your PC or MAC.
Instead of looking at total current draw for the chip you have to consider the total current draw for the I/O bank. Xilinx does not specify the total current drain per IO bank that I can quickly see in the spec. It does specify how many IO pins can be simultaneously switching at the same time. That depends on the IO standard chosen, the drive current, the slew rate and the number of VCC/GND pairs per bank. Simultaneous switching is defined as ports changing in the same direction at the same time. This is to prevent transients on the supply rails more than it is a current restriction. It is obvious that as the slew rate increases the less ports can switch at the same time. In a nutshell at 24mA per port, LVTTL standard (3.3VDC), and quiet IO slew rate picked you can have 6 IO ports changing at the same time in the same direction per VCC/GND pair. For a fast slew rate this drops to 2 or 3 I/O ports.

The beloved 16F688 can have 25mA sink and source capability per IO pin, yet the whole of PortA can be only 90mA max and 95mA for the whole chip. That becomes obvious that safely only three ports on PortA can be on at the same time or switching at the same time in the same direction.The Spartan3A can do this also. Furthermore all designs for regulators to power the Spartan3A takes in account the maximum current drain per IO used and the total number of IO used. The recommendation for VCCIO on the Spartan3A in a 100 pin QFP is 1.5A minimum.

I am not saying that an FPGA is the Holy Grail. Instead as the original poster of this thread made note of, is there any way to reduce the number of individual PIC controllers? When I first saw the Renard64XC schematic that was my first question first thought. How to reduce the number of 16F688s and why so many? His recommendation was an HC08. I would think more along the line of MC9S12C32. I think that any other processor may very work better than maybe a FPGA. FPGA design has its pros and does carry a lot of cons with any design. The main part is they are current hogs. Then again to switch internally at speed up to 650MHz, you have to be current hog. It is something to keep in mind when doing a major redesign to consider.

just some thoughts to ponder

james


Reply
Posts: 3650
Topic starter
(@jhinkle)
Famed Member
Joined: 15 years ago
Originally Posted by Mat_Edwards
have a look at HCT541 to replace the HCT244. All inputs are on one side. It will make routing your board better and allow better Vcc tracks.
might make adding some de-coupling caps on or near IC1,2&3 feasible.

I looked hard for a part like the 541 - could not find a number part. I have replaced the 244 - makes the design much cleaner besides increasing drive from 6 to 8ma. Pic shows 74LS541 - Fixed label - should be 74HCT541.

Originally posted by n1ist

Looks good. Just a few things that jump out to me:
- The 5v rail looks uncomfortably close to the fuse.
- I would move C2 closer to IC4 to reduce trace impedance
- Power traces to the drivers are a bit thin. Similarly with the ones for U$40
- I would add 100n bypass caps to the drivers and oscillator. General rule of thumb is one cap per power pin, right next to the pin.
- There are no mounting holes.
- On the AC input connector, top pin should be NEUTRAL
- I hate autorouted boards; there are many places where a little change will remove vias and make things cleaner

Moved track as suggested.
Moved C2
Added bypass caps
Added mounting holes
AC Neutral was on top so I don't understand comment.
I don't use auto-route - all done by hand. 244 made it difficult to route. Replaced 244 with 451 - much cleaner.

On track size - driving all SSRs at the same time will require 120 ma.

Use the wire size calc:

http://circuitcalculator.com/wordpress/category/calculators/electrical-engineering/

200 ma on 1 oz cooper - trace 6 in long - ambient temp of 50f - want no more than 1f increase in temp - gives a trace width of .019. I am not taking inductance into account.

My track for the SSR power and ground is .050 in width - that seems a nice design margin - what am I missing - maybe the picture was mis-leading.

Track width to the cpu - power and gnd is .032.

Thanks for the comments - multiple eyes are better than one.

New layout attached.

LightController

Joe


Reply
Posts: 1041
(@n1ist)
Noble Member
Joined: 19 years ago

- The switch to the '541 sure cleans things up.
- The label above the neutral pin is mis-spelled.
- As for the power and ground traces, the reason you want them short and wide is to reduce the impedance, not for current capacity. It improves voltage stability, especially for digital parts that are flogging many outputs simultaneously. That's why you tend to find power and ground planes.
- I would add another 100n cap right next to IC4; regulators have an annoying habit of becoming oscillators all too easily. If it is not needed, you can always not load it.
- Do you need both C11 and C6?

- The whole idea of horizontals on one side and verticals on the other is just a rule of thumb; you don't need to follow that religiously if it isn't needed. For example, there are two vias on IC6P9 that aren't needed; the entire trace can be run on one side. Likewise, moving the debug header to above U$40 (which likely should get an ICn refdes instead) would let you stay topside for the traces from IC6 and IC7 and reduce the congestion below the processor.

- There are a few reference designators that need to be moved so they are not on top of pads or other silk, and I would add a note to the LEDs as to their function, if known (ie, PWR on the leftmost one)

/mike


Reply
Page 9 / 27
Share: