Mga sis, meron akong inclinometer na nag memeasure ng angle of tilt. Pwede siyang magoutput ng voltage proportional sa angle of tilt or pwede din i-send niya ito through SPI. The signal is to be received by a PIC24 MCU. Which option should I go for?
The distance between the PIC24 and the inclinometer is 3 meters. Ngayon pag nag analog ako, makakagamit ako ng low pass filters and software filters to smoothen out the signal naman pagbalik sa PIC, tapos gagamitin nalang yung ADC ng PIC to read the signal. Tapos isang shielded wire lang yung kailangan for data (other than the supply and ground).
On the other hand mas immune daw to noise ang mga digital signal. The problem is wala pakong experience using SPI. From what I understand, may clock, data in and data out pag SPI. Ang naisip ko lang since there are going to be more 3 meter wires pag SPI, parang masmadaming pwedeng pasukin yung noise tapos baka magcompound yun pag balik sa PIC. And yung clock, kaya ba umabot yun ng 3 meters ng maayos? What happens pag may noise yung clock? In this case rin, di ako makakagamit ng hardware filters para maayos yung signal and I will be relying solely on software filtering.
Tapos there is the question of resource use niya sa PIC. The PIC will be receiving other inputs from other sources and would be doing lots of other computations. So pag analog gamit ko yung ADC module ang gagamit ko. Pag digital, yung SPI module naman ang gamit ko. The question is, which one is more resource heavy (siguro in terms of the time it takes to process the data)?
Again, wala pa talaga akong experience implementing SPI, just the use of the PIC's ADC ,so my assumptions may be unfounded.