Extension board · Outputs and power

Infrared remote emitter

Two infrared LEDs for sending remote-control signals to a camera, fan or lamp. One controller pin switches both. The firmware can produce a 38 kHz carrier on that pin, but it cannot yet send coded remote commands: that needs your own driver.

Top view of the infrared emitter board: a ten-contact socket on the left and right edges and two round infrared LEDs near the bottom edge.
Top view, drawn from the board’s design files. This is a drawing, not a photograph.
940 nmtwo Vishay TSAL6200 LEDs
about 76 mAsimulated peak per LED
17°LED half angle
High = onPWM on contact 7
5 Vabout 155 mA with both on
50 × 50millimetres, four M3 holes
The radiation is invisible. Do not stare into the LEDs at close range; the optical safety class of the board has not been assessed.

Tech specs

PurposeSending infrared signals to appliances. Not an optical data link or safety device
LEDsTwo Vishay TSAL6200, 940 nm, each with its own 47 Ω 1 W resistor
Control3.3 V PWM on contact 7 through 100 Ω; 100 kΩ pull-down keeps the LEDs off
Supply5 V from the socket
IndicatorRed LED shows activity
SocketsTwo 10-contact Gadgeteer type P sockets (Samtec SHF-105, 1.27 mm): input and chain
Size50 × 50 mm, four M3 holes on a 40 × 40 mm pattern
Works withSmoothieboard V2 Prime header GD (PWM1_2)
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 P IN (J1) — PWM on contact 7, 5 V on contact 2.
  2. 2
    Chain socket CHAIN (J2) — Passes the unused contacts on.
  3. 3
    Infrared LEDs (D1, D2) — Upright as drawn; the leads may be bent to aim them.
  4. 4
    LED resistors (R1, R2) — Large 47 Ω parts rated to carry the current continuously. They get warm.
  5. 5
    Switch transistor (Q1) — AO3400A MOSFET switching both LEDs.
  6. 6
    Gate resistors (R3, R4) — Series resistor and pull-down.
  7. 7
    Supply capacitor (C1) — 10 µF on 5 V.
  8. 8
    Indicator (D3, R5) — Red LED, lit with the infrared LEDs.
  9. 9
    LED link (JP20) — Closed as delivered; open it to switch the indicator off.
  10. 10
    Chain link (JP7) — Open as delivered, keeping the PWM signal off the chain.
  11. 11
    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 (P IN)

ContactSignalUsePrime header GD
13.3 VPassed to the chain only3.3 V
25 VLED supply5 V
3 to 6Passed throughNot usedPE7, PD8, PB11, PE9
7PWMHigh = LEDs onPE11 (PWM1_2)
8, 9Passed throughNot usedPE13, PE14
10GNDGroundGND

What you need

A PWM socketPrime header GD contact 7.
A ten-way cable1.27 mm Gadgeteer ribbon cable.
A way to see infraredMany phone cameras show it as a faint glow.
Your own code senderNeeded to control an appliance.

Get started

Minimum wiring: contact 2 to contact 2, 5 V; PE11, contact 7 to contact 7, carrier; contact 10 to contact 10, ground. Prime header GD (J35) IR emitter J1 contact 2contact 25 V PE11, contact 7contact 7carrier contact 10contact 10ground
Three connections.
  1. Mount the board

    Aim the LEDs at the appliance’s receiver.

  2. Connect with the power off

    Plug J1 into header GD.

  3. Add the configuration

    Use the entry below and restart.

    By design the LEDs stay off at start.

  4. Test the output

    Send M812 and look through a phone camera, then send M813.

    The red LED should light while the carrier is on, and go out afterwards. This sends a bare carrier, not a command the appliance understands.

Configuration

You wantModuleExample
Produce a 38 kHz carrier for testingSwitch with hardware PWMThe entry below
Send remote-control codesNoneNo SmoothieV2 module encodes infrared commands

Add this to config.ini:

[pwm1]
frequency = 38000

[switch]
irsend.enable = true
irsend.output_pin = PWM1_2
irsend.output_type = hwpwm
irsend.startup_value = 0
irsend.default_on_value = 33
irsend.input_on_command = M812
irsend.input_off_command = M813

The frequency applies to every output on PWM timer 1, so do not share that timer with fans or heaters that need another frequency; if your file already has a [pwm1] section, check what uses it first. default_on_value is the duty cycle in percent. Choose other command numbers if these are in use. See the switch module.

How it works

One transistor switches two LED and resistor branches from 5 V. J1 contact 7carrier Q1switch D1, D2940 nm light 5 Vfrom socket R1, R2set current D1, D2to Q1
Control path above, power path below.

A remote-control signal is a series of bursts of a carrier, usually 36 to 40 kHz. The pin switches both LEDs at that rate. At one-third duty the simulated average is about 25 mA per LED with peaks near 76 mA. The resistors are sized so that an output stuck on stays within the LED continuous rating.

Solder links

Leave JP7 open while the emitter is in use. Open JP20 if the indicator is unwanted.

Solder links as delivered: JP7 open; JP20 closed. JP7 · openchain contact 7 JP20 · closedindicator LED
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
JP7Joins contact 7 to the chain socketOpen
JP20Powers the indicator LEDClosed

Chaining

A further board on CHAIN can use contacts 3 to 6, 8 and 9. Allow for this board’s share of the 5 V budget.

The controller's ribbon cable goes to the connector P IN of the infrared emitter 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 infrared emitter board P IN CHAIN pin 7, PWM stops here pin 8, free passed on pin 9, free passed on one solder link per pin Next board sees what is passed on
Chaining: one port of the controller serves two boards. Pin 1 of P 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. Pin 7 stops here; pins 8 and 9 are wired straight through.
ContactSignalOn CHAIN
1, 2, 10Power and groundPassed on
3 to 6FreePassed on
7PWMStopped by open JP7
8, 9FreePassed on

Troubleshooting

SymptomLikely causeWhat to check
Nothing lightsNo 5 V, wrong pin, or configuration not loadedTest point 5 V; check the startup messages for PWM errors
Red LED lights but camera shows nothingCamera filters infraredTry another camera, often the front one
Appliance ignores the boardA bare carrier carries no commandUse a driver that sends the appliance’s code
Short rangeLEDs aimed awayBend the leads towards the receiver
Light Meaning
Red (D3) Infrared LEDs being driven

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 infrared emitter board, component side: outline 50 by 50 millimetres with 4 mounting holes. Hole positions are listed in the table below. COMPONENT SIDE · millimetres 50 50 0, 0 X Y 1 5.00, 5.00 2 45.00, 5.00 3 5.00, 45.00 4 45.00, 45.00 Numbered rings are mounting holes. Positions are hole centres, X then Y, from the marked corner.
Board outline 50 × 50 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
245.005.003.2 mm, not platedMounting, M3 screw
35.0045.003.2 mm, not platedMounting, M3 screw
445.0045.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
SupplyJ1 contact 2—5 V—Design
Peak current per LEDD1, D2—76 mA—Simulated
Average current per LED, one-third dutyD1, D2—25 mA—Simulated
Total current, both on5 V—155 mA—Simulated
Indicator currentD3—1.5 mA—Calculated
WavelengthD1, D2—940 nm—Vishay data sheet
Half angleD1, D2—17°—Vishay data sheet
Resistor power if held onR1, R2—0.27 W—Simulated

Component stress limits

PartLimitUse on this board
LED forward current100 mA continuousAbout 76 mA if held on
LED resistors1 W0.27 W
Capacitor10 V5 V

Appendix: simulation

The LED drive was simulated with ngspice at 38 kHz and one-third duty with a hand-fitted diode model.

Each simulated value (yellow mark) against its allowed range (green band). Peak LED current75.8 mA Average LED current at one third duty25.2 mA Resistor power if held on270 mW
Simulated value (yellow) against the limit used for it (green). Each bar has its own scale.
ResultSimulated valueLimitOutcome
Peak LED current75.8 mA60 mA to 95 mAWithin
Average LED current at one third duty25.2 mA15 mA to 35 mAWithin
Resistor power if held on270 mWat most 500 mWWithin

Not simulated: optical range, beam pattern, eye safety and temperature rise.

Appendix: datasheet

The first page of each manufacturer data sheet. Click a page to open the PDF.

First page of the TSAL6200 infrared emitting diode datasheet
TSAL6200 infrared emitting diode — Vishay, 5 pages.
First page of the AO3400A N-channel MOSFET datasheet
AO3400A N-channel MOSFET — Alpha and Omega Semiconductor, 5 pages.

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.