Danilk
Posts: 108
Joined: Wed Feb 01, 2017 7:47 pm
Location: Russia, St-Peterburg

Re: MCP3201 SPI bit bang

Sat Jun 10, 2017 1:53 pm

flohwie wrote:No averaging needed as the ADC data seem to be very stable .
Any ADC measurements should be averaged and controlled for fluctuations prevent, software or hardware way.

flohwie
Posts: 4
Joined: Sat Jun 10, 2017 7:39 am

Re: MCP3201 SPI bit bang

Tue Jun 20, 2017 7:09 pm

Of course, averaging is always a good idea. What I wanted to say that the measurements seem to be very stable,
compared to the values from the gpiozero library. Please ee the attached graph from 60 measurements within a
3 min time period:
ADC_testing.JPG
ADC values (every 3 seconds) with an LDR attaches.
ADC_testing.JPG (49.51 KiB) Viewed 1062 times
Cheers, W

andies
Posts: 141
Joined: Mon Nov 11, 2013 8:12 pm
Location: Berlin

Re: MCP3201 SPI bit bang

Tue Jun 20, 2017 8:18 pm

Wow!
raspberry B, Noir camera, Mac Book Air, iPhone, Bezzera

Danilk
Posts: 108
Joined: Wed Feb 01, 2017 7:47 pm
Location: Russia, St-Peterburg

Re: MCP3201 SPI bit bang

Wed Jun 21, 2017 11:02 am

flohwie wrote:What I wanted to say
why are you taking MSB from 1 mes but LSB from another 0.1s later?

flohwie
Posts: 4
Joined: Sat Jun 10, 2017 7:39 am

Re: MCP3201 SPI bit bang

Wed Jun 21, 2017 6:48 pm

The graph compares MSB measurement from the function I wrote with the measurements from
the function in the gpiozero library.
When coding I played around with the LSB mode ... Just for testing I used the 0.1 s wait time because it
is recommended in the datasheet. But of course, if you read 4 bytes at once, you could
calculate the ADC value from both the MSB and the LSB mode (and they should be the
same...)!

Danilk
Posts: 108
Joined: Wed Feb 01, 2017 7:47 pm
Location: Russia, St-Peterburg

Re: MCP3201 SPI bit bang

Wed Jul 05, 2017 8:11 am

I changed the solution on this chip in favor of the industrial unit
viewtopic.php?p=1165523#p1165523

Return to “General discussion”