Closed jerabaul29 closed 3 years ago
@jerabaul29 (also, what is the difference between stating with @user and not?)
I wasn't sure what you meant with connecting the 3.3V to ADC1 and 3.3V to ground. WIll that work without a resistor? Anyway, I just attached a lab-bench power source 3.3V to A0.
I manually coppied the VSC onto my computer due to the '|' file name issues on Windows (see other issue), and ran VSC. Serial monitor output is below. I guess ADC7 is not 4096 (ignoring small fluctuations), as the Arduino is 3.33V technically, not 3.3V?
1.00 updated idx: 0 ADC 7 meas in time: 4090 4091 4095 4091 4090 ADC 6 meas in time: 2747 2746 2746 2747 2746 ADC 5 meas in time: 2808 2808 2810 2809 2809 ADC 4 meas in time: 2749 2751 2751 2753 2751 ADC 3 meas in time: 2810 2812 2811 2810 2811 Effective logging frequency over 1 second: 1.00 ADC avail at uS 172102170 elapsed us 1000003 elapsed ms 1000.00 elapsed s 1.00 updated idx: 1 ADC 7 meas in time: 4090 4091 4095 4091 4090 ADC 6 meas in time: 2747 2746 2746 2747 2746 ADC 5 meas in time: 2808 2808 2810 2809 2809 ADC 4 meas in time: 2749 2749 2751 2753 2751 ADC 3 meas in time: 2810 2806 2811 2810 2811 Effective logging frequency over 1 second: 1.00 ADC avail at uS 173102171 elapsed us 1000001 elapsed ms 1000.00 elapsed s 1.00 updated idx: 2 ADC 7 meas in time: 4090 4091 4095 4091 4090 ADC 6 meas in time: 2747 2746 2746 2747 2746 ADC 5 meas in time: 2808 2808 2805 2809 2809 ADC 4 meas in time: 2749 2749 2744 2753 2751 ADC 3 meas in time: 2810 2806 2803 2810 2811 Effective logging frequency over 1 second: 1.00 ADC avail at uS 174102167 elapsed us 999996 elapsed ms 1000.00 elapsed s 1.00 updated idx: 3 ADC 7 meas in time: 4090 4091 4095 4092 4090 ADC 6 meas in time: 2747 2746 2746 2743 2746 ADC 5 meas in time: 2808 2808 2805 2804 2809 ADC 4 meas in time: 2749 2749 2744 2742 2751 ADC 3 meas in time: 2810 2806 2803 2800 2811 Effective logging frequency over 1 second: 1.00 ADC avail at uS 175102170 elapsed us 1000003 elapsed ms 1000.00 elapsed s 1.00 updated idx: 0 ADC 7 meas in time: 4090 4091 4095 4092 4092 ADC 6 meas in time: 2747 2746 2746 2743 2743 ADC 5 meas in time: 2808 2808 2805 2804 2802 ADC 4 meas in time: 2749 2749 2744 2742 2739 ADC 3 meas in time: 2810 2806 2803 2800 2796 Effective logging frequency over 1 second: 1.00 ADC avail at uS 176102171 elapsed us 1000001 elapsed ms 1000.00 elapsed s
Oops sorry, typo, can you put a wire 3.3V to A1 and GND to A2? Of course wire 3.3V to GND was a typo as you noticed, we do not want to short the Due...
That looks good so far :) The idea is that I want to check that there are no cross talks between ADC channels :) . So want to check that I can measure 4095 on A1 and 0 on A2.
See serial monitor output attached :) SerialMonitor.txt
Perfect, this looks excellent :)
Can you now keep the exact same setup on A1 and A2, but change the sampling rate to 10Hz here:
and show me the output? :)
See attached. 10Hz works fine, tried 100Hz but then the serial monitor takes too much time to catch up with writing ;) SerialMonitor_100Hz.txt SerialMonitor_10Hz.txt
Excellent. This confirms that the ADC setup is fine. This was the only thing I was a bit stressed about for getting the logger to work. Now that I know this is fine, I am really quite confident that I will be able to set up a logger for you by the middle of december without problems.
@jvoermans I do not have a Due available at the moment. Will try to get my hand on one ASAP, but not sure how long it will take. Can you test this for me:
https://github.com/jvoermans/Vibration_Logger/tree/master/material_Jean/Due_ADC_reading
Can you put a wire between 3.3V and ADC1, and a wire between 3.3V and GND, and show me the output you get? :)