Coder Social home page Coder Social logo

emwanalog's Introduction

EMWAnalog

Analog-in firmware and hardware mod for the "Europe Magic Wand", a quality Hitachi Magic Wand clone.

This mod allows you to control the motor's speed with the envelope of an audio signal, through a regular 3.5mm jack plug.

Teardown

Be sure to unplug the EMW and wait a few minutes before taking it apart.

The EMW is held together by 3 big phillips screws:

  • On the back, close to the power cable, hidden by a plastic plug (hard to pull).
  • Under the buttons silicone strip (just glued, can be lifted with a flat screwdriver).
  • On the metal ring (visible).

Inside, the PCB is held in place by a central screw and two other ones used to fasten the power cable. The PCB needs to be pulled out with a bit of effort because of the silicone joints. Be careful about the flex cable going to the buttons on the back of the PCB, gently lift the black part of the connector to release it. The motor should come loose out of the casing.

Adding the input

Follow this schematic:

Schematic

Where JACK is the signal pin of a 3.5mm jack socket, and AIN the analog input pin on the STM8 (pin #2, "PD5/AIN5"). R1 and R2 must be the same value and above 10k.

I made the circuit with 1206 SMDs, but there's plenty of space for trough-hole components.

Schematic

I took the +5V from the regulator (U2), and ground from C13.

I fitted the jack socket next to the power cable, wrapped it in 2 layers of shrink tubing and hot-glued the wires to the casing to avoid any potential shorts with the mains voltage (you DON'T want that).

Schematic Schematic

The long wires do pick up some noise, but it's completly cancelled out by the firmware. Shielded audio cable isn't required.

Programming

Locate the 4 programming points on the underside of the PCB:

EMW

Connect a SWIM programmer (they're around $4 on eBay) to the annotated points. Start STVP, select STLINK as the programmer and STM8S003F3 as the device. Go in the OPTION BYTE tab. Make sure ROP is set to OFF and AFR0 to "Port C6 Alternate Function". Hit program, this will reset the protection and wipe the original firmware.

Back in the PROGRAM MEMORY tab, load main.ihx and hit program.

Usage

Individually, the "+" and "-" buttons work the same way. The speed steps should also be the same as the original ones.

Keeping both the "+" and "-" buttons pushed at the same time will toggle between the regular mode, and the analog-in mode. In the analog-in mode, the motor speed is multiplied by the amplitude of the input signal (so the speed adjustment and "off" speed still works).

Enjoy :3

Disclaimer

I'm not responsible if you fuck everything up and/or die. Be careful, this isn't your mom's dishwasher. This wasn't tested on animals (yet).

emwanalog's People

Contributors

furrtek avatar

Stargazers

 avatar  avatar

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.