cuspaceflight / avionics14

5 stars 2 forks source link

Status indication #9

Open adamgreig opened 10 years ago

adamgreig commented 10 years ago

If the mission control team could add a couple of bits to the schematic that would be great. We'll definitely need these but I forgot to mention them when we originally wrote down all the parts of the schematic.

Wizongod commented 10 years ago

Adam, I'm not sure about how to do the indicator lights. I'm assuming we don't want to load the pins from the microcontroller, so I've used the CMOS configuration to turn on a green LED when sent a high and to turn on a red LED when sent a low. I'm assuming the power supply (batt) will be around 7 volts for the resistor values. Could you have a look at it and tell me what you think? Also, I can't seem to run the ERC. It always gives me 0 errors and warnings, with the only message: "Item not annotated: C? Annotation required!" and that's it.

adamgreig commented 10 years ago

Loading the microcontroller pins is fine. Just something like the pin, a 100R resistor, the LED and ground works no problem.

You need to run annotation before ERC - the button right near the ERC button that gives actual designations to each part instead of just "C?", "R?" etc. Once annotated you can run the ERC.

Wizongod commented 10 years ago

Ok, so can I assume that the microcontroller pins and sink AND source about 10mA? That would allow us to run a red and green LED with each pin. And is the logic high 3.3V?

adamgreig commented 10 years ago

Correct, but that configuration means one LED or the other must always be on -- given we should have plenty of pins I'd just go with one LED per pin. Logic high is 3.3V yes.

adamgreig commented 10 years ago

That said, if the green LED was fairly dim (large resistor) and the red one reasonably bright, that might be quite a nice way to indicate OK/error status.

Wizongod commented 10 years ago

That would require quite a lot of tweaking with the resistor values though. I have no idea what values might result in bright or dim results. I've just modified the schematic to use one pin one LED, since we have enough. I suppose lighting both red and green could be considered as a third type of error message if needed.

adamgreig commented 10 years ago

As a rough rule of thumb a 1k resistor will give a dim indication light and a 100R resistor will lead to quite a bright light, on standard sort of 0603 size LEDs. But one per pin works too.

adamgreig commented 10 years ago

Being able to just flash one colour of LED is useful too (e.g. slow/fast flashing green or green flashes for activity indication) so that's probably worth keeping.

Wizongod commented 10 years ago

I've just run the ERC and found just 3 of my pins disconnected despite clearly connecting them to hierarchical pins (didn't save the annotation). I tried re-wiring those again, but it just doesn't want to connect for some reason. They're on the microSD card slot. The other pins are working fine though. Could it be that it's because they just don't have pull-ups or pull-downs?

adamgreig commented 10 years ago

Are they connected like...

 _
  |
  |<=Label
 _|

i.e. with the label connecting to a vertical line segment? they have to connect to horizontal line segments, like

_
 |
 o---<=Label
_|
Wizongod commented 10 years ago

it's a pin directly to a 1 grid spacing wire directly to a label: ==o---<label

adamgreig commented 10 years ago

It's possible the pin itself is slightly off the grid if the part is custom and the pin placed when the grid was set to something larger. Try dragging the SD card socket symbol itself (press 'G' while the cursor is over it, or right click > drag) and check that the wires all stay attached to the pins when you move it around.

Wizongod commented 10 years ago

It actually does! Still getting the "ErrType(2): Pin not connected (and no connect symbol found on this pin)" problem though...

adamgreig commented 10 years ago

Okay. It sounds like this is because nothing else is connected on the other end of the label. If you put an NC flag on the wire, or if you go up one sheet and place the hierarchical label there and the NC on that, it should work out.