Comments (4)
Because of the asymmetry of this driver (see the H-SW Control Function table on page 4 of the datasheet, HHHH→LL and LLHH→Off), you should use the modifications explained in #18 (comment)
Using those changes, then connect the driver as follows.
Arduino pin | Driver pin |
---|---|
2 (PD2) | AIN1 |
3 (PD3/OC2B) | PWMA |
4 (PD4) | AIN2 |
5V (Vcc) | STBY |
To wire the motor and the power supply, see the Typical Application Diagram on page 7 of the datasheet.
If you want to use more than one fader, you'll need to change the code for the other motors as well.
from control-surface-motor-fader.
Thanks for that quick answer. The code change seems simple enough and makes sense (though I don't understand most of the code, I understand what you are changing). I'll try it tomorrow and let you know the results of my attempt.
from control-surface-motor-fader.
So I've tried it (with the test reference), but it's not working. I have a theory:
I am using an Arduino Mega rev3. The pinout of it shows the PD2 as D19, the OC2B (which is the important part about this connection if I understood your comment on the other issue correctly) is D9 and PD4 is the RX LED, which makes it inaccessible for me.
I did try it with AIN1 to D19, PWMA to D9 and AIN2 to D3 (for a lack of better option). I tried using D2, D3 and D4 as well.
Reading the fader position with the print_controller_signals
flag works as expected. Driving the motor and touch detection work with a simple Arduino script, so the fader or driver aren't broken and the power supply should be sufficient.
Is there an easy way to make this work with the Arduino mega or should I just buy a nano?
Hardware:
The fader is the 5K version of the one you used.
The connections on the diagram are made with the letters / numbers from it's datasheet.
from control-surface-motor-fader.
It should be possible to make it work on the ATmega2560, but you'll have to change the pins used.
Specifically:
- pick a different port for the touch pins (e.g. PA instead of PB)
- pick different motor AIN1/2 pins
- change the overrun indicator pin from PB5 to PB7
In the code, change the following lines:
Control-Surface-Motor-Fader/Motor-Controller/main.cpp
Lines 146 to 148 in fe8a54f
Control-Surface-Motor-Fader/Motor-Controller/Touch.hpp
Lines 53 to 54 in fe8a54f
Control-Surface-Motor-Fader/Motor-Controller/Touch.hpp
Lines 78 to 82 in fe8a54f
Control-Surface-Motor-Fader/Motor-Controller/Motor.hpp
Lines 64 to 65 in fe8a54f
(Or your modified version)
from control-surface-motor-fader.
Related Issues (13)
- Problems using 8 motorized faders and Midi Interface HOT 12
- Motorized fader guidance HOT 7
- Sometimes a fader goes crazy, after hours working HOT 5
- How to connect lines?
- Use on Arduino Uno HOT 4
- At start, at I2C control mode, the fader goes to zero, but the motor don't stop
- PID controller pre-calculated Ki_Ts not possible ?
- Use library without touch sensitive motor faders HOT 2
- Midi Controller and Motor Fader Controller on Teensy 4.1 HOT 1
- Multi controller example HOT 1
- Stuttering with L298N H-Bridge HOT 4
- Some DAW not output PB Value when I move real fader HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from control-surface-motor-fader.