Rocket wrote: ↑
Thu Jul 29, 2021 5:11 pm
is diode is write way connected? it work in reverse in this case?
You may be missing the concept. The diagram is correct. The diode simply blocks any +12V from going into Speeduino from the sensor/module, but does not block grounding by the sensor, allowing the 5V from the Speeduino "Hall" jumper to be pulled-down by the sensor. This gives a 5V-0V signal with no signal conditioner board.
So, the Mega processor first sees +5V from the Hall pullup, and then sees 0V from the sensor grounding the 5V through the diode. Making sense?
To be more accurate, the signal is more like 5V-0.8V due to the diode drop. But, that is OK as long as the low part of the signal is below ±1.2V, which is the threshold for the Mega to see it as a low. For the high part of the signal, anything above ±3.3V works.