![]() I have performed button count test using code from this forum and confirm that the switch also behaves erratically. I have pulled switches up and down with resistors in vain. I have bought three different brands of switches to test but all have the same behaviour. ![]() The limit switches work intermittently, sometimes they respond flawlessly, sometimes not at all. Please help with code - I require option where the two relays switch off on the serial input of letter 'S' and to add the corresponding state machine. If Limitswitch2 is pressed, this relay switches off. It detects the current state of the system and awaits the Serial input of 'B' which then turns on the second relay.If Limitswitch1 is pressed, this relay switches off. Serial input of 'A' turns on one relay.The Up and Down command can come from your 'wave' circuit or a SPDT up/down switch. The diodes protect the contacts from any inductive spikes generated by the relay coil and motor inductances. The limit switches carry only the relay coil current. ![]() I modified this code to control two relays which are wired to motor poles for Forward or Reverse movements until they physically reach a limit switch on either side. Heres a circuit using two SPDT relays (that form an H-bridge circuit). Modified existing project from this link: Problem : Trigger limit switch to stop DC motor
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |