Skip to content

Latest commit

 

History

History
98 lines (63 loc) · 3.66 KB

README.md

File metadata and controls

98 lines (63 loc) · 3.66 KB

smart-dollhouse

Software running on Raspberry Pi Pico as the brains for smart dollhouse.

This is a perpetual work in progress. Also I am using it to learn python, so this is probably not a good example of python best practices.

Plans

  • Control the elevator with a resistive touchscreen, this is the primary reason for this project.
  • Control LED lights, possibly with motion sensor but also control via touchscreen.

Future Upgrades

  • Add sound / mic to give:
    • Doorbell
    • maybe voice control.
    • Lightswitch raves w/o the lightswitch

Main hardware used (so far)

  • Raspberry Pi Pico (running CircuitPy for Pico)
  • Lulzbot stepper motor I happened to already have.
  • A4988 stepper driver for the stepper motor.
  • 3.5" TFT 320x480 + Touchscreen Breakout Board w/MicroSD Socket - HXD8357D
  • 12V 5A switching power supply (From Adafruit, PID 352)
  • 5V 3A Buck Converter
  • Proto boards
  • Custom designed 3d printed parts / housing

GPIO Pin Use

Raspberry pi pico's GPIO pin usage for this project (so far)

PENDING

A4988 / Pi / Stepper Wiring Map

TODO: Add wiring diagrams to include all electronic components.

Left side

A4988 Pi
ENABLE -
STEP GP12
DIR GP13

If Pi GPIO usage is different than above, the mapping in the code in motor.py will need to be updated to match.

Right side

A4988 Pi Stepper Wire Color Stepper Extension Wire Color Connector Wire Color
2B - Blue Blue white
2A - Red Red yellow
1A - Black Yellow black
1B - Green Green red
VDD GP15 - - -
GND GND - - -

A4988 Output Adjustment

TODO: verify this is updated for the newer power supply.

The A4988 requires the pot (potentiometer) on the top to be adjusted. See the whitesheet for details.

The specs on the stepper motor call for 1.5A. The driver states it can go up to 2A but may require cooling above 1.2.

From the specs / datasheet:

VREF = 8 * IMAX * .068

So for goal of 1.4A (which seems to work well when using microsteps):

8 * 1.4 * .068 = 0.7616

So the pot should be adjusted so that the VREF is 0.7616.

Note that the A max listed for the stepper is 1.5A, and the VREF at that level (using the same formula) would be 0.816

Reminder that it is a function of the input voltage among other things, so needs to be re-adjusted if a different power supply used.

Pi Onboarding

Use the circuitpy build for raspberry pi pico, follow the instructions to flash to the raspberry pi.

Then copy the full contents of this project to the base folder of the CIRCUITPY volume that will show when the pico is connected to computed via USB.

For VSC editor, install rsync plugin to automatically copy files (if desired) on change. Also install CircuitPython extension.

Included libraries

Not all modules that we need are included baked into the raspberry pi pico's CircuitPy image. So the stuff we need, I grabbed it from github and just included the files directly in this project. Maybe there is a better way to accomplish this but it needed to be able to copy the libraries onto the pico easily. I left the files intact so the respective library file will include the source.