Why stepper motor power supply fluctuates - stepper

I am driving stepper motor using Raspberry Pi 3. I am using stepper motor driver Pololu A4988. A driver has potentiometer which we can adjust to provide specified current to the motor. My stepper motor current rating is 1 Amp and I am using 12 V 3 A power supply, but still when I start the motor power supply fluctuates. Even while using a 12V 5A power supply, the same problem is occurring. Please, Help and provide the solution.

Related

PI controllers for 4 motors in a Raspberry Pi 4

I am trying to create a code for a Raspberry Pi4 where I want to control 4 motors (there is not a limited lenguage it could be Python, C or C++ code as long as it works) . I already did the simulation in Simulink with a cascade Pi controllers (3 Pi controllers for control the location and 4 Pi controllers for each motor - I attached an image to be more clear) and the simulation works already good; however, I am not sure how to do it into the Raspberry Pi.
The main idea is that the little car has to move to different given coordinates (X, Y and Z coordinates, but Z is always 0) controlling the positon and the velocities from each motor. My understanding is only to code the Outer PI, Inner PI and the Bi(teta) (see the images I attached) because the motor model, the dynamic model and the kinematic model is done with the robot mobil, so it does not have to be code. In the case of the reference they have to be given in a data sheet (e.g excel file).
The motor driver I am using is two L298N (1 per 2 motors).
Here is the image of the simulation with the cascade P - (https://i.stack.imgur.com/XDrFo.jpg)
Here is the image of the Bi(theta) matrix - (https://i.stack.imgur.com/iMJNU.jpg)
I have never done something like this, if someone can give me a hint or explain me how it can be done I would really appreciate it!!
I hope my explanaition was good enough but if not feel free to ask for a better clarification.
Thanks in advance an have a great day!!

Controlling DC motors Using RaspberryPi and MDD10A motor driver

I am working on a robotic project and encountering difficulties in controlling two Dc motors. Anyway, I am using raspberry Pi 3 and Dual Channel 10A DC Motor Driver to drive two DC motors (Dual shaft self-locking DC worm gear motor). I am using the driver to drive bigger motor capacity and make them work as a servo motor. I managed to send signal and run the motors but I can't stop them running. Please any help, I would be thankful.
Import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BOARD)
GPIO.setup(12,GPIO.OUT)
pwm=GPIO.PWM(12,100)
pwm.start(20)
time.sleep(1)
pwm.stop()
In fact, I have little knowledge on controlling the motors.. if you can guide me or show me good reference I will also be grateful .

Raspberry Pi Zero I2C pull up + GY-521

I'm trying to talk via I2C to the gyro sensor MPU6050 which sits on a GY 521 board. But i can't get the device being detect.
I tested another i2c device (EEPROM) and got the device address detected. So i guess it has to be a hardware problem.
As far as i could find out:
RPi has a 1.8k pullup resistor on SDA and SLC already on board
my GY 521 also has also a pullup resistor (2.2k) on each line on board
Could the resistors be the problem? A good resistor value in sum would be around 5k on each line?
(The wiring should be ok, there are a lot of instructions around the net and i've checked it multiple times. I use 5v on the GY521 since it has a voltage converter)
Any help appreciated!
The problem was bad soldering.
For the record:
Using the RPi pullups in combination with the breakout board pullups works for me.

Anker Astro E4 to power Raspberry Pi

Looking for some help to be honest, This is not my area of knoladge atall.
Ive read around the question of powering my Pi with a battery, now I nabbed one of these guys for my phone
http://www.amazon.co.uk/13000mAh-Portable-External-Technology-Motorola-Black/dp/B00BQ5KHJW/ref=sr_1_cc_1?s=aps&ie=UTF8&qid=1420826597&sr=1-1-catcorr&keywords=anker+astro+e4
Incase the link dies in the future;
Item model number: AK-79AN13K2-BA
AnkerĀ® 2nd Gen Astro E4 13000mAh 2-Port (3A Output) Fast
Max 3A Out
5V Out
Now, from what i've read there have been mixed notes of, don't use batterys, only use this battery, don't do this, don't exeed this magical number ( which was differant each time ). so any help would be grately needed. If i was to power my pi via this thing. im I going to get a poof of smoke and need to replace the poor pi :(
A raspberry Pi is powered via USB, which means that it simply takes the 5V supplied via USB to run. As long as your current source is stable (ie. it doesn't change when you draw current from it), no device will care whether it is a battery or a switching power supply. Now, a bare raspberry Pi B uses less than 2W of power, 2W/5V = 0.4A = 400mA, so if that battery pack lives up to its specification, you are going to be fine. The device is spec'ed to provide 13000mAh, so at a constant current of 400mA, this would last you more than 32 hours.
Now, most people attach something to the raspberry, and that something will also draw power, but just add that power to the calculations above, to see if it's going to work out.

Raspberry B+ Power Supply calculation

I'm new to Raspberry Pi and I don't understand about electricity. I bought a Raspberry B+ today and a 5V 3A power supply, but I'm afraid to connect it because in several places I read about using 5V 2A power supplies. I believe that only higher voltages can damage the Pi but, since I don't know about Amp, I don't know if this is true for 3A too.
My ideia is create a mini-personal server in my home, running Pidora. For data, I have a 1 Tb external USB drive with no external power supply (Seagate model SRD00F1).
My questions are:
can I use the 5V 3A power supply on Raspberry Pi B+ without damage it?
this power supply is compatible with my external USB drive to keep it on safely?
Thank you!
The Raspberry Pi FAQ says that the B+ uses between 0.7 and 1.0 amps, and suggest a 1.2 amp power supply as a minimum.
Using a power supply with a higher amperage rating will not harm your Raspberry Pi. Devices only draw as much current (amperage) as they need. Any additional capacity is unused.
This is where your question about the external hard drive comes in. If you see in the FAQ, they suggest that you might want a larger power supply if you use all of the USB ports. Every USB device you plug in is going to draw more current. To figure out how much you need, you just add up the requirements of all of the devices like so:
Raspberry Pi = 0.7-1.0A
Mouse/Keyboard = 0.5A
Hard Drive = 1.0A
========================
TOTAL = 2.5A
(These numbers are all fake... be sure to check the requirements for your actual devices.)
So if your devices total 2.5A then a 3A supply will handle all of these plus some room for expansion. If all of your devices total 3.5A, maybe you need to consider a bigger one.