How do i

I have looked at the learning pages for the sparkfun sx1509 expander guide… and in many places it states that it can either be set up for sink current or source current. in fact, it goes as far as to say that for LEDs, it is better to set it up as a sink current, because that mode can handle more current (15ma vs 8ma).

HOW DO I SET IT UP FOR SINK CURRENT?

i am an idiot. i am incredibly dense. i cannot find anywhere in that guide how to actually set up the device for sink current. (or at least i do not see it explained for a simpleton) please explain to me, as if i am a 3 year old with a learning disability, step by step, what i have to do to use it as a sink current device.

thanks.

Hi, have you already studied the ‘Source Vs Sink’ paragraph of this hook-up guide? Have you studied the respective diagram?

https://learn.sparkfun.com/tutorials/sx … 1641299999

It’s how you connect the LEDs. The diagram in tepalia02’s link show how.

When sinking, drive the pins low to turn on the LEDs, when sourcing, drive the pins high to turn on the LEDs.

Thanks both for your replies…

I have read the guide on setting up the device, and i have read the specific paragraph on sink vs source.

there is one specific sentence in the guide: “Sinking Current: analogWrite(, <0-255>) assumes that the LED is hooked up in a current-sinking fashion – meaning the LED’s cathode (negative pin) is terminated into the SX1509. Thus, analogWriteing to 255 will actually pull the pin LOW, and 0 will set it HIGH.”

HOW does one SPECIFICALLY wire an LED this way using the sx1509? since the sx1509 has two rows of pins, the fritzing diagram is actually kind of vague as to which row of i/o pins is actually connected to the breadboard and “active”.

I am concerned about this because in “source mode” on the sx1509 each pin can handle 5ma load, but every LED i have seen lists 20ma draw, and i don’t really want to burn out this board driving each pin on the expander at 4x its rate.

@tim.senecal

The inner row of the SX1509 breakout board is attached directly to the SX1509 pins; that is colored GREEN on the fritzing diagram for the LED hookup. That is where you connect the LED cathode to. The other side of the diode (anode) is connected to a resistor, and that resistor is connected to the supply voltage. The resistor is what sets the current drawn into the LED; the 20mA draw is probably the maximum current for the LED; as long as you have a proper sized resistor everything should be fine.