rajbuddy007 wrote: ↑
Wed Apr 10, 2019 7:25 am
I want to make a test bench setup of Light control, button presser, flash detect and electromagnet control with raspberry Pi. Any help would be appreciated
Light control - LEDs bright enough to simulate ambient light/ charge device. Use PWM to control brightness.
Button Presser - Physically presses button - Use a GPIO pin to control
Flash detect - Light sensor attached to interrupt in RPi - GPIO pin with input buffer
Electromagnet - GPIO pin
Just tell me how to start the project
Identify the sensors and/or conversion you need to do (ie A to D)
Identify the type of outputs (just TTL or relay etc)
Start by either breadboarding it all up (a standard RPI has enough I/O pins)
If you need relays etc, look for a cheap Relay I/O hat
The PWM output will probably need a transistor to switch the LED, depending on its size. Large led arrays as you describe will probably require higher current FET switching.
Depending on the duration of the flash, you may want to trip an external logic latch, and then clear the latch after the RPI has read the input. A very quick pulse may be hard to trap depending on its duration. I like failsafe designs.