Optional Sockets?

Is it allowed for a modules to have optional sockets?

A module i’m thinking about has 3 sockets. One is mandatory and must be connected to the main board. The other two are optional and just gives you more functionality.

Is this allowed?

I don’t think there’s anything that says you can’t. The T35 display, for example, has multiple. You could consider the T socket to be optional. If you’re sockets are not intended to be plugged into the mainboard then I’d look at using a different style socket. There’s a thread here somewhere where I asked a similar question regarding creating a module that chained S sockets instead of Daisylink. The answer I got from KerryH was that it’s OK. Good luck finding the thread…

i think the only non Optional Socket is the DaisyLink Type, since the boards tries to communicate with that Module upon started up, to assign it an Address… all other types would be optional…

To test it, add a Multicolor LED in the designer and DON"T Physically attach it, start your application and you will get an Error about a missing Module… do the same for any other type and your Program will work without any issues, since it has no way to know if a module is physically connected to a board or not.



Thanks Ian and Jay Jay. Watch this space. :slight_smile:

On another note, how does power modules work? I did’nt see anything in the gadgeteer module design guide. I mean, how well do they play together? Can you have two red modules plugged in at one time? Like a battery module and a USB device module?

There can be only one red module connected. It is in the spec.

You certainly can have optional sockets. For example, in the T35 display the R, G, and B sockets are mandatory but the T socket is optional.

Have a look at the GadgeteerHardware.xml file in the source for the T35 Display on http://gadgeteer.codeplex.com (Modules\GHIElectronics\Display_T35\Software\Display_T35).

You’ll see that the definition for the T socket has the attribute Optional=“True”.

That is a bummer. That means that ALL power modules MUST have usb?

If I want to make a motor driver, that also powers the board, then I would have to give it a D socket too for debugging?

If I want to make a solar module then it too must have USB, and I can’t use the motor module and the solar module together…

One solution would be to have a “black” USB Device module that plugs into a D-type socket, but which doesn’t supply power - it would just connect D+, D- and GND to the mini/micro USB connector.

You could use this for programming and debugging while having a separate (red) power module plugged into another free socket.

I don’t know if anyone is making a black USB Device module yet, but it seems like it would be useful for these kind of situations.

Like Nicolas said… I don’t recall anything that says that power has to be plugged into the D socket. It just happens that all current power modules are also USB modules. No reason the two couldn’t be separated.

You could put a switch on your motor module so that it can optionally power the board.

Thought about a switch, but then what color must the board be? Black or Red? :slight_smile:

I think it still should be red.

Maybe brown? :wink: Yea, I think if it has the ability to power the board then it should be red. Now if you could find some thermochromic mask and change the color depending on usage that would be awesome!

Hi Errol,
Why not make your module use it’s own external power source, without having to worry about the board and it’s power supply…


[quote]Hi Errol,
Why not make your module use it’s own external power source, without having to worry about the board and it’s power supply…


Sample size of 1 – but I like the idea of his motor driver also powering the board. It would simplify things - number of modules, connections from the power sources and even potentially reducing the number of power sources.

That was the idea. Why have to run wires from the battery to the motor module AND the usb DP module? Just makes a mess of wiring when the battery power is already on the motor module.

But I would also be afraid of a switch/jumper. Don’t want someone forgetting to flip the switch while “just quickly debugging something” and blowing his/her board/PC/project etc…

There should have been co-existence built into the Gadgeteer spec for power modules… :frowning:

I know it’s not as elegant of a design as you may have wished … but what if it had 2 sockets (kinda like the screens with 3+) one for power and the other for the control of the motor driver(s)?

Good idea. Will think about it for my stepper module.

Problem is that my motor controller already has 3 sockets, adding another just for power would be extravagant… :slight_smile:

One Y socket is for direction control, chip enable, fault status. It is mandatory.
One P socket is for speed control and brake control(you can PWM the brake to brake just a little or a lot). Optional socket.
One A socket is for current feedback. Optional socket.