Extension board · Controls and displays

LED bar, 8 lamps

A row of eight indicator LEDs. Seven follow seven controller pins, so each can be a status lamp switched by a G-code command. The eighth shows power unless you move a solder link to make it copy a pin or an external signal.

Top view of the LED bar board: a ten-contact socket on the left and right edges and a row of eight small LEDs.
Top view, drawn from the board’s design files. This is a drawing, not a photograph.
8 LEDsseven green and one red
7 outputscontacts 3 to 9, high = lit
about 1.2 mAper LED, simulated
LED 8power, pin 3, pin 9 or external
2 socketstype Y input and chain
100 × 60millimetres, four M3 holes

Tech specs

PurposeA status or level display near a machine panel, or checking that socket pins switch. Not a safety indicator
LEDsD1 to D7 green on contacts 3 to 9; D8 red on a selectable source. Each has a 1 kΩ resistor
Supply3.3 V, under 10 mA in total
External inputJ3, 3.3 V maximum, through 1 kΩ
SocketsTwo 10-contact Gadgeteer type Y sockets (Samtec SHF-105, 1.27 mm): input and chain
Size100 × 60 mm, four M3 holes on a 90 × 50 mm pattern
Works withSmoothieboard V2 Prime header GF through switch modules
LicenceOpen hardware, CERN-OHL-S-2.0

Every figure with its basis is in the electrical specifications appendix; hole positions are in the mounting dimensions appendix.

Board tour

The numbers on the drawing match the list below it. The board is shown from the component side.

  1. 1
    Input socket Y IN (J1) — Seven signals on contacts 3 to 9.
  2. 2
    Chain socket CHAIN (J2) — Next board; all signal links are open as delivered.
  3. 3
    Lamps 1 to 7 (D1 to D7) — Lamp 1 follows contact 3, and so on to lamp 7 on contact 9.
  4. 4
    Lamp 8 (D8) — Red; shows 3.3 V as delivered.
  5. 5
    Lamp resistors (R1 to R8) — 1 kΩ each.
  6. 6
    Lamp 8 selectors (JP31 to JP34) — Close exactly one: power, contact 3, contact 9 or external.
  7. 7
    External input (J3) — Pin 1 signal, pin 2 ground. Never above 3.3 V.
  8. 8
    All-lamps link (JP20) — Common return of every LED; open it to switch all off.
  9. 9
    Chain links (JP3 to JP9) — Open as delivered.
  10. 10
    Mounting hole — One of four M3 holes.
Point at a number, or tap it, to read what the part is; the same text is in the list. On a small screen, scroll the drawing sideways.

Pinout

Check contact numbering with the power removed before wiring by hand.

J1: input socket (Y IN)

ContactSignalLampPrime header GF
13.3 VLamp 8 as power light3.3 V
25 VPassed to the chain5 V
3P31PB1
4P42PJ4
5P53PA4
6P64PG0
7P75PJ3
8P86PG1
9P97PJ2
10GNDReturnGND

J3: external input for lamp 8

PinSignal
1Signal, 0 to 3.3 V
2Ground

What you need

A socket with seven free pinsPrime header GF.
A ten-way cable1.27 mm Gadgeteer ribbon cable.
A configuration entryOne switch for each lamp you use.

Get started

Minimum wiring: contact 1 to contact 1, 3.3 V; PB1, contact 3 to contact 3, lamp 1; PJ4, contact 4 to contact 4, lamp 2; contacts 5 to 9 to contacts 5 to 9, lamps 3 to 7; contact 10 to contact 10, ground. Prime header GF (J37) LED bar J1 contact 1contact 13.3 V PB1, contact 3contact 3lamp 1 PJ4, contact 4contact 4lamp 2 contacts 5 to 9contacts 5 to 9lamps 3 to 7 contact 10contact 10ground
A straight ten-way cable makes all connections.
  1. Mount the board

    Use the four M3 holes.

  2. Connect with the power off

    Plug J1 into header GF.

    On power up lamp 8 should light.

  3. Add the configuration

    Add one switch per lamp as below and restart.

  4. Test

    Send M820, then M821.

    Lamp 1 should come on and go off.

Configuration

You wantModuleExample
Switch a lamp by commandSwitchThe entry below
Show a level or progress barNoneSend the commands from your own script

Add one block of settings per lamp to config.ini. This example drives lamps 1 and 2:

[switch]
lamp1.enable = true
lamp1.output_pin = PB1
lamp1.output_type = digital
lamp1.input_on_command = M820
lamp1.input_off_command = M821

lamp2.enable = true
lamp2.output_pin = PJ4
lamp2.output_type = digital
lamp2.input_on_command = M822
lamp2.input_off_command = M823

The other lamps use PA4, PG0, PJ3, PG1 and PJ2 with their own names and unused command numbers. Switches turn off when the machine halts unless configured otherwise. See the switch module.

How it works

Each pin lights its own LED through a resistor. Contacts 3 to 9controller pins 1 k eachlimit current D1 to D7lamps JP20to ground JP31 to JP34source for lamp 8 R8 1 klimit current D8red lamp JP20to ground
Seven direct lamps and one selectable lamp.

A pin driven high sends about a milliampere through its LED, a light load for a controller pin. A socket carries only seven signals, which is why the eighth lamp takes its source from a link.

Solder links

To change what lamp 8 shows, open JP31 and close exactly one of JP32, JP33 or JP34. Closing a chain link makes the next board see the same signal.

Solder links as delivered: JP3 open; JP4 open; JP5 open; JP6 open; JP7 open; JP8 open; JP9 open; JP20 closed; JP31 closed; JP32 open; JP33 open; JP34 open. JP3 · openchain contact 3 JP4 · openchain contact 4 JP5 · openchain contact 5 JP6 · openchain contact 6 JP7 · openchain contact 7 JP8 · openchain contact 8 JP9 · openchain contact 9 JP20 · closedall lamps JP31 · closedlamp 8: power JP32 · openlamp 8: pin 3 JP33 · openlamp 8: pin 9 JP34 · openlamp 8: external
The links as delivered. Close one with a small blob of solder across both pads; open it by removing the solder or cutting the copper between the pads.
LinkWhat it doesAs delivered
JP3Joins contact 3 to the chain socketOpen
JP4Joins contact 4 to the chain socketOpen
JP5Joins contact 5 to the chain socketOpen
JP6Joins contact 6 to the chain socketOpen
JP7Joins contact 7 to the chain socketOpen
JP8Joins contact 8 to the chain socketOpen
JP9Joins contact 9 to the chain socketOpen
JP20Connects every lamp to groundClosed
JP31Lamp 8 shows 3.3 VClosed
JP32Lamp 8 copies contact 3Open
JP33Lamp 8 copies contact 9Open
JP34Lamp 8 follows J3Open

Chaining

All seven signals light lamps here, so their links ship open. Close a link only to share that signal.

The controller's ribbon cable goes to the connector Y IN of the LED bar board. Inside the board each of the ten pins runs through a solder link to the connector CHAIN, where a second ribbon cable continues to the next board. A closed link passes its pin on, an open link stops it. Controller one ten-pin port LED bar board Y IN CHAIN pin 3, lamp 1 stops here pin 4, lamp 2 stops here pin 5, lamp 3 stops here one solder link per pin Next board sees what is passed on
Chaining: one port of the controller serves two boards. Pin 1 of Y IN leads to pin 1 of CHAIN, pin 2 to pin 2, and so on, each through its own solder link. The three lines stand for the ten pins and show the links as delivered. Two boards must never drive the same pin, and a pin that one board uses for a signal is not free for the next. Each signal stops here until you close its link.
ContactSignalOn CHAIN
1, 2, 10Power and groundPassed on
3 to 9Lamps 1 to 7Stopped by open links

Troubleshooting

SymptomLikely causeWhat to check
No lamp lightsJP20 open or no powerCheck JP20 and test point 3.3 V
Only lamp 8 lightsNo command or wrong pinCheck the configuration names and pins
Lamp 8 darkNo selector closedClose exactly one of JP31 to JP34
Two lamps move togetherSame pin configured twice, or solder bridgeCheck configuration and soldering
Light Meaning
Green D1 to D7 The matching contact is high
Red D8 Selected source is present (power as delivered)

Still stuck? Read how to ask for help or see the general troubleshooting guide.

Downloads

FileWhat it is
Schematic (PDF)The circuit diagram
Parts list (CSV)Every component with its value, footprint and part number where one is chosen
Board drawing (PNG)The top view used on this page
3D view, top (PNG)Rendered from the design files
3D view, angled (PNG)Rendered from the design files

Appendix: mounting dimensions

For drilling a mounting plate or designing an enclosure. Positions are hole centres, in millimetres, measured from the top-left corner with the board seen from the component side.

Mounting drawing of the LED bar board, component side: outline 100 by 60 millimetres with 4 mounting holes. Hole positions are listed in the table below. COMPONENT SIDE · millimetres 100 60 0, 0 X Y 1 5.00, 5.00 2 95.00, 5.00 3 5.00, 55.00 4 95.00, 55.00 Numbered rings are mounting holes. Positions are hole centres, X then Y, from the marked corner.
Board outline 100 × 60 mm, corners rounded to a 1 mm radius, board thickness 1.6 mm. Drawn from the design files, component side up, in the same orientation as the board tour.
HoleX (mm)Y (mm)DiameterUse
15.005.003.2 mm, not platedMounting, M3 screw
295.005.003.2 mm, not platedMounting, M3 screw
35.0055.003.2 mm, not platedMounting, M3 screw
495.0055.003.2 mm, not platedMounting, M3 screw

Appendix: electrical specifications

Every figure is a design value, a calculated or simulated value, or a manufacturer’s data sheet value, as the last column says. A dash means no figure is given.

ParameterApplies toLowerNominalUpperBasis
Supply3.3 V—3.3 V—Design
Current per lampContacts 3 to 90.4 mA1.2 mA2 mASimulated; limits used for the check
Total currentAll lamps——10 mACalculated
External inputJ30 V—3.3 VDesign

Component stress limits

PartLimitUse on this board
External input voltage3.3 VNever apply 5 V
Controller pin loadAbout 1.2 mA per lampAdd any load sharing the pin

Appendix: simulation

One lamp circuit was simulated with ngspice.

Each simulated value (yellow mark) against its allowed range (green band). LED current per pin1.17 mA
Simulated value (yellow) against the limit used for it (green). Each bar has its own scale.
ResultSimulated valueLimitOutcome
LED current per pin1.17 mA400 µA to 2 mAWithin

Not simulated: brightness and LED colour spread, because no LED part number is fixed.

Appendix: datasheet

No data sheet is linked: the LEDs and resistors are generic parts chosen by size and value.

See all boards on the extension boards page.

This is a wiki! If you'd like to improve this page, you can edit it on GitHub.