2

So I'm having issues with controlling the motor with this ic.

I have got it to work when it was unipolar with the uln2003.

I slit the red wire so there are only 4,two windings. Measured ohms across coils.

Pin 1 ic - 5v pos

Pin2 ic - gpio 27

Pin3 ic - yellow motor wire

Pin 4 ic - ground

Pin 5 ic - ground

Pin 6 ic - Blue motor wire

Pin 7 ic - gpio 22

Pin 8 ic - 5v pos

Pin 9 ic - 3v3 pi

Pin 10 ic - gpio 9

Pin 11 ic - pink motor wire

Pin 12 ic - ground

Pin 13 ic - ground

Pin 14 ic - orange motor wire

Pin 15 ic - gpio 10

Pin 16 ic - 5v pos

When I run:

import RPi. GPIO as GPIO 
import time

GPIO. setmode(GPIO. BCM) 
ControlPins = [27,22,10,9] 
for pin in ControlPins:
    GPIO. setup(pin, GPIO. OUT) 
    GPIO. output(pin, 0)

seq = [[1,0,0,0],[1,1,0,0],[0,1,0,0],[0,1,1,0],[0,0,1,0],[0,0,1,1],[0,0,0,1],[1,0,0,1]]

def rotate90(direction):
    if direction == 'CW':
        for i in range (128):
            for halfstep in range(4):
                GPIO. ouput(ControlPins[pin], seq[halfstep] [pin]) 

rotate90('CW') 
GPIO.cleanup()

The data sheets do not have a truth table(seq) as far as I can see. They also say to use diodes and caps(I'm assuming that's for efficiency).

The 28byj is making sounds, but isn't rotating. I think this is because of my truth table. What should it be?

Sorry for the messy question. I'm on my phone.

  • Yes, you connection data is messy. I can only count to 7, but you have 16! Can you draw me a picture? – tlfong01 Apr 27 at 4:26
  • Of course she is making sounds - she is complaining that you have made all the connections. You suspect your truth table, but can you show me your truth table? – tlfong01 Apr 27 at 4:32
  • Will draw one up now. – Alex White Apr 27 at 4:37
  • No hurry, I am going out to eat. See you later. – tlfong01 Apr 27 at 5:04
2

Question

Stepper 28byj48 unipolar OK with uln2003

Slit the red wire so there are only two windings

Measured ohms across coils. Pin 1 ic - 5v pos ... (OMG, 16 connection pairs!!!)

Answer

I did the same thing a long while ago. I vaguely remember I performed the following operation converting the stepper from unipolar to bipolar.

  1. Open the casing

  2. Cut away the red wire, so that the two windings do not electrically connected to each other.

unipolar to bipolar

Now I am googling something to read, and jot down some pictures, ...

uni and bipolar stepper

Now the schematic for L293D driving a bipolar stepping motor.

l293d stepping motor

I have found a L293D module in my junk box.

l293d module

Now I have shrinked and merged 4 big pictures into one big picture for my small eyes to look at.

big picture

The problem is we don't know the colour code of the wiring scheme. For example, what colour is for 1a, 1b, 2a, 3b etc. If we could not find the colour code, we may need to use the multimeter and a 6 battery to find by trial and error manually.

colour code

Anyway, now I have removed the casing of the 5 wire unipolar motor. Next step is find out which trace to cut to separate the two coils sticking together at the red wire, to make it a 4 wire, two non connecting coils, red wire don't care bipolar motor.

5 wire 4 wire operation

Now I am also thinking of testing my old stepper and compare how more powerful is, comparing to the small guy. The old guy costed me US$2 (a couple of years ago). The wires were badly torn, but I know there is no contact brushes to wear, so found it good and quite. A new one costed US$25. I thought it was very good money for a hobbyist to play with and learn something. As a newbie, I needed to google hard before I know how to use a battery, a multimeter, and a 1 pole, 12 throw to figure out which wire goes with which other wire, ...

old stepper 1

old stepper 2

A stronger stepping motor to replace 28BYJ48, should be strong enough to turn Rubik cube

stronger stepping motor

/ to continue, ...

References

28BYJ-48 - 5V Stepper Motor

Stepping Motor Fundamentals - Microchip

Control of Stepping Motors A Tutorial - DW Jones Uni Iowa, 1995

L293x Quadruple Half-H Drivers Datasheet - TI

MINI L293D DC/stepping motor controller board - ¥9.50

L293D DC motor control card dual h-bridge Module - US$ 1.43

  • Comments are not for extended discussion; this conversation has been moved to chat. Alex, you should be able to use this one. If not leave a msg here @goldilocks. – goldilocks Apr 27 at 13:34
  • I know you modified the 28byj48 uniplor stepping motor to bipolar, by tearing it down and disconnecting the common read wire. I did the same thing but found that changing from unipolar to bipolar does not make the motor much more powerful. You also changed the power sequence from half step to full step etc, hopping to increase torque. I also did the same thing, but not much improvement. I forgot to added that to increase torque, 28BYJ48 is very limited. I just found a more powerful stepping motor in may junk box, together with a "micro stepping driver". This combination is more powerful. – tlfong01 May 22 at 5:40
  • I forgot if you wish to rotate the Rubik cube using 4 stepping motors. 28BYJ24 is not powerful enough. I later used another more powerful one and found it OK to turn the Rubik cube. Perhaps I can show it later. – tlfong01 May 22 at 5:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.