askefj
July 22, 2021, 2:06am
1
Hi, I'm testing demultiplexing signal using arduino mega and analog mux/demux TS5A9411DCKT
For test, 5V input and switching it with port 2 (High -> Low -> HIgh ...)
and for check signal, using analogread() function with A0 and A1
I expect that 5V signal comes out one side(High) and the other side 0(Low) comes out or floating pin value
But when i printed it, both side have 5V output (about 1020~1023 analog value)
Why??
I'm tested mux/demux chip using multimeter and switching done well
Here is my arduino code and schematic
#include <Wire.h>
bool MUXFlag = false;
int aP1 = A0;
int aP2 = A8;
int a1 = 0;
int a0 = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(38400);
delay(10);
pinMode(2,OUTPUT);
delay(10);
}
void loop() {
// put your main code here, to run repeatedly:
if (MUXFlag == false)
{
digitalWrite(2,HIGH);
MUXFlag = true;
}
else if (MUXFlag == true)
{
digitalWrite(2,LOW);
MUXFlag = false;
}
delay(1000);
a0 = analogRead(aP1);
delay(100);
a1 = analogRead(aP2);
Serial.print("A0 : ");
Serial.println(a0);
Serial.print("A1 : ");
Serial.println(a1);
}
aarg
July 22, 2021, 2:20am
3
aP1 and aP2 have no active pull downs. They are floating when not selected so they mostly reflect their previous value.
askefj
July 22, 2021, 4:19am
4
I made pull down to NO and NC (with 13k ohm resistor)
Signal goes down to 600~800 analog value (about 3~4V)
Is impossible to makes 0V?
MarkT
July 22, 2021, 10:37am
5
Which arduino? Can you provide a complete schematic showing how the chip is wired to the Arduino in full detail?
Certainly seems odd from the description so far.
askefj
July 23, 2021, 2:52am
6
This is my full schematic
Hi,
Come on join it all together, this is for troubleshooting not PCB production.
What about;
Power Supply.
Controller.
Bypassing.
You have your project in front of you, we don't.
Thanks.. Tom...
aarg
October 11, 2021, 12:14pm
8
Write a sketch that toggles your "PWM" pin instead of PWM'ing it. Assuming you've assembled things right, with P2 in one state, one of NO or NC will be at 5V, the other at 0V. With P2 in the other state, both NO and NC should change state. Doing it at a slow rate will help to debug it.
I can't imagine what you are up to.
system
Closed
February 8, 2022, 12:15pm
9
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.