This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using MCP3008 10 bit Analog to Digital converter
I have experimented a little using the MCP3008 to read current from a smaller and simpler Hall effect current sensor. For some application 10 bit is enough and the MCP3008 has 8 single ended channels and 4 if used differential. Differential measurements makes more sense for these type of current sensors. 

The MCP3008 can also be used for voltage measurements and for this type a single ended measurement is quite ok, it also provide twice as many channels. 

The current measurement is documented at my project pages :

Please feel free to include any of this content in the Openplotter pages. Some day I'll try to find time and energy to include the MCP3008 in the Openplotter code in a similar way as ADS1115 in differential mode, including some contribution to the Openplotter documentation.

Hi Ole,
MCP 3008 is supported on openplotter 0.10.0 and above. It needs some aesthetic revision but it is working. See SPI tab.

Your site looks awesome! thanks for sharing
(2017-06-09, 05:47 PM)Sailoog Wrote: Hi Ole,
MCP 3008 is supported on openplotter 0.10.0 and above. It needs some aesthetic revision but it is working. See SPI tab.

Your site looks awesome! thanks for sharing

I agree about the GUI for the MCP 3008, but it's cool that it's supported in the 0.10 version. 
I plan to use the 10 bit ADC for current measurements where indication of current is nice, but does not really have to that accurate. Like individual current measurements of solar panels and other power sources. 
Ideally single ended measurements would be quite nice, however when the current sensors (Hal effect based, see : Hall effect sensors) produce a voltage from 0-5 (assuming 5V supply here) for a range from -max A to +max A. For single direction current half the range would be wasted, which is not so good when there is only 10 bits (1024 possible states). The ADC would give a count of 512 for zero current and 1023 for full current.  A better solution is to set it up differential and using a Vdd/2 reference (Vdd is supply voltage at the chip here) and just measure the difference between the Vdd/2 and the output from the current sensor.
Hence zero current yield 0 count n the ADC while the maximum are set by the voltage (using a reference like LM385) on the voltage reference pin
on the chip. To limit the range to a useful range one might use 1.2V reference or higher up to none at all by just plugging the reference to Vdd. 

For voltage measurements single ended is excellent, the simple solution is to just set up a resistor ladder to limit the current in case of a short circuit or isolate the voltage by an isolation amplifier like AD202.  Again the full scale reference pin is important as this is common to all ADC channels. 

I do more discussion about this at my project pages, just use the link for Hall sensors above. 

I am specially concerned about keeping the computer system isolated from the high amp system (think of it as 120 or 230 V), the power is comparable (100A at 12V is just as dangerous for short circuit as 10A at 120V). Hence my extensive usage of Solid state relays, Hall effect current sensors and isolation amplifier like AD202, not to mention the power supplies for the computer system. 


Forum Jump:

Users browsing this thread: 1 Guest(s)