New answers tagged

0

I see 2 main problems with your code, that would make it behave strangely: You are calculating the new motor speed and decide about the direction based on the variable distanceToTarget. But this variable is only updated, when there is data coming from your MIDI interface. I guess thats only happening, when you want to change the target position. But the ...


2

The method to produce simultaneous pulses is simple, but requires a different approach similar to Direct Digital Synthesis (DDS). Keep one counter variable per motor Increment each counter variable by a set amount in a fixed time loop When a counter variable reaches a threshold value, generate a very short step pulse When a threshold is met, subtract the ...


2

I think you need to think a little differently. Instead of "Move it at this speed until you get to here" you need to think more along the lines of "Where am I? Where do I want to get to? How far away is it?" Basically the further you have to go the faster you want to go. The closer you get to your target value the slower you want to go. ...


0

Apply some impulse which you need your servo to work on


1

4.6V - 1.2V (2 diode drops of 0.7V) = 3.4V, close enough for the motor if you are using a MOSFET as a driver. You can use a UIS rated MOSFET with a Vgs of less than 4 and it will work perfectly. the transistor will give you an additional voltage drop of about 0.7 Volts and needs a base resistor. If you want to guarantee the motor will not start during reset ...


0

The grounds needed to be shared. The driver board ground needed to be connected to the Arduino ground. Otherwise your putting 17V in and only taking 12V out. Thanks to DaveNewton for this answer. I made this change and the torque was immediately fixed!


0

Hopefully you are powering the Arduino Vin with at least 7 volts. We know the Arduino a power supply it is NOT so where does the 5V come for the motors? You need to post technical links to the hardware items you are using. Are you calling relays reed switches? D11 and D12 sound like port pins, normally they cannot drive relays unless they are designed ...


3

Motors are inductive loads (they contain coils) that generate voltage spikes when switched off. These voltage spikes can indeed be nasty to other components. You need to add a flyback diode in parallel with the motor, with the cathode connected to Vcc. It will normally not conduct current, but when the motor is switched off, because the voltage spike is ...


3

I like your thought process (even though it might not be completely correct), I've seen how little thought were put in for such simple circuit design in the Arduino community, including from some Youtuber celebrity who teaching Arduino and claims to have an EE degree. BF547 is an RF amplifier transistor, not for switching application, it would be better to ...


-1

1st : you have to put an appropriate resistor between the output of your arduino and transistor Base pin 2nd : you have to connect you motor and biased transistor to >>>> a suitable power supply (which has enough current (Amps) on it's output) you can use this circuit instead of yours : 3rd : don't forget to use the diode in the schematic; it ...


0

(Moved to "answer" for space; it's definitely not an answer. Sorry all!) Minor points: It's a motor controller shield; the GRBL is on the Arduino. You'll need a motor controller at each motor; not clear if that's understood. I'd also consider optical comms, although it has a different set of problems. Ultimately I might approach this in a ...


Top 50 recent answers are included