Coder Social home page Coder Social logo

elehobica / pico_crp42602y_ctrl Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 1.0 8.13 MB

Control library for CRP42602Y auto-reverse cassette tape deck mechanism by Raspberry Pi Pico

License: BSD 2-Clause "Simplified" License

CMake 0.98% C++ 99.02%
cassette-player raspberry-pi-pico crp42602y cassette-tape cassette-deck rp2040

pico_crp42602y_ctrl's Introduction

Raspberry Pi Pico CRP42602Y mechanism control

Overview

Control library for CRP42602Y auto-reverse cassette tape deck mechanism

sample application

Features

  • Generate solenoid pull timing for the function gear of CRP42602Y to support Play A/B, Cueing and Stop control
  • Perform auto-stop action by rotation sensor of CRP42602Y
  • Support 3 auto-reverse modes (One way, One round and Infinite round)
  • Support timeout power disable to stop motor when no operations (optional)
  • Provide commands and callbacks for user interface

Supported Board and Peripheral Devices

  • Raspberry Pi Pico (rp2040)
  • CRP42602Y mechanism
  • Need additional circuit to drive solenoid

Pin Assignment & Connection

CRP42602Y connector

Pin # Name Function Connection
1 REC_B_SW Rec. protection switch of B side
(0: not protected, 1: protected)
to Pico GPIO input
2 ROTATION_SENS Rotation sensor to Pico GPIO input
3 GEAR_STATUS_SW Gear status switch
(0: in function, 1 not in function)
to Pico GPIO input
4 SOLENOID_1 Solenoid coil 1 from solenoid driver circuit
5 SOLENOID_2 Solenoid coil 2 from solenoid driver circuit
6 GND GND GND
7 CASSETTE_DETECT_SW Cassette detection switch
(0: detected, 1: not detected)
to Pico GPIO input
8 P12V 12V Power for motor and
IR LED for rotation sensor
from power circuit
9 REC_A_SW Rec. protection switch of A side
(0: not protected, 1: protected)
to Pico GPIO input

Raspberry Pi Pico

Pico Pin # GPIO Function Connection
4 GP2 GPIO Output to SOLENOID_CTRL of additional circuit (0: release, 1: pull)
5 GP3 GPIO Input CASSETTE_DETECT from CRP42602Y pin 7
6 GP4 GPIO Input GEAR_STATUS_SW from CRP42602Y pin 3
7 GP5 GPIO Input ROTATION_SENS from CRP42602Y pin 2
8 GND GND GND
9 GP6 GPIO Output to POWER_CTRL (optional) (0: disable, 1: enable)

Pin assignments are configurable

Schematic

Control circuit schematic

CRP62402Y_ctrl_schematic

The solenoid driver part is needed at least.

Head circuit (for reference)

CRP62402Y_head_circuit

Polarity information is relative, however, L/R polarities should be aligned.

How to build

  • See "Getting started with Raspberry Pi Pico"
  • Put "pico-sdk", "pico-examples" and "pico-extras" on the same level with this project folder.
  • Set environmental variables for PICO_SDK_PATH, PICO_EXTRAS_PATH and PICO_EXAMPLES_PATH
  • Confirmed with Pico SDK 2.0.0
> git clone -b 2.0.0 https://github.com/raspberrypi/pico-sdk.git
> cd pico-sdk
> git submodule update -i
> cd ..
> git clone -b sdk-2.0.0 https://github.com/raspberrypi/pico-examples.git
>
> git clone -b sdk-2.0.0 https://github.com/raspberrypi/pico-extras.git
> 
> git clone -b main https://github.com/elehobica/pico_crp42602y_ctrl.git
> cd pico_crp42602y_ctrl
> git submodule update -i
> cd ..

Windows

  • Build is confirmed with Developer Command Prompt for VS 2022 and Visual Studio Code on Windows environment
  • Confirmed with cmake-3.27.2-windows-x86_64 and gcc-arm-none-eabi-10.3-2021.10-win32
  • Lanuch "Developer Command Prompt for VS 2022"
> cd pico_crp42602y_ctrl
> cd samples\xxxx
> mkdir build && cd build
> cmake -G "NMake Makefiles" ..
> nmake
  • Put "xxxx.uf2" on RPI-RP2 drive

Linux

$ cd pico_crp42602y_ctrl
$ cd samples/xxxx
$ mkdir build && cd build
$ cmake ..
$ make -j4
  • Download "xxxx.uf2" on RPI-RP2 drive

pico_crp42602y_ctrl's People

Contributors

elehobica avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

piconexus

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.