Electronics > Projects, Designs, and Technical Stuff
Best way to select the ID of each board?
<< < (3/4) > >>
mrburnzie:

--- Quote from: ledtester on September 16, 2019, 12:48:08 am ---You can get the DIP switches in various configurations:

https://irishelectronics.ie/Electronic-Components/Page-/-Category-11/DIP-SWITCHES

For 300 addresses you would need 9 bits controlled by switches. You can use three of the hexadecimal switches, or two hexadecimal switches plus a 2-position switch.

For a cheaper solution use a 9 position dual row header and make connections with jumpers:

(Attachment Link)


--- End quote ---

Okay not a bad option, will look into it more. Thanks!



--- Quote ---But let's back up a bit... why would the customer want to change the address? Doesn't that just give them the opportunity to mess things up if they give the same address to two boards?

--- End quote ---
Totally agree with you. They requested that feature.
ledtester:

--- Quote from: mrburnzie on September 16, 2019, 12:52:03 am ---Totally agree with you. They requested that feature.

--- End quote ---

I'd go back to the customer and figure out why they think they need to change addresses. Seems like they have a different idea of what the address is used for. There should be another mapping in software from "identity" to actual hardware device.
IDEngineer:
Keep it simple: Solder bridges on pairs of pads on the PCB. Costs $0 and can be changed in the field, but not accidentally, not vibration sensitive, etc.
AndyC_772:
I wouldn't fancy setting up DIP switches on 100+ boards without ever making a mistake, and certainly wouldn't want to solder that many links by hand.

All you need is a way to uniquely identify one board at a time, so it can then become the only unit which responds to a "set ID" message from the master. The master can increment a counter to set IDs sequentially without repetition, or it can assign a single, nominated ID (so you can replace individual units and have the new one keep the same ID as the old one).

Perhaps in this case you could have a single pushbutton, with some logic along the lines of "if the button is pushed within 10 seconds of power-up, request a new ID from the master".

Then all you need is for each slave board to store its ID, and every non-trivial microcontroller has EEPROM or Flash that can be used for this purpose.

My favourite design in this respect was a magnetic sensor, which used multiple, 'smart' sensor boards on a common bus. The criterion for assigning an ID to each board was "if you can see a magnet, and don't already have an ID, then request one from the master". Assigning IDs was a simple as putting the system into configuration mode, then swiping a magnet along the length of the bus. Total time required, about 5 seconds if you type slowly.
mikeselectricstuff:
Unless the board has enough of a user interface to set IDs with a couple of buttons, I pretty much always use DIP switches.
The main reason is long-term maintenance.
 
You set up a system, and have some spare boards left on-site as part of a service kit. In 5 years' time, when something dies and needs fixing, chances are that documentation has been lost, whoever installed it can't be contacted, or if they can, doesn't remember the details, or any special-purpose setup software borks on the  current version of windows etc. etc.

With DIP switches, you just pull a board from the spares kit, set the DIP switches the same as the one being replaced, job done.
Bonus points if you'd stuck labels at each board location ( NOT on the boards) with the switch settings for that location.
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod