# In need of micro-controller recommendations

#### greenbean209

Joined Apr 16, 2019
6
I'm looking for a controller that is capable of taking two analog input (4-20mA), programatically performing some filtering and processing on the data based on some algorithms I've developed, and then producing a 4-20mA output.

I'm looking for something that is fairly ready to use hardware wise, I'm not experienced enough to design a board.

A few other specifications I have are:
16bit or 24bit ADC with at least 1k Samples/sec
16bit DAC

I've got experience using an Arduino but I'm not sure if it fits this application.
I'm hoping to find something with a wide user base with a good selection of math libraries available.

I'd really appreciate any recommendations you guys can come up with.

Thanks,
- Green

#### MrChips

Joined Oct 2, 2009
27,651
It will be very difficult to find an MCU with 16-bit ADC or DAC.
You will have to use external ADC and DAC for that.

4-20mA input and output will require external circuitry.

You did not say if you need "real-time" DSP, i.e. to produce analog output from input with a predetermined time delay.
For that, you will need to consider the DSP processing time and MCU speed.

#### greenbean209

Joined Apr 16, 2019
6
Yaakov,

That would be close to what I'm looking for but the ADC's on those board are too low 800 S/s. My testing showed the minimum I needed was 1kS/s.

#### MrChips

Joined Oct 2, 2009
27,651
Yaakov,

That would be close to what I'm looking for but the ADC's on those board are too low 800 S/s. My testing showed the minimum I needed was 1kS/s.
What are you measuring?

#### greenbean209

Joined Apr 16, 2019
6
It will be very difficult to find an MCU with 16-bit ADC or DAC.
You will have to use external ADC and DAC for that.

4-20mA input and output will require external circuitry.

You did not say if you need "real-time" DSP, i.e. to produce analog output from input with a predetermined time delay.
For that, you will need to consider the DSP processing time and MCU speed.
MrChips,

I'm not sure what DSP means.

As far as timing, the output needs to be able to keep up with the data acquisition, though a delay is acceptable as long as it is fairly consistent.

Essentially what I'm going to be doing is taking measurements across a set period of time, dumping the data that was collected into an array, performing some analysis, then coming up with a single value to output.

#### MrChips

Joined Oct 2, 2009
27,651
DSP stands for Digital Signal Processing, which is exactly what you are attempting to do.

I will ask the question again:

What are you measuring?

#### greenbean209

Joined Apr 16, 2019
6
What are you measuring?
MrChips,

I can't divulge too much but, I've got laser's that are measuring the distance of a surface as it moves. The issue is that even though the laser is very precise, the surface vibrates enough to add noise that needs to be filtered out.
Also the laser only outputs the current distance, while what I really need to do is keep track of the top and bottom of the surfaces's stroke, and digest that information and output it to a system that expects to receive the distance of the stroke.

I've demo'd this out using Labiew and NI's hardware but I need to come with a more compact and dedicated solution that I can install on our machine.

Joined Mar 10, 2018
4,057
PSOC has a 20 bit A/D, single or differential, ability to mux onchip, and filter.
32 bit ARM M3 core.

Here is an example (all onchip, note DelSig in example set for 8 bits, could have
set to 20 bits), and below just part of the resources on chip -

One limitation, at 20 bits its limited to 187 SPS. At 18 bits, 3000 SPS.

Attached is a list of components, a component is an onchip resource.

Low end board to use, with debug (IDE and Compiler free) is $< 15 - https://www.cypress.com/documentati...oc-5lp-prototyping-kit-onboard-programmer-and Here is the datasheet for the onboard digital filter component - https://www.cypress.com/file/137326/download Regards, Dana. #### Attachments • 178.5 KB Views: 1 Last edited: #### MrChips Joined Oct 2, 2009 27,651 This is a common issue on All About Circuit forums. The TS feels the need to protect some IP and refrains from providing the big picture. In my experience, there is very little that is so unique in electronics that deserves IP protection. More often than not, we find that it is an exercise in futility trying to provide a solution when the approach is the entirely wrong approach in the first place. When the TS prefers not to divulge of sensitive information then it may be better to communicate privately via PM or other means. With your specific problem, why do you feel it is necessary to go digital when there might be a simple analog solution? Thread Starter #### greenbean209 Joined Apr 16, 2019 6 This is a common issue on All About Circuit forums. The TS feels the need to protect some IP and refrains from providing the big picture. In my experience, there is very little that is so unique in electronics that deserves IP protection. More often than not, we find that it is an exercise in futility trying to provide a solution when the approach is the entirely wrong approach in the first place. When the TS prefers not to divulge of sensitive information then it may be better to communicate privately via PM or other means. With your specific problem, why do you feel it is necessary to go digital when there might be a simple analog solution? MrChips, It's not about IP, it's about ITAR so I have to be careful about what I say about the actual application. I've provided enough to explain the data I'm receiving and the data I want to output. As far as why it can't be strictly analog, is I need the ability to run an algorithm that detects the Top and Bottom of the surface's travel. Again, I've already proved out my program on my lab equipment, I just need to find a way to package this to work in an industrial setting. Thread Starter #### greenbean209 Joined Apr 16, 2019 6 PSOC has a 20 bit A/D, single or differential, ability to mux onchip, and filter. 32 bit ARM M3 core. Here is an example (all onchip, note DelSig in example set for 8 bits, could have set to 20 bits), and below just part of the resources on chip - One limitation, at 20 bits its limited to 187 SPS. At 18 bits, 3000 SPS. Attached is a list of components, a component is an onchip resource. Low end board to use, with debug (IDE and Compiler free) is$ < 15 -

https://www.cypress.com/documentati...oc-5lp-prototyping-kit-onboard-programmer-and

Here is the datasheet for the onboard digital filter component - https://www.cypress.com/file/137326/download

Regards, Dana.
Dana,

This is getting closer to what I need.
I don't quite understand how you would program this.
To me it looks like the language is C but I don't understand if you need to program it with a certain IDE. Like I said, I'm used to Arduino so forgive me.

#### Ya’akov

Joined Jan 27, 2019
6,853
MrChips,

It's not about IP, it's about ITAR so I have to be careful about what I say about the actual application. I've provided enough to explain the data I'm receiving and the data I want to output.
As far as why it can't be strictly analog, is I need the ability to run an algorithm that detects the Top and Bottom of the surface's travel.
Again, I've already proved out my program on my lab equipment, I just need to find a way to package this to work in an industrial setting.
If this is an ITAR compliant project, it seems most prudent to hire a consultant who can help you integrate this with full information about the project. It is nearly impossible for us to provide competent assistance with siloed information since everything about the project has a chance of being relevant to the advice. Consider that you, not knowing the answer to the question, are choosing how to present a constrained version of the problem. Because of your ignorance of the solution, your choice of presentation may well be misleading or simply wrong from the perspective of the solution.

Also, ITAR is so fraught I am not sure if you are being compliant even discussing this. Seriously. Have you spoken with a compliance officer about asking for help publicly?

Last edited:

#### MrChips

Joined Oct 2, 2009
27,651
If this falls under ITAR, I can't help you there. I'm outta here.

Joined Mar 10, 2018
4,057
Dana,

This is getting closer to what I need.
I don't quite understand how you would program this.
To me it looks like the language is C but I don't understand if you need to program it with a certain IDE. Like I said, I'm used to Arduino so forgive me.
Yes, programs in C, and uses PSOC Creator, Cypress IDE for PSOC.

https://www.cypress.com/products/psoc-creator-integrated-design-environment-ide

Here is a video series for PSOC 4, a subset of the 5LP capabilities. A series
of short videos which will help -

https://www.cypress.com/video-library/PSoC-Software/psoc-101-introduction-series/387726

A series on Creator (a lot overlap with above) -

https://www.cypress.com/video-libra...-101-0-getting-started-prototyping-kit/424881

Regards, Dana.

Last edited: