Reading AC voltage into BASIC stamp 2?
Hello all, I'm new the whole BASIC stamp experience. I developing a project that will be using the BS2 as part of an electric grid digital protection relay. I have a simulated electrical grid constructed in Matlab's Simulink that outputs through a National Instruments DAQ board to create an analog signal. The BS2 "digital protection relay" will monitor (for now) three "points" on this simulated grid. The BS2 program will monitor these voltage and respond to any faults that will be initated in the system through Matlab. Once a fault is detected, a signal will be sent out to trip a circuit breaker to isolate the grid. Since the grid is simulated, the opening of a circuit breaker will go back through the National Instruments DAQ, back into Simulink, and trip the breaker there. How the grid responds/behaves is all Matlab's job, the BS2 is there ONLY to function as the digital relay.
The Simulink/NI DAQ part is not the problem, believe it or not its the BS2 since I am relatively weak in microprocessors (power guy) and unfamiliar with the BS2. My question...is there a way to monitor an AC voltage via the BS2? It seems that the only option I have built into the Stamp is the RCtime command, which seems pretty limited. Is there an analog to digital converter that will do the job for me? What, if any, do you experienced Stamp users recommend?
Sorry for the long post, and thanks in advance!
Justin
The Simulink/NI DAQ part is not the problem, believe it or not its the BS2 since I am relatively weak in microprocessors (power guy) and unfamiliar with the BS2. My question...is there a way to monitor an AC voltage via the BS2? It seems that the only option I have built into the Stamp is the RCtime command, which seems pretty limited. Is there an analog to digital converter that will do the job for me? What, if any, do you experienced Stamp users recommend?
Sorry for the long post, and thanks in advance!
Justin
Comments
Get a small one capable of only low currents. To decrease the response time, you will want to add a bleeder resistor to its output to help drain the onboard filter capacitor. If you want more control over the filtering, get a transformer designed for battery charging. These typically lack the filter capacitor altogether, so you can add your own RC lowpass filter externally.
The voltage can be measured using RCTIME or, if you were to use a Parallax MoBoStamp-pe, with one of the four onboard A/D converters. Just be sure to divide down any voltages that exceed 5V to protect the Stamp or A/D inputs.
-Phil
Since I already am in possession of the BS2 with the "Educational Board" I'm forced to work with that. I am considering using either the Texas Instruments TLC2543 ADC or the LTC1298 ADC here on the parallax site. What are your opinions of each? Thanks again for your help.
Justin
The amount of ripple will depend on the load. With any of the non-battery-charger types, there should be almost none — even with a suitable bleeder resistor. The ripple will become more noticeable, however, as you approach the rated current capacity. In any event, the faster your desired response time, the more ripple you'll have to tolerate.
When providing voltage from your DAQ board, remember that these are step-down transformers. So a wall wart that outputs 9V with a 120VAC input, will put out no discernable voltage with a 2.5V input, due to internal diode losses. The solution is either to output a lot more voltage from the DAQ and/or to get a wall wart that converts to a much higher voltage.
I don't have any experience with either of the two ADCs you mentioned. Sorry.
-Phil