Hi everyone,
I am working on a project where I have designed, built and soldered a circuit board that is meant to read the voltage of a 12v signal from a car battery. The board is meant to create a pwm signal that can be sent into a myrio-1900. The pwn signal out from my circuit board at high is around 4v and at low is 0.
I realize there are easier ways to do this like using a voltage divider, but unfortunately that's not how my course leader wanted it to be. Long story short, the 12v battery signal passes through a zenerdiode, then into an op amp. The op amp compares the battery/zenerdiode signal with a triangle wave to create the pwm. Then that signal is sent through an optocoupler, and gets boosted with a dc to dc convertor, which eventually gets connected to the myrio.
How can I design a program to essentially send the signal into the myrio, from my circuit board, datalog it and then compares the width of the pulse to my linear equestion y = -14,8x + 20,6 to understand where the voltage of the battery is?
I belive I need to run this all with FPGA, but not really sure. The main goal would be to just have the myrio connected in the car and do its own thing without actually having a computer connected. Then later I should be able to read the data and see what occured with the battery voltage over time.
I started out trying to understand how I could datalog a voltage - analog signal. However, I later understood that perhaps it was actually a digital signal in that I needed to use since its not the amplitude of the pwm signal that matters, but more so the pulse of the signal itself between high and low.
Would be very thankful for any help or guidance.
I will attach what I have so far, but am feeling its already far into the wrong direction.
Many thanks in advanced.
I am working on a project where I have designed, built and soldered a circuit board that is meant to read the voltage of a 12v signal from a car battery. The board is meant to create a pwm signal that can be sent into a myrio-1900. The pwn signal out from my circuit board at high is around 4v and at low is 0.
I realize there are easier ways to do this like using a voltage divider, but unfortunately that's not how my course leader wanted it to be. Long story short, the 12v battery signal passes through a zenerdiode, then into an op amp. The op amp compares the battery/zenerdiode signal with a triangle wave to create the pwm. Then that signal is sent through an optocoupler, and gets boosted with a dc to dc convertor, which eventually gets connected to the myrio.
How can I design a program to essentially send the signal into the myrio, from my circuit board, datalog it and then compares the width of the pulse to my linear equestion y = -14,8x + 20,6 to understand where the voltage of the battery is?
I belive I need to run this all with FPGA, but not really sure. The main goal would be to just have the myrio connected in the car and do its own thing without actually having a computer connected. Then later I should be able to read the data and see what occured with the battery voltage over time.
I started out trying to understand how I could datalog a voltage - analog signal. However, I later understood that perhaps it was actually a digital signal in that I needed to use since its not the amplitude of the pwm signal that matters, but more so the pulse of the signal itself between high and low.
Would be very thankful for any help or guidance.
I will attach what I have so far, but am feeling its already far into the wrong direction.
Many thanks in advanced.
Attachments
-
404.4 KB Views: 2
-
199.6 KB Views: 2