I am required to generate and measure squared signal (PWM like). I should cover a 0-30VDC amplitude. High level of the signal is 30 VDC, low level is 0VDC. The bandwith to be covered is 0-20kHz. I should use Arduino to generate and measure these signals.
I thought that the more convenient way to achieve these operations would be a kind of "logic level shifter", but I cannot find a suitable component for my application. I would like to bring the 30V back to 3.3V and vice-versa so that the Arduino can both generate and measure the signals.
To circumvent the issue, I thought about transistors, comparators, voltage divider, amplificators,... but I am unsure about what to choose (COTS if possible) and think a bidirectionnal voltage level shifter would be the best solution since it would cover both the need to generate and the need to measure.
Any idea to address this issue ? It would be better if the component would be on the shell, but if a design from scratch should be done, it may be OK too.