Selecting a Microchip

  • 1
  • 2
  • 3
  • Page 1 of 3
Jeosist
 
Avatar
 
Subject:

Selecting a Microchip

 · 
Posted: 28.10.2012 - 21:59  ·  #1
Hello Everyone

I am new in microchip programing line.
I need to design a micro controller card

-Cards will have relays on it.
-There will be many cards that they all will be connected each other serialy or paralel.
-Everycard will have its own id code or IP number or similar to be identified by PC.
-All cards will be register by computer from 1 to N
-Computer will have to know which card will have the intruction at a time.
-Computer will open some relays on several cards at a time by intructions one by one.

This mean
for example computer will send an intruction from USB( serial port ) such as 02X04 mean card number 02 will be activated and relay number 04 will open. Next instruction will be 23X06 mean is card number 23 will activate and relay number 6 will open and so on..... All relays on different cards will stay open certain of time till job is completed.

Cards will disasembly from their connection line after job is done then they will be reconnected for new job. Therefor cards will mixedup at reconnection and computer will register them again from 1 to N. Because card place is on cableline is important for job.

Now I need help to select a right atmel microchip which I can use in this type of cards and of course cost is very important. Once right microchip has been selected then I will focus on programming

Thanks for anyone
Mr Crusty
 
Avatar
 
Subject:

Re: Selecting a Microchip

 · 
Posted: 29.10.2012 - 12:30  ·  #2
Hi Jeosist,

"Now I need help to select a right Atmel microchip which I can use in this type of cards and of course cost is very important. Once right microchip has been selected then I will focus on programming "

I think the first thing you will have to decide is what communication protocol you intend to use with each card. The communication protocol decided upon will then, to a certain extent, decide upon the chip you will use.
Then you need to know the maximum number of relays per card as this will define the number of port pins required to control the relays.
Do you require the cards chip to be doing autonomous functions not controlled by the PC? If so then you will need to consider the amount of programme and variable memory you will need for the chip.
Do the cards require input from the external world AtoD / DtoA, Digital inputs? This again will define more of the chips hardware needed.

You mention using USB from the PC to communicate so probably you will want an Atmel chip with USB communications capability. Once you have all chip requirements in front of you then the next step is to look at Atmels site at the parametric table of devices and search out the most suitable chip.

Sorry that this is not an answer, but this is the common dilemma all designers have to go through, even then it can often result in a second design.

Best
Crusty :juggle:
Jeosist
 
Avatar
 
Subject:

Re: Selecting a Microchip

 · 
Posted: 29.10.2012 - 21:36  ·  #3
Hello

How about Atxmega32A4U for this relay cards ?
Can I use this chip for relay cards what will get instructions from PC ?
regards
Eddie
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: Selecting a Microchip

 · 
Posted: 30.10.2012 - 09:01  ·  #4
Crusty has made very relevant questions that you shouldn't ignore, since without answering them people will not be able to give relevant answers to your questions.
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1373
Registered: 03 / 2005
Subject:

Re: Selecting a Microchip

 · 
Posted: 30.10.2012 - 11:10  ·  #5
Cost is always a trade off.

You ask is the Atxmega32A4U OK. Well, there are many costs. The Atxmega32A4U includes USB on a chip, but there are hidden costs with USB. Is this for personal use or commercial? If commercial then you will need to register for PID and FID and get your drivers approved (always assuming you know how to create the drivers). In this case using a proprietry USB chip such as an FTDI one which converts USB to serial and provides approved drivers may be a more cost effective way to go, although this would complicate the design and you would not want an FTDI chip on every board as this would slow the PC down because there would be too many serial ports. (A similar argument exists for using the USB feature which would provide too many USB devices and again slow the system down).

It is not such a simple question as it seems.
Mr Crusty
 
Avatar
 
Subject:

Re: Selecting a Microchip

 · 
Posted: 30.10.2012 - 18:39  ·  #6
Following on from Merlins comments.

If you are new to micro programming then I would be tempted to use old fashioned RS232.
Whilst most modern PC's do not have a serial port they do have USB ports and there are abundant low cost USB to serial plugin dongles for PC's. I use one for programming via USB and an Atmel STK500 board.
It's almost certain that all the Atmel chips you are likely to use will have a UART or can be bit bashed to provide an RS485 multi drop serial communication.

Depending on the distance between cards and PC there are other options such as I2C and SPI which do not come with so much cost overhead as discussed by Merlin.

First question to you from us would be, how many relay cards(addresses)?
Second question is what distances will the cards communications connection be from the PC?

If we know this the people like Avra and Merlin will be able to help your quest

Best crusty
Jeosist
 
Avatar
 
Subject:

Re: Selecting a Microchip

 · 
Posted: 31.10.2012 - 00:29  ·  #7
Hello

In my projects every relay card has 6 relays only. Whole system may use 20 to 255 relay cards according to client choise. They might decide to use 28 or 46 relay cards or 81 so on... All relay cards will be on same cable line. PC will send intruction and any card what related with instruction will activate then open the relay which instructed. Relay cards will connect each other on a cable line with a distance of max 50 meters. This can be 5, 10, 15, 20 ,30, and 50 meters. Clients will decide the distance as well. So... in the past I have been recomended to use Rs485 for long distance communications. I just need an advice about type of atmel chip which I can use and I just want to start my chip programming research. Actualy I am a delphi programmer and I have managed a software what send data through serial ports . I want to design my own relay cards.

Regards to all
Mr Crusty
 
Avatar
 
Subject:

Re: Selecting a Microchip

 · 
Posted: 31.10.2012 - 09:22  ·  #8
I was think about thi,s after the last post.

By the sounds of it your chip will need two comms ports one that is in and one that is used as out to the next in chain.
This is especially important if the cards have a unique identity assigned in eprom and can be inserted into any position on the comms cable. Trying to work out their place on the communications cable is very difficult without a two port approach.
The in port is always on and listening, the out port is only switched on when the in port gets a signal message from the card in front, or if first in line from the computer. Once place is identified the cards become receivers for their own message and pass through transmitters of the message if it for cards further down the line.

So there we have it you will probably need a chip with the capability of two Uarts.
What speed of comms will you need as this will decide if you use a crystal or internal clock on the chip.
Be aware that you will have to accommodate in your software and design for any mismatch in the baud rate between cards, as this might make some cards work in some slots and not other slots.

I think that this would temp me to design around using a SPI communication chain as the clock is physically part of the communications scheme. As long as you can read the clock and data lines you can work with the signal.

Next Questions are what power supply are you providing to the cards and what drive load will the ports need to give to the relays, do you intend to isolate the relays optically or direct drive.
These questions if answered correctly will save you hours of hardware and software debugging.

Do you need a watch dog?

I sorry if I sound like a school master but the list of questions you must ask yourself, as the designer, is endless. Especially if you are to get a chain of cards working first time, every time and without failures. Trying to debug problems on the clients property is not to be advised.

Best
Crusty :schlaumeier:
  • 1
  • 2
  • 3
  • Page 1 of 3
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   130   144 · Page-Gen-Time: 0.024979s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI