I want to use a Raspberry Pi to detect whether a generator has started. I had planned to hook a 5V power supply to 1 of the 240V legs on the generator and then run that through a 3.3V voltage regulator to the Pi. When the generator is running it will make power and the Pi should detect the 3.3v. At least that was my thinking based on the research I have done for people with similar needs.
I have GPIO pin 3 configured as pull-down. Testing this the pin always reads 0 whether the power supply is plugged in or not. I am using the WiringPi GPIO utility from the command line.
`gpio read 3`
is the command. I would expect it to read 1 if there was voltage and 0 if not. I don't care about the voltage level, just that there is voltage. Testing with my meter it reads 3.29V, so I know the circuit is working and that should be close enough to the 3.3 for the Pi.