Data/Adress Storage

Hello!

So what I need is a microcontroller, or perhaps just a small storage device that can hold an adress(can be something simple like numerical or a string) that sends it's adress to the arduino when powered. I think a microcontroller it's a bit much as I don't really need it to do any logic, or maybe something like sending it's adress once evey few seconds instead of all the time.

Ideally it should be serial, like addressable leds, so I can hook a bunch of them together on the same wire.

Do you have any idea of a device such as this that can work with an arduino(or really anything else, like a rasbery pie) ?

No problem, you can do that with about 20 logic gates, a PLA, and other devices could also be used. The microprocessor is 1 chip for a few bucks and a lot less wiring and chances for mistooks. Addresses are numbers not strings. What is wrong with the Arduino it can do it all. The Arduino is a microcontroller. Try this link it might help. A beginner's guide to microcontrollers

You may also want to formulate exactly what you are trying to achieve.
Are you interested in knowing if that device is available at the start of your program, or does it need to report repeatedly.
Does it have to have a unique ID or just a simple signal to let you know its there. If unique, how many other devices? Etc.

The arduino is fine, the thing is I'll be using more of this microcontrollers set up in a parallel configuration that will "talk" with the arduino. The way it's going to work is, when they are plugged in into the parallel connection they will send their "address"(which can be anything, just a way for me to identify which is which) to the arduino, where all of their data is saved and can be manipulated.

In a way I want them to serve as smart switches, because depending on which will be plugged in they will serve a different purpose in the arduino.

However ideally I don't want them to hold any other information besides the necessary address

An ATtiny would work, and can be programmed using the Arduino IDE. You will need to download the appropriate Arduino core.

No so the way I want it to work is:

In the arduino I'll have some bools that, false means that specific device isn't connected and true means it is connected. Once they are plugged in all I want them to do is repeatedly send their address or ID which has to be unique so I can identify them. For the detection it will be pretty basic, if I get they address number then it's connected, if after x amount of seconds I don't then it is disconnected.

I don't exactly know the number of devices, it will probably be around 20-30 connected at once, but overall maybe more.

An option to consider would be I2C connection:

  • set up the main Arduino as the master, and the others as slaves.
  • each slave can be programmed with its own I2C address.
    You could then send an I2C read command from the master to each slave and do whatever with it. The slaves could also send status info back.
    Only caveat is they must not be far apart.
    For more distant devices, and as many as you are looking at, things will get more complicated.

Probably CAN would be one of the better solutions, it is very robust and reliable. You could use I2C which was not designed as an inter board communication format, possibly RS485. Your arduinos will have to decode your command and switch or read the appropriate pins. This sounds like a home automaton project, is that what it is?

Not home automation. What I want to do is a kind of game, like an escape room. The thing is I want to have a circuit, which will be composed of different things such as batteries, fuses, etc. (Note: they won't be real, each of this component will have something that can store their address so that the arduino will keep track of them. Ex: the battery level will be stored in the arduino and then displayed in a way either on the battery or on a display once connected).

So I need them to be plug 'n play. When they get powered either execute some simple instructions, or just send their address directly to the arduino. I don't mind programming them, I just need something compact and cheap. I don't need for example a full arduino board as there are a lot of functions that I don't need.

How about something even simpler then:
For example, you have an item that can be picked up. Place that item on a contact switch, and read the switch from your Arduino.
A box that is kept closed can have a switch in the lid, that will change state when the lid is opened.

I do not know your resources but they make RFID tags that can work. What they call "Far-range" UHF RFID tags can read at ranges as far as 10 meters with a passive RFID tag, whereas active tags can achieve ranges of 100 meters. Try this search term "long range RFID for Arduino" I think you will find several that will work.

There was an interesting suggestion recently that a DS18B20 3-pin temperature sensor could be used as it has a unique ID that you could use as your Arduino ID.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.