Ey guys, after working on this along the afternoon I have solved the issues in our case.
For the future generations that want to integrate Rodeostat in their Arduino based platforms:
The Hardware: As Will has said before, you will need to connect the Arduino to the teensy in one of the possible ways (SoftwareSerial, I2C, SPI, Hardware Serial (like Serial2...)). In our case we have connected it by Hardware Serial, with Serial2 in the pins 26 of the P14 connector (see the schematic that Will attached before, remeber that the arrow in the pcb indicate the first pin of the header) to a TX pin in the Arduino (in our case the TX2 pin in Arduino Mega) and the 31 (also in the P14 connector) to the RX pin in the Arduino. For powering the rodeostat you will also need to connect the ground from teensy (like the one in the P13 or P14 connector) to the ground in Arduino, and 5V of Arduino to the pin 5V in the teensy PCB. This last pin is located under the P13 connector, there are four pins and the sign "5V" are near the internal pin of the PCB but TAKE CARE the 5V pin is the one in front of this, the one near the border of the PCB. That letters lead to an error.
The Arduino software. You could use the one that @HoughA have post before, measuring the voltage between the "DAC BIP" hole in the pcb and a hole connected to ground. The voltage should change between 1 and 0 every second (if you polymeter don´t change this fast, just change the code and set a delay of 5 secs).
Teensy software. First of all, you will need to add this lines to the setup function in the Arduino file (these lines are specific if you are using Serial2 communication, substitutes them for your own system):
You will need also to change the functions that receive the messages from the normal usb serial port, and set them to receive by Serial2 port instead. For doing this just open the files ps_message_receiver.cpp and ps_message_sender.cpp (this one if you want to also receive the response in your arduino instead of your PC) from the potentiostat library and change every line in which you see "Serial." to "Serial2."
If you made only this changes you will have the problem that @HoughA have faced before; Your Arduino and your Teensy only communicates after you send something over the normal Serial port with a PC. This is because we don't have changed the Serial Event handler in the Arduino code. This handler triggers on with a new Serial communication and updates the message data.
This handler function is located at the bottom of your .ino file. Is called SerialEvent and you will need to change it to SerialEvent2 (To handle Serial2 events instead of Serial events).
Sorry for my poor English. Hope this comment has given you a hand.
@Will-Dickson Thank you so much for the suggestions. I could make it work with the AVRISPMKII programmer. Also, your modified firmware, especially the makefile was very helpful and made my work absolutely easy. Thank you once again.
After buffering the data, the limitation in sampling frequency appears to come from the testTimer function. This function has a specific runtime, and runs on a timer interrupt. If the timer interrupt's period (testTimerPeriod in ps_constants.cpp) is smaller than the actual time it takes for the function to run, the function does not run correctly, yielding incorrect and strange results.
For those looking to increase their sampling frequency, this seems to be the next bottleneck after the data streaming. Perhaps some alteration/optimization of this function could increase the sampling rate slightly, perhaps not.
Ultimately, to increase the sampling frequency of the Rodeostat, you can:
Decrease MinimumSamplingPeriod within ps_constants.cpp in order to remove the software limitation on sampling frequency
Remove calls to convertMstoUs in ps_periodic test and in ps_system_state.cpp, allowing for periods to be passed directly in units of us, rather than being limited to a sampling period of an integer in ms
In serviceDataBuffer (in ps_system_state.cpp) , modify the function so that it does not transmit data until test done flag has been set (by putting an if statement around most of the function).
With this we were able to achieve higher than the stock sampling frequency for a small number of periods (this was limited by the memory, since the data buffer would get filled with too many points since we did not clear it until the end). Unfortunately, high frequencies like 10kHz or 100kHz did not seem to be reachable.
In addition, thank you @Will-Dickson for your help figuring this out.
The values returned are the raw integers read from the ADC (analog to digital converter) on the output of the transimpedance amplifier (current to voltage converter). You will need to convert these integer values to current measurements e.g. uA. While it is possible to do a first principles calculation using the values of the feedback resistor in the transimpedance amplifier it is generally better to just do a simple calibration using a dummy cell consisting of a single resistor (of known value R).
The basic idea is to connect the counter and reference electrodes to one side of the resistor and the working electrode to the other side. You then want to sweep the voltages through a range of values - e.g. via a cyclic voltammetry test. Because the resistance R is known for each output voltage v(t) in the test you can calculate the current i(t) = v(t)/R through the resistor. At the same time you have the measured ADC integer values n(t) corresponding to this current. To get the calibration you can just perform a linear fit between the ADC integers n(t) and the know current values i(t).
When performing the calibration test make sure to select an appropriate resistor. You want to generate currents which span the input range (for current), but don't go outside of it. The transimpedance amplifier can't generate voltages higher then 3.3V or lower than 0V - so if you go outside of the current range you will get clipping (or saturation) of the output which will show up as a flat spot in your calibration data.
Oh gosh, you are right! I’m sorry for the delay but I was very busy. I have never thought to rotate the LED matrix because I thought I was right with that (otherwise, if not, no LED would have turned on). Thanks very much! I also take advantage of you for another issue. I have tried to load the arena configuration on the SD card but PControl doesn’t let me do that. Have you any suggestion? It seems that the controller doesn’t communicate to the SD nevertheless at the beginning (when the controller is switch on) PControl finds and initializes the SD card. I’m sorry because of all these questions!
Thank you so much! We tried rebooting it before with the potentiostat.ino file; however, we had set CPU speed to 96 MHz and Optimize to "FASTER". It is now working with the settings you specified. Thank you again.
At this concentrations, it should not be too much of a problem to measure Pb, even though GC electrodes are not very sensitive. Is -400mV a low enough potential to accumulate Pb onto the electrode ? Have you tried at -0.8V?
Also, I don't know if there is Cu in your solution but I remember having some disappearance of the Pb signal with addition of Cu.
If it doesn't work, maybe try a gold electrode which is a bit more sensitive to Pb. Or maybe modify your GC electrode by depositing some bismuth on the surface.
Corrosion monitoring and analysis usually takes a large dynamic range (eg polarization curves etc.) or requires measurements with respect to open circuit (LPR, EIS , OCP-monitoring). These are not well-suited to the current version of cheapstat.
It looks like the RTL8195 has 3.3V IO. The potentiostat shield powers the MCP4261 with 5V. So you are connecting a 3.3V device to a 5V device - I think. I'm not sure if the IO pins on the RTL8195 are 5V tolerant, but you might want to check. Could be related to you issue.
Note, the MCP4261's could be powered off of 3.3V. They have a pretty broad allowed input range 2.7 - 5.5V. This would require cutting one trace - the one going to the 5.5V on the shield - and rerouting this trace to to the 3.3V pin.
Below are some images of the green LED transilluminator we designed for a custom application using the superbright green LEDs I mentioned earlier. The enclosure is the same as the blue version, we just swap the 470 nm LED for the superbright green LED. A diffuser and green filter is placed over the LEDs as I mentioned.
The red viewing filter that sits above the LED board is actually a thin film Roscolux #26 filter which we laser cut.
Because it is thin, we have to support it. We can do this using a black frame.
Let me know what you think and whether this would work for your application.
We would be able to ship approx. a week after ordering. The lead-time would be on purchasing the LEDs from Superbright. Once we receive the LEDs we would ship 1-2 days later. The cost would be $225 for the fully assembled version with the 18V power supply. So it would be ready to use. I can send you a formal quote if you want to send me an email with your shipping info to email@example.com.
Hi...i am a new user here. I don't have much experience but as per my observation the control amplifier will still be running trying to control the voltage between the reference and working electrode, so can disconnect the counter electrode.