Shop OBEX P1 Docs P2 Docs Learn Events
Has anyone used the RCTIME function with the Stamp PLC? — Parallax Forums

Has anyone used the RCTIME function with the Stamp PLC?

hanceharperhanceharper Posts: 2
edited 2011-07-08 14:48 in General Discussion
I have used the RCTIME function with the basic stamp 2 but have not found an RC combination that works when the stamp is mounted on the Stamp PLC, is this possible?
- I'm trying to use a Stamp PLC digital output
- I'm not sure about the initial/final voltages in the equation:
time = - tau * ( ln (Vfinal / Vinitial) )
- I think I need to set the pin low (for a 24 volt charge on the capacitor) and use a state of 0 in the RCTIME function

Thanks for any suggestions

Comments

  • Tracy AllenTracy Allen Posts: 6,667
    edited 2011-07-08 09:09
    I don't have a schematic of the StampPLC (#30064), but I do have the pdf instructions. Apparently all the digital inputs are optically isolated, which will preclude using the standard RCTIME command. It says that 8 of the inputs come from a 74HC595 shift register (strictly digital, and optically isolated), and 2 of the inputs go directly to stamp i/o pins (but apparently also via optical isolation).

    Are you trying to measure the 24 Volt power supply?
  • hanceharperhanceharper Posts: 2
    edited 2011-07-08 10:00
    I was wanting to measure the resistance of a pot that is indicating a gate's (water gate in a canal) position. Maybe using the 5 volt output across the pot and reading the analog input from the pot's sliding pin would be my only option then?
  • Tracy AllenTracy Allen Posts: 6,667
    edited 2011-07-08 11:53
    The analog input from the pot to one of the 4 ADC channels would definitely be the way to go.

    Keep in mind that the input resistance of the ADC is fairly low, 21 kΩ, so your math may have to account for that to calculate gate position from measured voltage.
  • $WMc%$WMc% Posts: 1,884
    edited 2011-07-08 14:48
    Remember that you have to add the ADC to the Stamp PLC."Just plug it in the socket"
    '
    "Optionally, you can purchase the MAX1270 A/D Converter 12-bit, 8 channel 4-20 mA A/D converter. This
    is available from Parallax web site" http://www.parallax.com/detail.asp?product_id=604-00026.
    '
    "Demonstration and example software files used in this documentation may be downloaded from"
    http://www.parallax.com/detail.asp?product_id=30064.

Sign In or Register to comment.