Shop OBEX P1 Docs P2 Docs Learn Events
BS2 + multiple sensors (that need to be isolated) = use of relays — Parallax Forums

BS2 + multiple sensors (that need to be isolated) = use of relays

amzsamzs Posts: 2
edited 2007-09-28 05:17 in BASIC Stamp
Hello All!

In one of my laboratory experiments I am trying to use a BS2 to collect readings from multiple sensors (4 of them). The sensors are the EME soil moisture sensors requiring +5V, GND and the signal (as a frequency). The problem is, as far as I understand (mind you, I have no electronics background, but I am supervising the project), that the sensors in a way 'interact'. The sensors are embedded in a material and measure resistivity between two points in the meduim (separated about an inch apart), however, since the medium conducts electricity, I presume that multiple GROUNDS can form using the other sensor's GND thus giving wrong readings. Now if I disconnect all but one sensor's 3 connections then I get the desired reading. Thus I presume that I need to, using my BS2 to disconnect all sensors but the one I am using to take measurements. The measurements are taken in a cyclic fashion one sensor at a time. now, I hope that if I connect a relay for each of the three lines connecting the sensor of the BS2 I can, using a program, make the connections, take the reading, disconnect the connections, and do the same for the other sensors.

So, my question is, what type of a circuit can perform the task of isolating (disconnecting) certain connections? A relay? If possible I would love to learn more, but mind you I know little, so be gentle! wink.gif

Thanks in advance,
Mike

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-09-23 00:15
    You don't need to isolate the sensors. They're already set up with dc isolation. See the discussion: www.emesystems.com/OL2mhos.htm. As discussed, you just need to connect all three to +5V and ground on the BS2 board and connect the signal lines each to a separate BS2 I/O pin.
  • amzsamzs Posts: 2
    edited 2007-09-27 23:22
    Hello Mike,

    Thanks for the reply.

    I have read that article and did that setup in the past, and that made me wonder in the first place...

    Here is the setup;

    Two SMX moisture sensors, set up to read frequency, running on a BS2p40 so the frequency readings need to be scaled up due to the speed of the chip compared to the original BS2 used for the EME SMX charts (1ms for BS2 and 287um for BS2p giving 1000/287=3.48). I have connected one sensor to a 10K Ohm resistor and it gives a reading of 206Hz (which is scaled up 717Hz, compared to the calibration curve for SMX, is quite OK). If I disconnect that sensor and connect the other one across the resistor I get 209Hz. So I presume that each individual sensor is functioning OK. Now if I connect two sensors to the same resistor I get 0Hz and 1Hz as the readings yet the lowest reading SMX is 'allowed' to have is ~50Hz. And I was expecting to see ~210Hz on both sensor readouts if I understand it correctly. Mind you I might be doing something stupid by connecting both sensors to a resistor, but I try to 'simulate' the presence of a material medium using a resistor...

    I am grateful to any more insight regarding this!

    Mike
  • Mike GreenMike Green Posts: 23,101
    edited 2007-09-28 01:05
    You can't connect two moisture sensors to the same resistor at the same time and expect to get a valid reading. The sensors use a timer (the 555 timer) to generate the pulses and use the ground moisture in the feedback loop. If you connect two together or have their electrodes too close together (probably on the order of inches) the timers interact which is why you're seeing them not oscillate or oscillate very slowly.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2007-09-28 05:17
    Hi Mike,

    You can get better results by powering each SMX module from its own Stamp pin. The module draws less than 1.5 milliamp and has a 3 volt regulator on board, so a Stamp pin can supply enough power. Turn one SMX on and take its reading, turn it off, then on to the next one. You can leave all the grounds connected. Also you can tie all the frequency outputs (green wires) together and use one pullup resistor and one stamp pin for all of them. (wired OR) But that only works if you power them up one at a time.

    The interaction comes mainly from the AC fields set up by the separate 555 oscillators operating all at the same time. The capacitors provide good DC isolation, but not AC isolation. So powering down all but the one you are reading should work much better. There will still be some interaction if they are placed very close together in a conductive medium. Your test with tying them both to one resistor is too extreme, interesting though. The oscillations basically stop dead. The oscillation can also be affected by extra low resistance or extra capacitance from the sense wires to the power supply lines. What that implies is, don't run the ground wire into the real ground around your experiment.

    Please try activating them one at a time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
Sign In or Register to comment.