Aula πŸ’‘πŸ•ŠοΈ
Published © MIT

DIY Bubble Machine Using Raspberry Pi Pico 🫧

The project aims to create a soap bubble machine using a perforated plastic disc attached to a DC motor and a fan.

BeginnerFull instructions provided1 hour3,945

Things used in this project

Hardware components

Raspberry Pi Pico
Raspberry Pi Pico
×1
DC Motor, 12 V
DC Motor, 12 V
×1
Dual H-Bridge motor drivers L298
SparkFun Dual H-Bridge motor drivers L298
×1
Jumper wires (generic)
Jumper wires (generic)
×1
SB Components raspberry-pi-pico-board-gpio-expansion
×1
Axial Fan, Brushless Motor
Axial Fan, Brushless Motor
×1

Story

Read more

Schematics

Block Diagram

Code

The machine code

MicroPython
from machine import Pin, PWM, ADC
from time import sleep
# creating PWM and ADC objects
adc = machine.ADC(28)
pwm0 = PWM(Pin(0))     
Led = PWM(Pin(2)) 
# setting frequency of PWM output
pwm0.freq(50)       
Led.freq(50)  
IN1 = Pin(1, Pin.OUT)
# continuously control the brightness of the LED and the motor speed using the potentiometer
while True:
        digital_value = adc.read_u16()   
        # reading analog values from the potentiometer
        pwm0.duty_u16(digital_value)      # set duty cycle, range 0-65535
        IN1.low()  
        Led.duty_u16(digital_value)  # writing analog values to the LED 
        print(digital_value)
        sleep(1)  

Credits

Aula πŸ’‘πŸ•ŠοΈ

Aula πŸ’‘πŸ•ŠοΈ

55 projects β€’ 215 followers
Electronic Engineering

Comments