360 spin photography

I recently purchased a chinese 140mm rotating plate for displaying watches etc.

The switches control speed, an automatic reverse, and direction.
Holding down the the left/right direction button will stop the rotation, after about 3 seconds.

What I want:
Replace the current controller with a controller that gets triggered by a camera remote button to rotate about 10 degrees and stop, That's when I take a photo of a miniature bottle, which triggers the next 10 degree rotation, for a total of 36 pictures.

I have 1500 of these miniatures, so this will take me some time correlating these photos for 360 spin videos.

I removed the platter, and saw that the motor is a 28JBY-48 stepper motor.

The ULN2003 will fit in where the commercial board is, so it should be easy to replace it, and add a few support posts

So now I need some help with an Arduino Uno to program the ULN2003 board to rotate this stepper motor 10 degrees, then stop, until I'm ready to take another picture.
I take it that this Arduino board could be set up to remotely control the camera as well, so I could have a cup of tea while doing this 360 spin thingy on each of these miniature bottles

The ULN2003 will fit in place of the original, or it could go in the AAA battery compartment
There's also a compartment for an 18650 3.75V 3800mAH battery, which I will use to drive the ULN2003

Then I would place the Uno into a box that would sit underneath the rotating table (with power supplied by an adapter, and suitable cable for the remote camera trigger)
The combined units will then sit in a lightbox (custom designed by me, of course)

Can anyone give me some pointers on how to program this?

What’s on the bottom the two boards - especially the button board…

The chip shown is probably a micro (PIC?)
I suspect the stepper driver is underneath the button board.

Yep, the stepper driver is underneath the installed, commercial board. It also has a LED, and a micro USB port supplying just 5 volts.
The other board is loose and a ULN2003 driver that comes with the purchase of the 28BYJ-48 stepper motor.

If you have one, turn it over and have a look, because you will see exactly the same thing that I can see
It's only in the picture to show the relative sizes of the ULN2003 and the commercial board.

I tried adding two more photos, but the site monitor dropped in, and said that, as this was my first message, I was limited to only one photo.
The carousel has, from the left, "R/L", "SR" and "ASA"
"R/L" obvious
"SR" - changes three speeds, and
"ASA" not sure what the letters are for, but it puts the unit into an automatic forward/reverse mode of about 240 degrees. Useless, really.
Here I go, trying another photo -

Countless tutorials on line, easily discovered by the search phrase "arduino 28byj-48"

Wow!

So that is what the 28JBY-48 stepper motor is actually used for. :astonished:

Presumably not the only thing, but now we know the answer - one answer - to that puzzle.

The ULN2003 is a very poor choice for controlling a stepper motor, particularly at 5 V or even less - whatever the controller is on that original PCB would be far better, or a TPIC6B595.

I would be inclined to buy one of those displays to play with but they are just a little pricey merely for a plaything. :yawning_face:

You can buy them from wish for about $16, Ebay at $25, and Amazon for $28.
Up to about $400 via a display shop, but even at $16, my decision to buy one was not for a 'plaything', thank you very much.

12V version for sweeping vanes in AC outlet and operation of mechanism in table top ice making machine.

Tom... :smiley: :+1: :coffee: :australia:

Actually, the ULN2003 is fine for this project. In fact when you buy such a motor and driver it usually has a ULN2003

There are basically 4 pins on the ULN2003 (IN1 to IN4). You pulse each one of these in turn and the motor turns. I have experimented with the 5V version of these motor and drivers, and found that a 3ms pulse and a 10us gap between pulses gave good speed with OK torque. But play with the timings.

The gearing varies between models, but on my 5V motor, I need 2038 pulses per turn. Actually it is 2037.5, so there is NOT an exact number of pulses per 360 degrees. But you say "about" so try 204 pulses per 10 degrees. It is not precise but fine for your needs I think.

The power for the driver is supplied to the lower jumper in your picture.

Use an external 5V supply, as the motor need some current.

To enhance this project, you could even setup a flash sensor (say a tetp4400 ambient light sensor) to watch for camera flashes - assume you use a flash. Otherwise just a timing loop driving the camera remote then the motor would be sufficient for your drink tea.

Didn't suggest it was. :astonished:

But you do have a use for it. If I was to buy one - $12.33 + GST Australian - it would be to experiment with as I cannot offhand think of what I would display on it. :grin:

In general, I am not beyond buying little items simply because someone wanted to figure out how to use it here. The trouble is it takes three weeks or more for it to be delivered from China. :roll_eyes:

Thanks for the info
I bought a Jaycar Duinotech learning kit, and having some fun with it.
This is a bit like when I learnt Visual basic 6 about 20 years ago, so I understand the syntax and the construction problems
I've found a couple of programs for the stepper (and tried them) - now I've got to work out the code to do what I want the stepper to do.
This could be very helpful, as the miniature bottle club I belong to will be very impressed when I drop a lot of 360 spin videos on them.
Nearly all their displays are static (just pictures), so with a bit of luck, I might get them to start looking at a better way to display miniature bottles on their website
cheers - Graham

Hi Paul,
Yeah... when I started this exercise, I wanted a rotating display yesterday, but I had to wait.
I bought two, and promptly took one to pieces, to see what was inside

I've been playing.

First I got the Uno controlling the ULN2003 with just a small rotation of 10 degrees with a 3 second pause, just to get started

I've temporarily mounted the ULN2003 into the base of the carousel, and wired in the 16850 battery.

This is what it looks like

Seeing this site won't allow videos, I took snapshots of three of the 10 degree rotations, and combined them into a JPG. I think I will have to play with the amount of rotation, and the pause time a bit

Now what I have to do is see if I can trigger a camera during the pause, so I'll be scrounging through sketches for ideas
cheers all

I've finally come up with a solution that triggers a camera, then spins the carousel through selectable sectors/steps per sector for one full rotation, code coming (have to do some reading about posting it)

Now all I have to do is clean up my carousel and repair some of my soldering.
A drawing of the electronic circuit will follow.

One thing to remember - use a camera in manual mode (I have a Canon G15), so the focus is preset before using this sketch/carousel ( i.e. no provision for autofocussing)

#include <Stepper.h>

#define loStepCount   6           // First count control  (a 3 position switch)
#define hiStepCount   7           // Second count control
#define trigger       8           // pin that triggers carousel rotation 
#define shutter       A0          // camera shutter (analog pin, not a digital pin)

int steps;                        // Number of Steps to rotate one sector
int sectors;                      // sectors to complete one revolution

Stepper myCarousel = Stepper(56, 2, 4, 3, 5); // Instantiate a stepper object

void setup() {
  pinMode (loStepCount, INPUT_PULLUP);
  pinMode (hiStepCount, INPUT_PULLUP);
  pinMode (trigger, INPUT_PULLUP);
  pinMode (shutter, INPUT);
}
// the loop continually monitors the 'trigger' pin
// if the trigger goes low, get the hi/med/lo position of the steps switch
// take a picture
// rotate the carousel x sectors by y steps/sector
// (taking another picture at the end of each sector)

void loop() {

  sectors = 24; steps = 84;            // 24 sectors @ 84 steps per sector (8 short of 360 degrees)

  if (digitalRead(loStepCount) == LOW)
  { steps = 56;  sectors = 36;}        // 36 sectors @ 56 steps per sector (8 short of 360 degrees)

  if (digitalRead(hiStepCount) == LOW)
  { steps = 112;  sectors = 18; }      // 18 sectors @ 112 steps per sector (8 short of 360 degrees)

  if (digitalRead(trigger) == 0)       // trigger pin has been grounded
  {
    pinMode (shutter, OUTPUT);         // camera shutter
    digitalWrite (shutter, 0);         // ground the shutter
    delay(1000);                       // allow some time to take a picture
    pinMode (shutter, INPUT);          // reset camera shutter
    
    for (int i = sectors; i > 0; i--)  // 18, 24 or 36 sectors to complete nearly one revolution
    {
    if (i == 1) 
    {steps = steps + 8;}               // last sector - adjust steps to go 360 degrees
    myCarousel.setSpeed(90);           // rotate at speed selected
    myCarousel.step(steps);            // rotate steps as per Hi/Med/Lo switch setting
    delay (4000);                      // wait a bit while carousel rotates
    pinMode (shutter, OUTPUT);         // camera shutter
    digitalWrite (shutter, 0);         // ground the shutter
    delay(1000);                       // allow some time to take a picture
    pinMode (shutter, INPUT);          // reset camera shutter
    }
  }
}

Not as colourful as thought it would be

Hi,
It will be better if you posted your code in tags.
To add code please click this link;

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

By which time several many other small items will have caught one’s eye… :expressionless:

I’ve said before, the secret to avoiding the slow boat blues is to just keep ordering stuff. Soon enough you’ll be getting a dusty well travelled pkg every day or so and have way too many things to take you away from, um, more important matters.

Or perhaps these items can qualify as important.

a7

Oh, don't worry, I do just that.

Not sufficient to receive a package every day, but often enough. I believe we now have the postman Monday, Wednesday, Friday and I think (no, checked, I did,) I received at least one package each of these days this week. I do get a trifle excited when I spot his bike coming through the car park. :sunglasses:

Monday was a "bumper" day and I received two or three packages, but one was re-packaged by Australia Post and actually contained three or four little packages.

So far this includes a DP to DVI adapter, ten I²C "backpacks" costing $11.53 and ordered on the 8th (August) so I never have to use anything other than I²C for a 1602 or 2004 display, and another one came today which I had randomly bid for on eBay, forgotten and ended up paying 72 cents when I checked some time later. It seems this is nearly the only remaining design of backpack at present.

Also two

DFPlayer Mini MP3 modules ($5.29, ordered 25th July), a 50 LED string, five RCWL0516 radar sensor boards for $5.22 and three of the auto-reset programmer modules for the ESP-01 ($6.79; relatively expensive but makes programming the ESP-01 dead easy), one for here, one at work and one for my granddaughter. Just waiting on orders for another eight ESP-01S (ordered on the 12th).

No, not one every mail delivery but dribbling through from time to time. :grin:

Not dusty though.

Many things - like the DFPlayer, backpacks, RCWL modules and LED string - purchased in response to an enquiry on the forums here and in the expectation that if I find the time - and equally importantly, bench space - I can test it out with a view to some possible serious use.

@Paul_B

I just hand My pinball crown to you…

Those RCWL0516 work well. I’m sure you know what you are doing, but I can report that I had no zero any luck with them until I placed a largish capacitor to ground, a series resistor and another largish capacitor to ground on the 5 volt line powering the module.

I’m pretty sure my friend google helped with that, power supply de-emphasis?

For all I know, it was pure coincidence or the powers that be having me on, nevertheless it is now firmly on my did that and it started working list of superstitions.

The dusty packages I get are wrapped in repurposed garbage bag poly, and look quite like they have literally been rolling around below decks during their journey. Someone here has helped me learn to clean them up a bit before entering the envelope…

a7

Haven't tried them yet - like I said, bench space and pressure of work - but my modest research so far indicates two distinct versions of the board.

One uses the regulator internal to the main chip, while the version I received (matching the Aliexpress listing) has a regulator IC on the back of the board. I wonder what that indicates?

Could Paul_B and alto777 find a social site for any further messages to each other?
you're contravening the rules which, as a newbie, I've just read.
I had a stack of emails from the two of you, so I initially thought I had some interesting info for my project
All I found was you two rabitting on about postal deliveries
Thank you
Argusy

"Anal-retentive" much? :roll_eyes: