Hi,
Can someone help me with choosing the right Microcontroller? I'm not really familiar with hardware-specs so I'm afraid of picking the wrong one.
I have a pharmaceutical machine that produces tablets through 2 'tables' with 37 'punches'. For each punch, I'd like to know the pressure. For each table I have 1 pressure signal that continously changes like a sinus graph. As soon as the pressure is out of range for 1 or more punches, the machine stops or opens a disposal mechanism. Anyway, I already made the whole thing on a PLC, but the pressure readings are not really that precise. Most probably due the high speed of the machine, an analog reading that only refreshes per 2 milliseconds, and all the other functions the PLC has to perform. What I did (for each set of 37 punches):
- A timed interrupt reads the analog reading each time when it has been refreshed. It stores the highest(peak) reading
- 1 (high-speed) pulse triggers an interrupt when a new punch approaches. This resets the peak to 0.
- 1 (high-speed) pulse triggers another interrupt when the punch passed and stores the peak for the punch, checks it for errors, and increases the punch counter. (so I end up with an array of peak values).
- Each 360 degrees a third (not high speed) pulse resets the counter to 0
- Average pressure is calculated for each set over all its 37 punch readings
It works, but as said, it could be better. Instead of using that PLC, I was thinking about a seperate module that focusses only on the tasks mentioned above. The results would be send as an array to the PLC via CANbus or Serial port. Errors would be send by a digital output. Now the big question is, what Microcontroller (or something else) would meet my requirements:
- 2 analog inputs 0..10V 10 bits or higher, high refresh rate (less than 1 ms s'íl vous plait)
- 4 high-speed digital inputs that can generate an interrupt
- 2 digital inputs
- 2 digital outputs
- Optional: 2 analog outputs for the average pressure
- Serial communication with the PLC for sending results (1 or 2 times per second) + receiving some parameters. CANbus is ok as well.
- No EEPROM, additional Flash, LCD, Timers or other luxery needed
- 16 bit would be enough. No floating points required.
- Environment: dry, normal temperature, lots of dust, quite alot vibration
- Program and RAM requirements would be pretty low, although I don't know the overhead of Serial/CAN communication
- A relative low price (including development tools/software)
I'm looking at
http://www.microchip.com/maps/microcontroller.aspx
where you can give all kinds of parameters to find your 'perfect' microcontroller. But I don't know what kinds of speed, RAM, memory or program sizes I would need to meet my requirements. For example, what does a CAN connection cost? Or reading those two analog inputs as fast as possible? I have some programming experience with microcontrollers
from the past, but I'm not familiar with the hardware specs.
Regards,
Rick
Can someone help me with choosing the right Microcontroller? I'm not really familiar with hardware-specs so I'm afraid of picking the wrong one.
I have a pharmaceutical machine that produces tablets through 2 'tables' with 37 'punches'. For each punch, I'd like to know the pressure. For each table I have 1 pressure signal that continously changes like a sinus graph. As soon as the pressure is out of range for 1 or more punches, the machine stops or opens a disposal mechanism. Anyway, I already made the whole thing on a PLC, but the pressure readings are not really that precise. Most probably due the high speed of the machine, an analog reading that only refreshes per 2 milliseconds, and all the other functions the PLC has to perform. What I did (for each set of 37 punches):
- A timed interrupt reads the analog reading each time when it has been refreshed. It stores the highest(peak) reading
- 1 (high-speed) pulse triggers an interrupt when a new punch approaches. This resets the peak to 0.
- 1 (high-speed) pulse triggers another interrupt when the punch passed and stores the peak for the punch, checks it for errors, and increases the punch counter. (so I end up with an array of peak values).
- Each 360 degrees a third (not high speed) pulse resets the counter to 0
- Average pressure is calculated for each set over all its 37 punch readings
It works, but as said, it could be better. Instead of using that PLC, I was thinking about a seperate module that focusses only on the tasks mentioned above. The results would be send as an array to the PLC via CANbus or Serial port. Errors would be send by a digital output. Now the big question is, what Microcontroller (or something else) would meet my requirements:
- 2 analog inputs 0..10V 10 bits or higher, high refresh rate (less than 1 ms s'íl vous plait)
- 4 high-speed digital inputs that can generate an interrupt
- 2 digital inputs
- 2 digital outputs
- Optional: 2 analog outputs for the average pressure
- Serial communication with the PLC for sending results (1 or 2 times per second) + receiving some parameters. CANbus is ok as well.
- No EEPROM, additional Flash, LCD, Timers or other luxery needed
- 16 bit would be enough. No floating points required.
- Environment: dry, normal temperature, lots of dust, quite alot vibration
- Program and RAM requirements would be pretty low, although I don't know the overhead of Serial/CAN communication
- A relative low price (including development tools/software)
I'm looking at
http://www.microchip.com/maps/microcontroller.aspx
where you can give all kinds of parameters to find your 'perfect' microcontroller. But I don't know what kinds of speed, RAM, memory or program sizes I would need to meet my requirements. For example, what does a CAN connection cost? Or reading those two analog inputs as fast as possible? I have some programming experience with microcontrollers
from the past, but I'm not familiar with the hardware specs.
Regards,
Rick