Go Down

Topic: Arduino serial number S/N ? (Read 4002 times) previous topic - next topic

erifet

Hello,

I have a project of doing a network of Arduino with CANBUS.
Each card must have a unique identifier, so i thought each card has a S/N (serial number), but is it true?
If it's true how i can accessed this S/N?

Thanks

Groove

No, it isn't true, but you could put one in EEPROM
Per Arduino ad Astra


BenF

Quote
Each card must have a unique identifier, so i thought each card has a S/N (serial number), but is it true?

The FTDI USB/Serial chip used on many Arduino's has a unique serial number. You can read this number through the host interface (e.g. Windows).

kg4wsv

Not all arduinos have an FTDI.  Some are RS232 based, and sadly the new UNO has changed ICs.

Even if your arduino has an FTDI, there is no way for the arduino to query itself.

EEPROM sounds like the best bet.

-j

pwillard

#5
Oct 27, 2010, 03:14 am Last Edit: Oct 27, 2010, 03:16 am by pwillard Reason: 1
Just a wild thought: One-Wire DS2401

http://pdfserv.maxim-ic.com/en/ds/DS2401.pdf

These get used in things like InkJet Ink cartridges.  It might work for what you need.  It saves EEPROM and eliminates the need for special coding and the possibility of duplicates.

You won't need ALL the numbers in the chip for CANBUS though.

westfw

Quote
Even if your arduino has an FTDI, there is no way for the arduino to query itself.

Feature request: The arduino IDE (or perhaps avrdude) should be able to suck the serial number out of an arduino and stick it into the flash or eeprom during download...  That should be just about possible.

CrossRoads

So you think the ATMega48/88168/328 have some S/N built into the hardware that can be read somehow? I haven't come across that in the 566+ page datasheet yet.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

westfw

Quote
you think the ATMega48/88168/328 have some S/N built into the hardware that can be read somehow?

No.  The FTDI chip has a serial number.  The mega8u (used on Uno) has a serial number, at least by the time it has become a LUFA-based USB/Serial converter.   Pretty much any other usb device would have a serial number...

kg4wsv

#9
Oct 28, 2010, 02:09 pm Last Edit: Oct 28, 2010, 02:10 pm by kg4wsv Reason: 1
Quote
mega8u (used on Uno) has a serial number, at least by the time it has become a LUFA-based USB/Serial converter.

Really?

Quote
Pretty much any other usb device would have a serial number.

Many (most?) USB devices do not have a serial number.  Prolific USB/RS232 chipsets, Keyspan USB/RS232 adapters, and some USB disk enclosures are among devices I've personally dealt with that do not have serial numbers.

Some drivers pretend to uniquely identify a device, but really all they're doing is assigning some identifier based on the the device's location in the USB "tree" - if you plug it in to a different port, or add a hub to the mix, the "identifier" will change.  Keyspan's driver for OS X is one example.

-j

CrossRoads

I use ProMini's as an embedded controller, it does not have an FTDI chip - so all my PC would see is whatever the FTDI programmer had, and the application program would not even see it.
And there are wireless interfaces too.

Anyway, I think I'm getting offtrack from the original question.

This is the kind of thing being discussed?
http://en.wikipedia.org/wiki/Controller_area_network


Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

erifet

Yes that's about CAN.
But is'it possible to put some informations in the EEPROM with the EEMEM directive?

Thanks

CrossRoads

I would say so.

http://www.arduino.cc/en/Reference/EEPROM

Have not done it myself yet, but others certainly have.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

westfw

The new bootloader does not support programming EEPROM from the IDE...

BenF

#14
Oct 28, 2010, 06:23 pm Last Edit: Oct 28, 2010, 06:24 pm by borref Reason: 1
Quote
The new bootloader does not support programming EEPROM from the IDE...

True, but there is always the option to write a small sketch to do the EEPROM programming.

Go Up