Laser projection Unit controlled by Esp-32-s3 -- 2
Budget: $10 – $30 USD
DELIVERABLES
A completed Arduino program that can run the LPU in question
Request details
The website with similar project - https://habr.com/en/articles/438618/
Parts LPU
MCU - ESP32-S3-DevKitC-1-N8R2 - https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/user-guide-devkitc-1.html
Motor - PPN7PA12C1 - https://www.digikey.com/en/products/detail/nmb-technologies-corporation/PPN7PA12C1/2417079
Laser diode - Instapark DRM104-D003 - https://spwindustrial.com/instapark-drm104-d003-3v-5-mw-650-nm-red-o-4mm-dot-laser-diode-module-12pcs/
Stepper motor - WO-211-13-01 - https://lin-docs.s3-us-west-2.amazonaws.com/datasheets/digi-key/hybrid-steppers/WO-211-13-01.pdf
Photodiode for mirror calibration - Hamamatsu S5973
Motor driver - L298N motor driver - https://components101.com/modules/l293n-motor-driver-module
IDE - Arduino
Language - C++
Use header files and multiple files if needed.
Five pins
1 - POLY clock - polygonal mirror motor, we need only one signal — the clocking signal (POLY_CLOCK) produced by one of esp32’s timers working in PWM mode. Its frequency and duty ratio are unchanged while the projector is working. To power the motor, I use a separate 12V power supply.
2 - PWM signals - to control the vertical scan mirror are generated by another microcontroller timer. These signals are put through an L298N motor driver that controls the DVD motor. So, by setting different duty ratios for PWM channels of that time, we can change the turning angle of the motor.
1 - SYNC - The microcontroller generates an interrupt every time the laser beam hits the photodiode. At this interrupt, the current horizontal scan speed is calculated by MCU. After that, the special synchronization timer is reset. This synchronization timer generates its interrupts at particular moments during the horizontal scan. In particular, the laser control signal needs to be formed sometime after synchronization. My device forms it with a DMA+SPI combo. Essentially, these modules transmit a line of the image on the MOSI SPI output at the right time, one bit at a time.
1 - Laser on/off -After the image output is over, the laser should be turned on again so the photodiode can accept its beam. Laser modulation is done through one of the keys of the L298N motor driver. The R3 resistor is needed to protect the laser diode from overcurrent. It’s insulated and installed right at the end of the laser cable. To power the laser, I used an outboard power supply. It’s essential to control the laser current consumption and ensure it’s within the acceptable range for the particular laser diode.
Horizontal scan
Need to supply power and clock speed
The signal is a simple meander of the frequency from 20 to 500-1000 Hz.
Laser
Only needs power
Synchronization photosensor
Allows the MCU to track the position of a moving laser beam
More precisely, tracking the moment the beam hits the photodiode is needed.
During regular operation, the reflected laser beam should first hit the photodiode and then the vertical scan mirror.
After installing the sensor, I tested it by supplying voltage through the resistor and observing the signal with an oscilloscope — its amplitude was enough to connect the sensor directly to the GPIO input of the microcontroller.
Vertical scan
used the brush DC motor to control the vertical scan mirror.
Character Libary
Create a bitmap library of A-Z, both upper and lower case, and 0-9 and special characters so we can print characters and strings.
Overall
The polygonal mirror moves clockwise, so the laser beam moves from left to right.
The R3 resistor is needed to protect the laser diode from overcurrent. It’s insulated and installed right at the end of the laser cable. I used an outboard power supply to power the laser.
Based on the code off of https://github.com/iliasam/LaserText/blob/master/Firmware/Test8_103/src/main.c
https://habr.com/ru/post/438618/
A completed Arduino program that can run the LPU in question
Request details
The website with similar project - https://habr.com/en/articles/438618/
Parts LPU
MCU - ESP32-S3-DevKitC-1-N8R2 - https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/user-guide-devkitc-1.html
Motor - PPN7PA12C1 - https://www.digikey.com/en/products/detail/nmb-technologies-corporation/PPN7PA12C1/2417079
Laser diode - Instapark DRM104-D003 - https://spwindustrial.com/instapark-drm104-d003-3v-5-mw-650-nm-red-o-4mm-dot-laser-diode-module-12pcs/
Stepper motor - WO-211-13-01 - https://lin-docs.s3-us-west-2.amazonaws.com/datasheets/digi-key/hybrid-steppers/WO-211-13-01.pdf
Photodiode for mirror calibration - Hamamatsu S5973
Motor driver - L298N motor driver - https://components101.com/modules/l293n-motor-driver-module
IDE - Arduino
Language - C++
Use header files and multiple files if needed.
Five pins
1 - POLY clock - polygonal mirror motor, we need only one signal — the clocking signal (POLY_CLOCK) produced by one of esp32’s timers working in PWM mode. Its frequency and duty ratio are unchanged while the projector is working. To power the motor, I use a separate 12V power supply.
2 - PWM signals - to control the vertical scan mirror are generated by another microcontroller timer. These signals are put through an L298N motor driver that controls the DVD motor. So, by setting different duty ratios for PWM channels of that time, we can change the turning angle of the motor.
1 - SYNC - The microcontroller generates an interrupt every time the laser beam hits the photodiode. At this interrupt, the current horizontal scan speed is calculated by MCU. After that, the special synchronization timer is reset. This synchronization timer generates its interrupts at particular moments during the horizontal scan. In particular, the laser control signal needs to be formed sometime after synchronization. My device forms it with a DMA+SPI combo. Essentially, these modules transmit a line of the image on the MOSI SPI output at the right time, one bit at a time.
1 - Laser on/off -After the image output is over, the laser should be turned on again so the photodiode can accept its beam. Laser modulation is done through one of the keys of the L298N motor driver. The R3 resistor is needed to protect the laser diode from overcurrent. It’s insulated and installed right at the end of the laser cable. To power the laser, I used an outboard power supply. It’s essential to control the laser current consumption and ensure it’s within the acceptable range for the particular laser diode.
Horizontal scan
Need to supply power and clock speed
The signal is a simple meander of the frequency from 20 to 500-1000 Hz.
Laser
Only needs power
Synchronization photosensor
Allows the MCU to track the position of a moving laser beam
More precisely, tracking the moment the beam hits the photodiode is needed.
During regular operation, the reflected laser beam should first hit the photodiode and then the vertical scan mirror.
After installing the sensor, I tested it by supplying voltage through the resistor and observing the signal with an oscilloscope — its amplitude was enough to connect the sensor directly to the GPIO input of the microcontroller.
Vertical scan
used the brush DC motor to control the vertical scan mirror.
Character Libary
Create a bitmap library of A-Z, both upper and lower case, and 0-9 and special characters so we can print characters and strings.
Overall
The polygonal mirror moves clockwise, so the laser beam moves from left to right.
The R3 resistor is needed to protect the laser diode from overcurrent. It’s insulated and installed right at the end of the laser cable. I used an outboard power supply to power the laser.
Based on the code off of https://github.com/iliasam/LaserText/blob/master/Firmware/Test8_103/src/main.c
https://habr.com/ru/post/438618/