Page 1 of 2

external ADC

Posted: Sun Jan 25, 2015 3:57 pm
by AndreyB
In case we stay with not-5v chips, or in case if we decide to use something without a build-in ADC, what's our dream external ADC?

* 5v analog inputs
* at least 8 channels, 12 would be better
* SPI or other popular digital interface
* smaller is better
* cheaper is better
* ideally automotive grade

At the moment we are reading two channels @ 10KHz (MAP and HIP9011) and about 6 channels @ 10Hz.

Re: external ADC

Posted: Sun Jan 25, 2015 8:40 pm
by kb1gtt
I tend to think quickfilter chips. They have some really nice brick wall filtering options, controlled over SPI. This datasheet notes automotive applications. http://www.quickfiltertech.com/files/QF1D512%20SavFIRe%20Product%20Brief.pdf

Doesn't seem to expensive https://octopart.com/qf1d512-qn-t-quickfilter-2133781 at under $2 in low qty. However finding it in stock seems to be a problem. I don't recall it being that low cost either. I suspect that price is not accurate.

For $20 you can get it on a breakout board from digikey https://octopart.com/qf1d512-dipster-quickfilter-838325

Re: external ADC

Posted: Sun Jan 25, 2015 8:51 pm
by AndreyB
kb1gtt wrote:I tend to think quickfilter chips.
I am not sure if we are talking about the same thing. Looks like quickfilter operates with a wide variety of ADC’s - and I am looking for an ADC chip, not ADC accessory?

Re: external ADC

Posted: Sun Jan 25, 2015 9:09 pm
by kb1gtt
Quick filter has a couple options. The single channel chip I noted above is analog in, to SPI stream out. While other chips like the QF4A512 is analog in, filtered then analog out. Perhaps you are seeing the features of the QF4A512 which I would consider an accessory instead of ADC.

Re: external ADC

Posted: Sun Jan 25, 2015 9:13 pm
by kb1gtt
Oops, my bad, the QF4A512 is also to SPI, not AN pass through. I seem to recall there are chips that are analog pass through. These are AN to digital stream.

Re: external ADC

Posted: Mon Jan 26, 2015 12:56 am
by abecedarian
ADS7953-Q1 - 12 bit, 16 channel; ADS7252-Q1 - 12 bit, 12 channel
Both pin 'compatible', SAR, 0-5.25v range, external PGA / buffer, SPI, TSSOP-38, 4 GPIO / alarm output / configuration input, -40 to 125C
http://www.ti.com/lit/ds/symlink/ads7956-q1.pdf

Re: external ADC

Posted: Mon Jan 26, 2015 11:18 am
by kb1gtt
From digikey https://octopart.com/ads7953srhbt-texas+instruments-12195531 it's about $11 for low qty. I'm not crazy about the package, I would prefer to see flying leads for thermal expansion issues. That package can be made to work, but requires a bunch of stuff to make it play nice with thermal expansions.

Re: external ADC

Posted: Mon Jan 26, 2015 3:18 pm
by puff
what about ads1118? (am I right this can be used as 3ch adc?)

Re: external ADC

Posted: Mon Jan 26, 2015 4:46 pm
by abecedarian
kb1gtt wrote:From digikey https://octopart.com/ads7953srhbt-texas+instruments-12195531 it's about $11 for low qty. I'm not crazy about the package, I would prefer to see flying leads for thermal expansion issues. That package can be made to work, but requires a bunch of stuff to make it play nice with thermal expansions.
The package you pulled up is VQFN. Perhaps you want 38 pin TSSOP packages?
Newark $10.86 in quantity 1-9 http://www.newark.com/texas-instruments/ads7953sbdbt/ic-adc-12bit-1msps-tssop-38/dp/14N8510?ost=ADS7953SBDBT&CMP=AFC-JY6146109556
Mouser $11.48 in quantity 1-9 http://www.mouser.com/Search/ProductDetail.aspx?R=ADS7953SBDBTvirtualkey59500000virtualkey595-ADS7953SBDBT
Digi-Key $11.48 in quantity 1-9 http://www.digikey.com/scripts/DkSearch/dksus.dll?Detail&itemSeq=165267821&uq=635578656764164077&CSRT=10884961995326107320
Avnet $11.86 in quantity 1-9 http://avnetexpress.avnet.com/store/em/EMController?action=products&catalogId=500201&storeId=500201&N=0&langId=-1&slnk=e&term=ADS7953SBDBT&mfr=TIS
Arrow $8.61 in quantity 1-9 http://components.arrow.com/part/search/ADS7953SBDBT

puff wrote:what about ads1118? (am I right this can be used as 3ch adc?)
ADS1118 is 2 channel differential or 4 channel single ended.

But that does suggest an interesting idea. Since there are 'fast' and 'slow' sample rates, if the MCU has two available SPI, why not use two ADC chips?
If they can be set up in a continuous sample mode, DMA transfers can read them and put them into memories without processor intervention.

Re: external ADC

Posted: Mon Jan 26, 2015 5:47 pm
by puff
yep. ment to be 4ch. It might be you have a ready-made board layout for single chip in 2-ch setup? :D
I'm trying to draw an eight channel board, but it looks somewhat awkward.

Re: external ADC

Posted: Mon Jan 26, 2015 6:38 pm
by kb1gtt
On OEM discovery board we are running short of chip select lines, hence the 176 pin brain board. Getting many channels in one chip is handy as it would require less CS lines.

Re: external ADC

Posted: Mon Jan 26, 2015 6:56 pm
by puff
:shock: how many chips with cs lines are there on the daughter board?

Re: external ADC

Posted: Tue Jan 27, 2015 12:30 am
by kb1gtt
good point, the quickfilter 4 channel chip would require 4 chips to get 16 channels. It offers 512 tap filtering and a bunch of nice options, but would require many CS lines. While a chip with out the filtering would allow a trade off of less CS lines. I guess it depends on if the chip is used for the existing discovery board, or a different board with more IO.

So I guess we should split this into two items of interest. One is for an unlimited IO were we are aiming for best features, like we might do with an FPGA or the 176 pin STM. The other option that I think we have interest in, would be a better replacement for what we have on the frank boards. The op-amp is kind of bulky and has many parts. It would be nice if we could maintain the rugged nature with less parts or with less cost.

Current features of the op-amp buffered A/D include, low pass filtering, over voltage protection, under voltage protection, scaling the voltage from 18V to 3.3V, optional pull up or pull down resistors and impedance matching the STM's input. Can we find a better way to do that? Can we find a better way to do it if we aren't concerned about the number of CS lines?

Re: external ADC

Posted: Thu Feb 12, 2015 1:27 pm
by Sync
I guess we could just daisychain the external ADCs and use DMA as abecedarian said.
That way the ADC is running completely alone without robbing computational power. The software just looks at the right place for the values and does what it needs to do.

Can't we just use the internal ADC? We have 16 channels and enough speed to stay above 10kSPS at 12bit and 16 channels.
The ADC is connected to APB2 which is clocked at 84MHz max, ADCCLK is Pclk2/2 at best, so 42MHz. Conversion time is 15ADCCLK cycles,
giving us 2.8MSPS. Divide that by 16 channels we get 175kSPS (per channel!) - DMA overhead.

With some careful attention to how the timers are set up, we should be able to put the different channels into appropiate scan groups to always have the currently important data ready in the memory.

Sources: Reference manual around page 400 and datasheet page 14.

Re: external ADC

Posted: Thu Feb 12, 2015 10:51 pm
by kb1gtt
This tread was partly sources by a different thread about FPGA, which of course needs an external ADC. This tread was partly because we have many ADC components to buffer, scale, anti-alias, ect. Part of the conversation was to research if a chip could make our ADC situation better, part of it was to talk about a potential for FPGA like applications. Neither situation is likely to happen any time soon, it was just generic talking.

Re: external ADC

Posted: Sat May 30, 2015 7:42 pm
by chingon
Any chance we can have it transceived to CAN? Don't know if there's a chip that's both ADC and transceiver in a common package, but would make things compatible w/other systems if you wished to expand customer base. Obviously if you wished to not limit to one protocol and/or baud rate, an 'optional' transceiver (via jumper maybe) would be nice.


maybe even excitation voltage ;)

Re: external ADC

Posted: Sat May 30, 2015 8:09 pm
by kb1gtt
We plan for a version of this board http://rusefi.com/forum/viewtopic.php?f=4&t=769 to be a remote sensor via CAN option. It has ADC capabilities. The CAN protocol has not been determined. If you know of a protocol that might work well with existing devices feel free to comment and steer us in the effort.

Re: external ADC

Posted: Sat May 30, 2015 8:36 pm
by chingon
http://www.nxp.com/products/microcontrollers/product_series/lpc1100/series/LPC11C00.html
http://www.nxp.com/documents/leaflet/75017050.pdf
http://www.mouser.com/new/NXP-Semiconductors/nxplpc11c22lpc11c24/

althought 10 bit ADC's are kind of weak


CANOpen is an open protocol but not as widely implemented. Seems like most of the industry will stick w/CAN and/or CAN-FD

Re: external ADC

Posted: Sat May 30, 2015 10:23 pm
by AndreyB
chingon wrote:Any chance we can have it transceived to CAN? Don't know if there's a chip that's both ADC and transceiver in a common package, but would make things compatible w/other systems if you wished to expand customer base. Obviously if you wished to not limit to one protocol and/or baud rate, an 'optional' transceiver (via jumper maybe) would be nice.)
I want to make sure I understand your suggestion.

Are you suggesting an external ADC which would be talking to rusEfi via CAN? Are you suggesting to build a tiny ADC+CAN board to talk to rusEfi and anything (what exactly?) else? Are you suggesting consuming voltage information from CAN while something else would be providing it?

Re: external ADC

Posted: Sun May 31, 2015 12:18 am
by chingon
russian wrote:
chingon wrote:Any chance we can have it transceived to CAN? Don't know if there's a chip that's both ADC and transceiver in a common package, but would make things compatible w/other systems if you wished to expand customer base. Obviously if you wished to not limit to one protocol and/or baud rate, an 'optional' transceiver (via jumper maybe) would be nice.)
I want to make sure I understand your suggestion.

Are you suggesting an external ADC which would be talking to rusEfi via CAN? Are you suggesting to build a tiny ADC+CAN board to talk to rusEfi and anything (what exactly?) else? Are you suggesting consuming voltage information from CAN while something else would be providing it?
Yes to the bold part. Basically sensor info transmitted over CAN to rusEFI to be logged/used as needed (feedback for tuning if need be). As far as the excitation voltage, it'd be for active sensors such as strain based/pot/linear/etc... Isn't what this thread is all about?

receiving can frame is useful for sensor offset adjust (zero in). would allow users to daisy chain multiple modules if need be.

Re: external ADC

Posted: Sun May 31, 2015 1:07 am
by AndreyB
the original focus was on 5v ADC so that the dividers are not required. The idea to use LPC11C00 as such an ADC would be beautiful but only if it would be a 5v chip - looks like it's not :(

Re: external ADC

Posted: Sun May 31, 2015 3:28 am
by chingon
russian wrote:the original focus was on 5v ADC so that the dividers are not required. The idea to use LPC11C00 as such an ADC would be beautiful but only if it would be a 5v chip - looks like it's not :(

Honestly, I'm very green at this so just pasted the 1st one google spit out. Which turns out to be a relatively ancient mcu...
http://www.nxp.com/documents/data_sheet/LPC2109_2119_2129.pdf is a newer one and seems to tolerate 5 v

http://www.nxp.com/documents/data_sheet/LPC1769_68_67_66_65_64_63.pdf
still seems to need dividers...but at least 12 bit adc's.

http://www.analog.com/media/en/technical-documentation/data-sheets/ADUC814.pdf
6x 12 bit adc's 5 volt capable, 8 bit mcu, and no CAN on chip :(

http://www.freescale.com/files/32bit/doc/app_note/AN4442.pdf

maybe worth a look at pre-fabbed shields?
http://rascalmicro.com/docs-precision-voltage-shield/
http://store.rascalmicro.com/
pricey, but didn't do much digging
https://www.adafruit.com/products/1085
http://www.adafruit.com/products/1083?gclid=CN6Fi7yM68UCFQYxaQod_ogAuQ

Re: external ADC

Posted: Sun May 31, 2015 9:47 pm
by AndreyB
chingon wrote:http://www.nxp.com/documents/data_sheet/LPC2109_2119_2129.pdf is a newer one and seems to tolerate 5 v
"The ADC pads are 5 V tolerant when configured for digital I/O function(s)."
Only in digital I/O mode, so looks like not a 5v ADC.

Unless we find a magic chip with 5v ADC and CAN transceiver on board I doubt that CAN path would make sense :(

Re: external ADC

Posted: Sun May 31, 2015 10:15 pm
by puff
CAN adds up latency, while for many of the sensors you want to avoid it… I guess this refers to any 'digital' sensor.

Re: external ADC

Posted: Sun May 31, 2015 11:40 pm
by chingon
russian wrote:
chingon wrote:http://www.nxp.com/documents/data_sheet/LPC2109_2119_2129.pdf is a newer one and seems to tolerate 5 v
"The ADC pads are 5 V tolerant when configured for digital I/O function(s)."
Only in digital I/O mode, so looks like not a 5v ADC.

Unless we find a magic chip with 5v ADC and CAN transceiver on board I doubt that CAN path would make sense :(

Yeah, seems like all the 5v ADC/MCU combos don't have CAN built in. I still think you'd find a market for it (outside of Rusefi), if a CAN chip was built on the board and data could be sent over it. There's plenty of systems w/CAN input but not enough AD's built in, and many more loggers looking to capitalize on it as well (looking at aimsports/mychron,racecapture pro/autosports AEM/daq1, racelogic, ipetronik, csm, who all have adc to can offerings or inputs).

Then again, you'd have to come up w/a .dbc file creation software, or a configuration scheme of some sort.

If it was bypass-able for Rusefi use, and prevent the bottleneck that CAN gives, it'd be the best.

Re: external ADC

Posted: Mon Jun 01, 2015 12:52 am
by kb1gtt
Frankenso includes a CAN option. It includes 5V, CANH, CANL and GND. The 5V can support around 1.5A to 2A, so it can provide a communications channel as well as a power channel. CAN has been used to control an OEM digital dash. That's needles (RPM, Tach, voltage, temp, ect) as well as digital signals, and check engine lights.

Re: external ADC

Posted: Mon Jun 01, 2015 1:04 am
by chingon
kb1gtt wrote:Frankenso includes a CAN option. It includes 5V, CANH, CANL and GND. The 5V can support around 1.5A to 2A, so it can provide a communications channel as well as a power channel. CAN has been used to control an OEM digital dash. That's needles (RPM, Tach, voltage, temp, ect) as well as digital signals, and check engine lights.

I understand that, I guess what I'm not getting is, if this is an external ADC unit, and not an internal shield/board, why not expand the user base by making it CAN friendly? What digital 'protocol' is it going to use to communicate with rusefi?

CAN is less than ideal, USB probably most throughput; but I propose having the option to toggle and send over CAN would really expand user base

Re: external ADC

Posted: Mon Jun 01, 2015 1:09 am
by AndreyB
chingon wrote:why not expand the user base by making it CAN friendly?
Supporting a product is a nightmare. I am wasting time on rusEfi mostly because I am bored. Marking a small expansion ADC 2 CAN board is just not my thing :( Too much hustle with logistics and user support and warranty etc. etc. etc.

We have all the pieces to design one, but I am not sure if I have the motivation.

Re: external ADC

Posted: Mon Jun 01, 2015 1:25 am
by chingon
russian wrote:
chingon wrote:why not expand the user base by making it CAN friendly?
Supporting a product is a nightmare. I am wasting time on rusEfi mostly because I am bored. Marking a small expansion ADC 2 CAN board is just not my thing :( Too much hustle with logistics and user support and warranty etc. etc. etc.

We have all the pieces to design one, but I am not sure if I have the motivation.
Fair enough, as long as it remains open source I'm sure someone could always take it in that direction if they chose to. Just thought the extra revenue (if any) could come in handy to push Rusefi a little further.

Re: external ADC

Posted: Mon Jun 01, 2015 8:20 pm
by Tomin
I am for simple "protocol" on CAN like is described here:
http://rusefi.com/forum/viewtopic.php?f=13&t=751&p=13050#p13036
It is fully usable and simplest.