1
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

I have a hall sensor that can measure current up to 25 A with analog output 0~5V. I am using Arduino mega board for programming. There are in total 30 hall sensors and where Arduino mega has 16 analog channel. Because of this I am planning to use multiplexer circuit.

Questions:

  1. Is the above circuit right to build multiplexing circuit?
  2. How are multiple analog output values read?
  3. What is the purpose of selector pins S0, S1, and S2? It says that depends on state of pin it read value. Is it true or false? I mean to say, if S0, S1, and S2 are all 0, it reads analog output of hall sensor 1; if S0 = 0, S1 = 0, S2 = 1, it reads HS4. Is that correct or not?
  4. Is it correct that using multiplexing, I can read one value at a time, but with multiple IO connected?
\$\endgroup\$
  • \$\begingroup\$ #3: S0..2 are binary, its easier if you refer to HS as 0-7 vs 1-8. e.g if s012 are 010 respectively, 010 is binary 2, so HS3. 111 is binary 7 so HS 8. 000=0=HS1 \$\endgroup\$ – EkriirkE May 20 '14 at 8:42
1
\$\begingroup\$
  1. You can use the above circuit.

  2. One of the input in connected to output based on the selector line value.

  3. selector pins decide which input line is connected to output line. selector lines = 000 selects HS1, 001 selects HS2 and so on..

  4. You have to use time division multiplexing. ie., read HS1 for 1st few ms, read HS2 for next duration and so on..

\$\endgroup\$
  • \$\begingroup\$ Thanks for quick response. I have one doubt here. time interval o-100ms read HS1 ,100-200ms HS2 ans so on.And store in particular variable. SO i can reteive data from there \$\endgroup\$ – AMPS May 20 '14 at 6:24
  • \$\begingroup\$ Precisely. :-). \$\endgroup\$ – nidhin May 20 '14 at 6:30
0
\$\begingroup\$

Your procedure will be:

  1. select a MUX channel

  2. probably wait briefly for the output of the MUX to settle at the new value

  3. Start an ADC conversion

  4. When the conversion is complete, read the ADC and store the value

  5. go to step 1 for the next channel

The minimum time between readings will be determined primarily by the ADC conversion time.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.