This would be my first Arduino project, and it involves two variable voltages that are 90 deg apart in phase (quadrature) that come from a hall angle sensor that need to be read (with the internal DAC) to measure its values, and each be compared to a reference to determine a resulting condition. So basically I am thinking of using two analog inputs, setup an internal reference, and then run the resulting values through a couple of conditionals and then apply some trig formulas according to the results of the conditionals to determine the value of the angle. The trig formulas are pretty simple and involve a calculated numerical value according to each analog input value and then to run it through an ArcTan function.
Once the numeric angle is determined I run that number through another set of conditionals to determine which of the 8 digital outputs to turn on that would indicate the angle bearing.
The application is meant to be able to interface a modern wind direction sender to an older display unit. The display shows the wind direction with 8 individual lamps that used to respond to 8 reed switches inside the sender unit that where setup in a circular arrangement and that would be triggered by a magnet that would move inside the circle according to the wind direction which could also trigger one or two adjacent switches to light the corresponding lamps. And if the resulting angular value falls between two of the main (N,NE,E,SE,S,SW,W,and NW) bearings, two adjacent outputs should be turned on in order to indicate an intermediate bearing to increase a bit the readout resolution, like for example for NNE would be achieved by turning on both the N and NE adjacent lamps.
The old sender unit got damaged and is no longer feasible to get a replacement, so I am trying to adapt a marine type sender that basically sends out these two variable out of phase voltages mentioned earlier and the intelligence inside its corresponding instrument would figure out where to point the needle of its dial by using a step motor. Since my indicator does not use a needle but rather 8 lamps, that is what I need to make this conversion for.
I have already written all the relevant code in a Perl scrip as a simulation and manually entering the two input conditions already works perfectly to "display" the correct wind direction outputs. So just wondering if I am on the right track here by considering to use an Arduino Nano which I just ordered off ebay. In the beginning was rather looking towards using a microcontroller chip, but after reading some of the quite easy to understand Arduino language and comparing it to the 200-300 (or more) page long uC datasheets I think I immediately knew what solution would be easier to implement.