Load Module & Default states on Raptor of pins for failsafe

Problem is, every relay briefly engages on reset, then normal function.

I am using the Raptor, with load modules to control a Triac Relay, which in turns controls a motor starter.
I initially started out with a FEZ Cerberus, doing the same task, using a straight breakout board to control the Triac’s, but because the control wire would go thru a power cabinet, things like an Air Compressor starting would cause enough voltage to trip the Triac, and bump the fans briefly.

The solution to this was to switch to the load module, and switch the Ground. This removes the possibility of the induced voltage on the control line, and has worked great with the Cerberus ever since.

That said, as the controls keep getting more sophisticated, adding LCD touch screen, Memory, OneWire Ports, Webserver, ect, have moved to the Raptor. Once the Raptor is started, they work great, but on startup at least 4 of the pins briefly go hi, (as shown by the LED lighting on the load module). This ranges from a fraction of a second to about 1 second, but I simply can’t bump that many fans at once. Easy enough, skip the pins, that are causing the problem, although it would be nice to be able to use them.

So here’s the problem, Even without Lighting the LED’s on the load module, I believe the pins are in a “don’t care” state, and enough voltage is on the line, to allow enough voltage to get thru and trip ALL the relays. This only lasts for about a second, (basically till you here the computer chime that a usb device has been found), and then everything works as normal, same as it did with the Cerberus. But I can’t have that happen. I’m using a 12V power supply to drive the Triac’s, and they take nothing for current.

So the question, Can I set the default state of the pins, (probably at the Micro Level), for a default state of pull down resistor?

Second question, Pretty sure a 10k pull down resistor on all the pins would solve the problem, but that involves spinning a board to put in between all the load modules. Any thoughts on that wouldn’t hurt.

Third question, Any thoughts on a 10k pull up resistor, just air wire it between the terminals on each of the relays to solve the problem?

Ideally I’d like to do both set the default pin state, with the pull up resistor, to increase fail safe.


the only way to guarantee the pin state is to use a pull-up/down resistor yourself. That way no matter what happens at the microcontroller level, the situation is controlled in a known way. As to how, I’d go with a breakout board that has Gadgeteer sockets on it that you can insert between the Raptor and the Load module, and allows you to optionally pull up / down what pins you want.

@ Brett -
Understood, but then why wasn’t a pull down one engineered into the board in the first place, and in code left the pins in a don’t care state?
Secondly, what about the pins that do briefly go hi, the pull down wont solve that, (and yes there was a couple of them on the Cerberus, but I just skipped them, but the bigger these systems get…) Fundamentally, I know I could manually set registers on the Cerberus, (to get access to things like the watchdog), was kinda hoping someone would point me towards an example on Raptor, even if its unrelated, as it gives me a chance to verify, if I try to duplicate it from reference manuals, that I’m on the right track.

As for the breakout board, that adds another 80 breakout boards just to existing sites, so tempted to build a daughter board that stacks on the load module, basically female on the bottom, male(socket),(sorry, shades of Nortel still sticking, the age old argument of pin vs socket, and ex rf guy, go with the center pin) on the top, with pull down resistors.


Why don’t you just design your own modules?

Remember, the bits you’re using are ALL designed as general purpose modules. If you have critical applications that require specific things (like this) then you’re unlikely to get something comprehensive that deals with the nuances and you’re going to need to do something yourself.

I don’t necessarily believe your “quick switch on” scenario, and I’d be checking that your code isn’t initialising the output pin incorrectly, and then setting it back to your off-state. It may be possible that GHI’s firmware is setting the pin in one particular way (or the processor does it) but in most cases the pin is in high impedance before it’s created in your code, and therefore should never drive a signal high or low in a way that would override a pull up/down resistor

The issue is not unusual in systems. The various power must sometimes be applied in a specific order and with some time delay.
On our Raptor, with the load module plugged in socket 18, after a reset the pin 6 will be ON for about 2 seconds,
One way to circonvene the issue is to delay the + power supply for the outputs by at least 2 seconds.
The socket 18/pin 6 on the Raptor is PC24 (see schematics).
from the G400S and G400D Datasheet:
GPIOs can read and write logical high and low signals. Keep the following in mind:
They default to inputs with internal weak pull-up resistors
From the Atmel SAM9X35 Datasheet, the pin is also ST (i.e. Schmitt Trigger Enabled).
You may be interested by chapter 46 (mainly 46.14 and 46.15).

@ SouthernStars,

Thanks for the help. Your are definitely correct about
Port 18, Pin6 goes hi for about 2 seconds, and Pin4 goes hi for about 1 second, after a 1 second delay
Port 1, Pin2 flashes for milliseconds
Port 2, Pin4 goes hi for about 2 seconds. (And yes, I know its not labeled for use with the load module, but ran out of ports).

So, for the time being, will simply skip them, and in the future will use your solution of delaying power to the relays by creating a board with a mechanical relay on it, so there simply won’t be enough current to drive it, till its given a command).

The solution for the load module, was to drop a (603)10k resistor between the GND side of the LED & the resistor next to it, with the exception of the last port, which I used an old fashion thru hole resistor for. The spacing was just slightly greater than it should be, but by using a little extra solder paste & a hot air pencil they eventually pull themselves into place, each board takes abut 20 minutes to fix.

Ironically, I was talking to the VP of IT at the company I’m installing these for, and he has experienced the exact same problem with his own hobby project, which measures soil moisture, then turns a water pump on when its to dry, but the pump engages every time the board is powered up, so, its nice to know its generic projects that have this issue as well.


1 Like

@ michaelb - Can you provide a picture (closeup) of this fix?
@ GHI - Is this something for next release of this module?

@ njbuch - Sorry, don’t have any on hand, and the nearest site I’ve got keys to is a 3hr drive away. That said, I did mark up the load module in paint to demonstrate what I did. The red boxes are 10k (0603) resisters, and the red wire across the label (led7), is a good old fashioned 10k radio shack 1/4 watt resister.

That said, if a change was going to be made at a hardware level, (and what I’m looking to do for myself), is incorporate a Max14662 8-port digital switch, (approximately .1ohm resistance when closed), using an I2C interface, so 2 pins vs 28 to control 32 outputs, and never have a fail safe issue on startup. For my own use, because I use so many outputs, integrating a DS28E17 in front of it, so basically have 32 * 50 outputs off of a single Generic IO pin, without tying anything else up, and a few lines of code change from existing samples.

1 Like

@ njbuch - Adding resistors to the module you mean?