Markos, if you mean the pins to switch simultaneously (and I think you
do), then you will
need to use PORT manipulation logic:
https://www.arduino.cc/en/Reference/PortManipulation
On Sat, Nov 21, 2015 at 5:05 AM, Markos <markos@c2o.pro.br> wrote:
> On 19-11-2015 17:35, John Griessen wrote:
>>
>> On 11/19/2015 01:04 AM, Nathan McCorkle wrote:
>>>
>>> I considered that you might not be
>>> sampling on both pulses, like if one was a 'reset' pulse... but if you
>>> don't mean to do that, then I think you need another sense resistor
>>> and use another of the analog inputs.
>>
>>
>> Yes, you probably want to flip the whole experimental setup around
>> and attach everything that was on one electrode to the other and vice
>> versa.
>>
>> So, if you cannot see how to do that via using different pins of the
>> microcontroller,
>> you could add an analog switch IC to act like a patch panel.
>>
>> Or, get big or small medieval style DC relays chunking or clicking to do
>> the swap around.
>>
>
> Hi John,
>
> I'm doing by this way:
>
> const float V_arduino = 5.00;
>
> byte pin_electrode_1 = 7;
> byte pin_electrode_2 = 8;
>
> int reading_pin = A0;
> int reading;
>
> float Vm;
> float Rc = 10000; //Constant resistor
> float Rx; //Resistance of solution
>
> void setup()
> {
> Serial.begin(115200);
> pinMode(pin_electrode_1, OUTPUT);
> pinMode(pin_electrode_2, OUTPUT);
> }
>
> void loop()
> {
>
>
> //Pin 7 = 0V e Pin 8 = 5V
> digitalWrite(pin_electrode_1, LOW);
> digitalWrite(pin_electrode_2, HIGH);
>
> delayMicroseconds(2000);
>
> //Pin 7 = 5V e Pin 8 = 0V
> digitalWrite(pin_electrode_1, HIGH);
> digitalWrite(pin_electrode_2, LOW);
>
> delayMicroseconds(1900);
> reading = analogRead(reading_pin);
>
> digitalWrite(pin_electrode_1, LOW);
> digitalWrite(pin_electrode_2, LOW);
>
> Vm = reading * 0.0048;
> Rx = Rc * (V_arduino - Vm) / Vm;
>
> Serial.print(Vm);
> Serial.print(" ");
> Serial.println(Rx);
>
> delay(500);
>
> }
>
> Any tip?
>
> Many thanks,
> Markos
>
> --
> -- You received this message because you are subscribed to the Google Groups
> DIYbio group. To post to this group, send email to diybio@googlegroups.com.
> To unsubscribe from this group, send email to
> diybio+unsubscribe@googlegroups.com. For more options, visit this group at
> https://groups.google.com/d/forum/diybio?hl=en
> Learn more at www.diybio.org
> --- You received this message because you are subscribed to the Google
> Groups "DIYbio" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to diybio+unsubscribe@googlegroups.com.
> To post to this group, send email to diybio@googlegroups.com.
> Visit this group at http://groups.google.com/group/diybio.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/diybio/56506C02.2050305%40c2o.pro.br.
>
> For more options, visit https://groups.google.com/d/optout.
--
-Nathan
--
-- You received this message because you are subscribed to the Google Groups DIYbio group. To post to this group, send email to diybio@googlegroups.com. To unsubscribe from this group, send email to diybio+unsubscribe@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/diybio?hl=en
Learn more at www.diybio.org
---
You received this message because you are subscribed to the Google Groups "DIYbio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diybio+unsubscribe@googlegroups.com.
To post to this group, send email to diybio@googlegroups.com.
Visit this group at http://groups.google.com/group/diybio.
To view this discussion on the web visit https://groups.google.com/d/msgid/diybio/CA%2B82U9JyH04qH_GypT_%3DrOHCfYAYPEyOKRkb%3DhQYzvjFZRPvJA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Re: [DIYbio] Conductivity measurements with Bipolar Pulse
8:35 PM |
Subscribe to:
Post Comments (Atom)






0 comments:
Post a Comment