Jodh
Newbie level 6
I simulated the below attached circuit in Proteus 8 and it works fine. When I made the same circuit with actual components I got the following problems:
1. The port 0 has all pins at 5V DC, I grounded the switches to account for that, but I dont know if the 5V is floating state or high logic in the above case.
2. Both my relays get switched ON and stay that way. I think the current from my port 2 is not enough to drive the uln2003an, will adding a pull up resistor solve it?
3. In my actual circuit I am using ILN2003an, i checked the datasheet and both seem the same to me.
Any suggestion as to correct my circuit or code will be appriciated.If my circuit is correct, I can then start troubleshooting for actual hardware faults instead of logical errors.
Regards
Jodh
CODE : View attachment test.txt
Circuit :
1. The port 0 has all pins at 5V DC, I grounded the switches to account for that, but I dont know if the 5V is floating state or high logic in the above case.
2. Both my relays get switched ON and stay that way. I think the current from my port 2 is not enough to drive the uln2003an, will adding a pull up resistor solve it?
3. In my actual circuit I am using ILN2003an, i checked the datasheet and both seem the same to me.
Any suggestion as to correct my circuit or code will be appriciated.If my circuit is correct, I can then start troubleshooting for actual hardware faults instead of logical errors.
Regards
Jodh
CODE : View attachment test.txt
Circuit :