Utilize Teensy pins for Section Control

Is it possible to add some code to be able to use pins 11, 12, & 13 on the Ampseal that espose Teensy pins to control relays?

I only need 3 relays so it would eliminate a whole board.

These would be to direct drive the low side of the relays, not I2C in this case (which would completely eliminate the 3 relay limitation…?)

1 Like

The Teensy pins can’t handle more then 3mA, not enough for a relay coil but it should work with one of those cheap relay boards from China. The tricky part is finding a relay module that is compatible with 3.3V signal. I have some that are and some that stay on because 3.3 isn’t high enough to register as HIGH (the module’s expecting 5V).

Then the firmware would need modifying to parse the Machine PGNs etc.

You could use optocouplers and aditional power source. Teensy will trigger optocouplers and aditional power source would be used for relays… just an idea.

A relay board like this works with 3.3V signals but it needs 5V for the relay coils (a 12v would be handier). It’s coil power (5V) can be separate from the signal (still common ground).


Likely it’s 4ch version also works

I have a LM2596 and relay board with optocouplers already, i just don’t know what’s needed in the code for the section control to light up green and operate when it’s the Teensy that’s running it.

Like most code I imagine it being much easier than it actually is, but I figured I’d ask in case there’s not a whole lot to it.

I’ve been working on a Machine control class/library that I think is ready for testing but I’m planning to be busy planting. It should be pretty easy to add to the existing firmware. When are you hoping to test?

Have you verified that your relay board works with 3.3v?

You’ll need to jumper those three Teensy pins to the ampseal pins and be very careful not to damage your Teensy.

I could test whenever and just roll back if needed as long as there isnt any other harm…?

I havent studied the pcb yet, do I have to run jumpers from the Ampseal and solder right to the pins?

I’d be curious to at least look thr code over if you’re willing to share.

1 Like