Friday, June 19, 2020

Using Arduino to switch the DSKY Relay Module and some QA testing

WIRING UP THE ARDUINO MEGA 2560 TO THE TRANSISTOR CIRCUITS

Each of my circuits is designed to be off by default, as when the Arduino is not active. They are all activated by driving the input line to +5V, which either delivers +14V for set and unset lines or grounds the row select line. I ran the wiring to the Arduino, then anchored that unit onto the board. 

Just before I connected each lead to the Arduino from the board, I tested the voltage present on that lead to be sure that I didn't have +14V leaking since that would blow the Arduino input-output circuit. This took only a few minutes and I was ready to bring it up to do some power testing.

PUTTING THE RELAY MODULE THROUGH ITS PACES

The code in the Arduino lets me issue commands to set various values in the PROG, VERB and NOUN displays as well as setting the sign to blank, plus or minus. It has a simple command interface where I can turn the sign to + by typing sign +, then turn it off by typing simply sign. In the same way, I can put the two digits of VERB to 36 by typing verb 36 then turn them off by issuing verb with no parameter. 

To verify that I was turning on the proper segments of the display I had to first gang together the high voltage AC leads to the relay module. Each of the five columns for a digit has its own AC power line. 
There are also two low side AC lines that need to be bridged in the external wiring. 

As well, the VERB and NOUN lines require a jumper between two pins to provide AC. These two pins are connected to another relay that is flashed on and off at about 2/3 Hz or forced steadily on, based on whether those digits should flash or not. 

The bridged high AC lines are connected to the various segment outputs based on the state of the latching relays and the five bit code entered into the row that controls a digit. I can do a continuity test from high AC to the individual segments, seeing that they are turned on or off appropriately for each entered code. 

The code I ran that was expected to put 8 in every digit position, lighting all segments, instead put a 6 in as far as segment lighting. It was consistent across all six digits which means it is something that I am doing wrong. The code for 8 is 11101 while the code for 6 is 11100 thus one possibility is a fault driving the low bit. The code looks fine and the hardware worked perfectly when set manually, so I moved on to another possibility.

If I am entering the code reversed, e.g. putting in 10111 then since that is not a valid bit code value the results could well be the same as a 6, by accident.  To check this I selected two values which are symmetric opposites and set all the digits to one of them. If the segments that are active match the opposite, I would know what my problem is and how to fix it quickly. 

I chose 2 and 7 whose patterns are 11001 and 10011, thus entering the code 2 would either display 2 or 7 depending on whether I have reversed the order. The results were not what I expected. I had all the proper segments for displaying the digit 2 except that once again the H segment was inactive.

This tells me that I have something wired wrong where high AC is not getting to the relay contacts that lead to all the H segments. Off to study the schematics of the Relay Module. 

While I had all the segments active (except H) I did a sanity test, checking to be sure that the AC high and AC low lines didn't have continuity. That worked out okay, something essential for when I hook everything up and use the Power Supply Module. 

No comments:

Post a Comment