Pages: [1]   Go Down
Author Topic: Using a 74HC153 to multiply external interrupts..?  (Read 888 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My current project requires me to read a ppm signal from 7 devices. The code I used to read the RPM of 1 fan uses an external interrupt. Since the ATMEGA 328 only has 2 external interrupts a friend of mine came up with the idea of using a MUX, specifically the 74HC153 to switch between devices. This would allow me to connect up to 8 devices on just 2 digital pins.

Multiplexers are completely new to me and I am just trying to wrap my head around how and if this will work. I am still waiting on the MUX to arrive from electronic goldmine so I can not breadboard it yet.
« Last Edit: July 07, 2010, 08:19:18 pm by TheMakersWorkbench » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 604
Posts: 33439
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes this will allow you to direct your pulses into the interrupt pins but only two at a time can be directed like this. Which rather defeats the point of an interrupt in most cases but I think your application, periodic sampling of pulse rate, would suite this approach.
« Last Edit: July 08, 2010, 03:08:00 am by Grumpy_Mike » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Mike! I should have the Muxs I ordered in tomorrow or Monday.

Is there a chance I could get a snippet of sample code so I can understand how to code this.
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 32
Posts: 4260
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What is the nature of the signals that are generating your interrupts.  The two 'external interrupts' on the 328 can be configured to select the desired signal level and edge.  The rest of the I/O pins can also be configured to generate an interrupt whenever the logic level changes.  They aren't nearly as flexible as the 'external interrupts' but perhaps detecting a logic level change is all you need.

Don
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The project is a PC Water Cooling Information and Control center. It reads temperature from 3 temperature sensors (10k thermistor based) Then after Displaying the temperature of each sensor for 10 seconds it will change screens and display The RPM of the 3 PC fans, this screen will also last for 10 seconds. Then it will display the pump RPM and Water flow rate for 10 seconds. After that it will start the loop over. With 3 fans, 2 pumps and 2 water flow meters to pull data from I was under the impressions I would need an external interrupt to be able to poll the PPM signal from each fan individually. I am also able to control the speed of the fans and pumps via PWM and a 12v transistor circuit that is separated from the arduino via an opto coupler.
« Last Edit: July 08, 2010, 04:54:18 pm by TheMakersWorkbench » Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 32
Posts: 4260
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I was under the impressions I would need an external interrupt to be able to poll the PPM signal
An interrupt is used to deal with asynchronous events, events whose timing is not under your direct control.  If you want to initiate something periodically, you generally use a polling technique.  It looks like you want to use the latter.

Don
« Last Edit: July 08, 2010, 06:40:16 pm by floresta » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you post a sample of a polling technique that would work for this application?
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 32
Posts: 4260
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Can you post a sample of a polling technique that would work for this application?
I could probably come up with one.  I can make time to do that if you come here and mow the grass, paint the bedroom, clean out the garage....

Don
Logged

Pages: [1]   Go Up
Jump to: