MadModder

The Shop => Wood & Stuff => Topic started by: shipto on July 31, 2013, 05:48:27 PM

Title: carousel
Post by: shipto on July 31, 2013, 05:48:27 PM
I decided to make a model carousel for my grandaughter and feel confident now that I will at least be able to make it even if I dont have one with all the lights like I asked about in the "how to" section.
I started off by making a mistake pic1 the first carriages i made where much too big so I made 5 smaller ones (only need 4 but one is just in case).
Next I cut the playwood circles and ring will will make the base, top and deck of the carousel and glued many coffee stirrers to simulate planks onto the deck. The coffee stirrers are good for the scale but I need to make sure they show through the paint I will put on it.
that will do for now I will not rush to put all the pics up as I still have a very long way to go to complete it.
Title: Re: carousel
Post by: Brass_Machine on July 31, 2013, 08:28:13 PM
I love carousels. I will be watching this one!

Eric
Title: Re: carousel
Post by: shipto on August 01, 2013, 01:00:21 PM
Good brass machine I wasnt sure anyone would be interested.
The pics and stages are not in the order I did them I have skipped ahead here and there.
I made the centre section for the carousel, this needs to be hollow to house the motor and gearing and most probably the electronics or whatever I decide for the lights and music.
Some simple wire twisted with the drill soldered into some brass holders to keep the deck in place all painted gold, looks very impressive I think.
Title: Re: carousel
Post by: Brass_Machine on August 01, 2013, 01:11:09 PM
Good brass machine I wasnt sure anyone would be interested.
...

I think most people will be. Not everyone makes a comment though. Post away... it isn't in vain.

Eric
Title: Re: carousel
Post by: Brass_Machine on August 01, 2013, 01:12:33 PM
I would like to see how you did the wire twisting.

The decking looks nice. Is it just glued?
Title: Re: carousel
Post by: ddmckee54 on August 01, 2013, 01:48:23 PM
It's too late now since you've got the decking complete, but if you would have put a small chamfer on the edges of the coffee stirrers before you glued them down it would have helped make sure they show through the paint.  That would highlight the joint which is what I think you were hoping to do.  Another option is just do a clear finish on the deck and let the wood show through.

I build wooden models of construction equipment and I have yet to use anything to finish them other than clear or amber shellac with a polyurethane varnish top coat.

Don
Title: Re: carousel
Post by: shipto on August 01, 2013, 05:40:32 PM
the wire twisting was quite simple I had a fitting (from a gazeebo i think) lying around so just drilled a few holes either side of it then bent the ends of the wire fed them through the holes, put a nail in the vice and let the drill turn it until i was happy with the finish. I then just wound the rest to closely match the first one.
ddmckee54 I sorted that problem out by grinding the end of a small file to a sharp point and scoring between the stirrers using a ruler to avoid going off (second pic). As for not painting I did think about that but dont think it would be in keeping with a proper carousel. I think they are meant to be painted bright and cheerful colours.
Title: Re: carousel
Post by: Bluechip on August 01, 2013, 06:07:09 PM
Shipto
 
Are you still looking for a random generator wotsit for your lighting?? No way could I find the wretched circuit I prattled on about but I now have a much better method. Well MikroC does anyway. They have a RAND function that does it for PIC code in their compiler.
 
Ridiculously easy ... wanna see ?? If you want I could post the code.
 
 
Dave BC
Title: Re: carousel
Post by: shipto on August 01, 2013, 06:35:55 PM
Still not decided exactly how I am going to do it yet bluechip but if you could post or message me I will store it for justin case.
thank you.
Title: Re: carousel
Post by: Bluechip on August 02, 2013, 02:40:03 AM
Shipto
 
I assumed you would want 8 individual outputs, could be others, no trouble.
 
This is all it is.
 
 
Code: [Select]

int number;
int iter;
unsigned char _low;
unsigned char _0;
unsigned char _1;
unsigned char _2;
unsigned char _3;
unsigned char _4;
unsigned char _5;
unsigned char _6;
unsigned char _7;
void main()
{
    for ( iter = 1; iter <= 299; iter ++ )
    {
    number = rand ();
    _low = number >> 12;
        switch (_low)
        {
        case 0: _0 ++; break;
        case 1: _1 ++; break;
        case 2: _2 ++; break;
        case 3: _3 ++; break;
        case 4: _4 ++; break;
        case 5: _5 ++; break;
        case 6: _6 ++; break;
        case 7: _7 ++; break;
        }
    }
}
 

The rand() function produces a number 0-32768 ie 15 bits
The only two lines that do anything useful are
 
number = rand ();            // generates the number
_low = number >> 12;     // Shift right 12 positions

Most of that code is to vaguely determine just how random it is when it's squashed down from 15 to 3 bits. Not too bad. Although it does occasionally chuck out the same value in succession but it would be no big thing to stop that if required.
 
Anyway, sent it around for 300 laps and got this:
 
Dave
 
 
Title: Re: carousel
Post by: shipto on August 02, 2013, 06:03:19 PM
Thanks bluechip
copied and filed away, I am still not sure exactly what to use but like the idea of the microswitch cam method from the other thread, it somehow strikes me as more in keeping with the project.
Anyway a few more pics I painted the carriages in liberal amounts of primer to start with then in bright colours (apart from the black one) as a base also shown in this pic is a few of the horses I am going to use. The horses are not made by me but brought on ebay, I did not even want to try making 16 horses or more if you count discards. you will notice they are missing their tails so I will need to sort this out.
Title: Re: carousel
Post by: shipto on August 12, 2013, 05:05:24 PM
Not too much to report but I managed to scrounge a black and decker power screwdriver from a guy at work. It has a 6volt motor and a 2 stage planetry gearbox and is perfect for the drive  :D
My arduino arrived today so have been trying to get to grips with that and managed my first simple experiment by making the led blink dependant on the light shining on a ldr.
Title: Re: carousel
Post by: shipto on August 13, 2013, 05:35:35 PM
Stripped the screwdriver down and mounted the motor on a ally disc.
Title: Re: carousel
Post by: PTsideshow on August 14, 2013, 06:49:23 AM
Looks good so far, for working in the dark sort of. Sorry I didn't see this sooner. Here is a UK site you may find of interest if you don't have it. http://fairground-heritage.org.uk/
there was an on line magazine a couple years ago for Euro old funfair equipment, but sadly it now is a slot gaming site!

Here is the page with links to the photo's of some miniature carousel builders group members in the US. From mild to wild! http://carousels.com/mcb/  MCB is mostly centered in PA and the surrounding areas. They used to have a set of plans and some other stuff for sale. when I was a member years ago.
Contact info is at the top of the page email addy.

There is another group out of West Va for miniature carousels, but it seems to come and go.

Here is the internet center of the carousel world in the US. http://www.carousels.com/index.php
Title: Re: carousel
Post by: shipto on August 14, 2013, 01:02:22 PM
Thanks pt I have seen the carousels.com site and looked through the members models I might post them mine, assuming it looks ok when done  :lol:
Title: Re: carousel
Post by: PTsideshow on August 15, 2013, 06:25:56 AM
You have a really good start, And I have seen some pretty bare bones to a couple real crazy detailed ones. They have had some very folk artish ones from past members. I will have to find the newsletter with the mods to a import small tubing cutter that lets one turn out the twist brass tubing that is used animal hanger poles. :thumbup:
Title: Re: carousel
Post by: shipto on August 17, 2013, 01:58:34 PM
Been working on the drive today, after stripping down the screwdriver I turned the outer part out so it was straight and bored a new housing to press it into reassembled the gears and bolted the motor housing to it, after that I bolted half of the pan washer bearing? to the top and the whole lot is fixed to the carousel centre.
It turns a little fast (scaled up I think it would throw kids off no problem  :lol:) so the pwm is definatly needed.
Title: Re: carousel
Post by: shipto on August 26, 2013, 03:46:08 PM
Had a accident with the center column for the carousel and had to remake it but to avoid it breaking should the same thing happen I covered it with cloth and drenched the whole lot in glue.
Also made a start on the gearing to make the horses go up and down.
Title: Re: carousel
Post by: shipto on November 15, 2015, 01:05:48 PM
Its been a long time since I even looked at this project, amazing how other things get in the way but found myself at a loose end today so decided to do a bit with it and started by trying to remember exactly what I was doing so put it together and sized up the bars.
Anyway apart from the post to show this project hasnt gone by the wayside I am still having trouble with the gearing to move the horses and wondered if anyone had some ideas. The main gear needs to be 80mm id and up to 180mm od while the other 8 need to be about 26mm with a ratio of around 4.5 : 1
Title: Re: carousel
Post by: sparky961 on November 15, 2015, 02:08:19 PM
Although I'm not that interested in the carousel itself, I have to thank you.  Looking at the approximately 2 years since your last post made me feel a lot less alone when thinking about the myriad projects I've started and not "yet" completed.  Seems it runs in the community. :)

Glad to see you've rekindled the interest and best of luck with the continuation/completion.
Title: Re: carousel
Post by: shipto on November 15, 2015, 06:48:05 PM
 :lol:
I am almost losing track of the projects I have on the go at the moment in no real order of importance.
engine idea,
dirt bike rebuild
fixing lathe
heat bender for plastic
sorting out shop storage
the carousel
etc, etc and etc
Title: Re: carousel
Post by: SwarfnStuff on November 16, 2015, 02:08:06 AM
Ah Shipto.
     Our model engineering club has a saying, "One project at a time". Don't think any of us stick to it as there always seems to be a hiatus between operations. SO, what to do with the glue set time" or silver solder pickle time? Why, "Just start on this little project" and the rot sets in.
     Nice aim though?
Good luck with the carousel, they really look good when finished and running. Saw one at an almost, local (87km up the freeway), model exhibition a few years back..
John B
Title: Re: carousel
Post by: shipto on November 16, 2015, 12:22:47 PM
A really nice aim but most of my problems getting these projects finished is usually a lack of the proper tools for the job. I finally have a decent lathe thats capable of way more than I will ever need (famous last words?) but a milling machine would be the next thing that would help me with a lot of the projects.
Maybe sometime next year, will have to sweet talk the wife or better still make her something really nice  :D
Title: Re: carousel
Post by: shipto on January 15, 2016, 03:36:35 PM
Managed to spend a bit of time on this project at last. Made a tool from a old bit of parting tool and some flat stock.
Made some fixings for the bottom of the twisted bars which will fit on as in pic 3, still need to put a rebate in the bottom of them so they can sit flush on the wood and put some m3 grub screws in to hold everything in place before they are polished up.
I have also located the gearing for moving the horses up and down, already brought a large meccano crown gear and will order the small gears once the funds are available.
Title: Re: carousel
Post by: NormanV on January 15, 2016, 06:04:13 PM
I have always stuck to one project at a time. Trouble is, I am bored with my current project and as a consequence I am doing nothing!
Title: Re: carousel
Post by: shipto on August 24, 2016, 04:16:00 PM
Finally have progress to report on this long drawn out project. The major stumbling block (apart from getting sidetracked with other things) has been gearing to move the horses up and down and I have finally solved this problem I brought a 115 tooth 20dp meccano crown gear and after many failed tries I have made 8 off 22 tooth gears to match it.
Then I finished the little jig for bending the wire which the cams are formed from, it is 2mm fencing wire. so third picture shows all the bits presented in place on the top board which has already had the slots cut to allow the gears to mate with the crown gear underneath. I may have to increase the size of these slots a little as the wire is a little thick to bend sharply for holding the gear in place, I also need to cut out the openings for the cam sections of the wire.

Now I have got over this major hold up I am hoping that progress will be much better now.
Title: Re: carousel
Post by: Will_D on August 24, 2016, 05:17:31 PM
Good old Meccano!

I have about 50+ kgs of it stashed away!

I actually built the giant block setter as featured in all the publicity stuff!

It was in a Dublin toy shop over Christmas a long time ago. I still have the control cabin gearbox stuff and the cubic bit that runs on the rails. The geared roller bearing is a replica! originals are now worth a fortune!

The 6 foot boom was dismantled!!
Title: Re: carousel
Post by: tom osselton on August 25, 2016, 04:20:03 PM
I  got a meccano set about 50 years ago for christmas it was one of my favorite things for years well next to the rocket  crystal radio.  :beer:
Title: Re: carousel
Post by: shipto on August 25, 2016, 04:35:53 PM
I never got to play with meccano much as a kid :(
Its on my list as soon as grandkids get old enough though  :)
Title: Re: carousel
Post by: Will_D on August 25, 2016, 05:36:10 PM
@Shipto:

Best start buying now as there are still a few UK resellers of SH parts.
I used to send these guys loads-of-money:

http://www.hsomerville.com/mwmailorder/ (http://www.hsomerville.com/mwmailorder/)

But for the grandkids a good starter set (#4 or so) and get grandad to explain th edetails and job done. More madmodders in the pipline!
Title: Re: carousel
Post by: tom osselton on August 25, 2016, 07:03:19 PM
Have you used the 3d software it looks as if it could come in handy!
Title: Re: carousel
Post by: awemawson on August 26, 2016, 02:53:51 AM
I understand that Mecano is now made in Pas de Calais in France. Bins Road Liverpool when I was a boy.
Title: Re: carousel
Post by: shipto on August 29, 2016, 03:31:52 PM
Well after so long with nothing at all to report on this project the progress is dizzying  :lol:
Bank holiday today (sorry Scotland didnt mean to rub it in  :lol:) so first off went around my mates to use his bandsaw to rip a bit of wood into 6mm strips one of which I wrapped in plastic and inserted the pipe from a wallpaper steamer in one end so I could make a circle for the decorated top bit. While at mates workshop I made use of his sander to clean up some little laminates I made as supports for the middle of the cams.
Once I got home I did the circle which took a bit of work as the wood I had was some old stuff which had nail holes and these made keeping a circle difficult I may have to redo this with some better wood but we will see. I glued the supports to the top and once dry I made the channels that the cam wire sits in.
I am still a little unsure how best to secure the gears to the wire, I am thinking of soldering them together but any ideas would be listened to.
Title: Re: carousel
Post by: shipto on September 01, 2016, 03:28:22 PM
Have got the top looking more carousel like now  :)
Title: Re: carousel
Post by: shipto on September 04, 2016, 03:25:24 PM
Most of the work on the mechanical bits has been done this weekend and it can all be stripped off again to tidy it all up.
Title: Re: carousel
Post by: SwarfnStuff on September 05, 2016, 02:10:53 AM
This seems to be coming along nicely Shipto.
     I realize that there is a long way to go so will be patiently waiting along with the rest to see the finished product. I did see one at the Melbourne model engineers expo about two years ago and it was fantastic. Carousel music and all.
Congrats on getting this far even with (as I recall) being interrupted by other projects and honey do stuff.
John B
Title: Re: carousel
Post by: shipto on September 05, 2016, 06:08:18 PM
Thanks the hardest part for me is going to be the decoration, I am not great at the arty stuff and the old failing eyesight isnt going to help any.
Not even decided on the words to go around the top yet with the exception of Madison(s) which is my grandaughters name  :doh: only another 5 to go.
Title: Re: carousel
Post by: SwarfnStuff on September 06, 2016, 02:38:19 AM
That be a Problem we share Shipto. Arty stuff is not in my repertoire either. Set square, T square and drawing board, (now superseded by CAD) is my preference.
  I suppose one could go all modern art and just chuck paint at it?  :hammer: No, Bad John Bad.  :loco:
Oh well, we like challenges and testing our skills. er, supposedly anyway.  :scratch:
I'm sure you will come up with something rather spectacular. Bribe an arty friend perhaps?
John B
Title: Re: carousel
Post by: tom osselton on September 06, 2016, 05:19:42 PM
Ask the wife she could have a hand in it they usually do crafty stuff with their friends or they do out here.
Title: Re: carousel
Post by: shipto on September 07, 2016, 04:45:04 PM
Ask the wife she could have a hand in it they usually do crafty stuff with their friends or they do out here.
Not my wife she tries things on occasion and usually loses interest about a quarter of the way through  :bang:
Title: Re: carousel
Post by: shipto on September 09, 2016, 11:23:02 AM
Well not entirely happy with my attempt at the artwork but I guess it will show its all done by hand  :scratch:
The outlining is done and started to do the borders but was not going straight enough so will leave it to dry and mark a guide line before I continue.
Title: Re: carousel
Post by: shipto on September 10, 2016, 05:27:24 PM
Bit better
Title: Re: carousel
Post by: tom osselton on September 10, 2016, 05:32:32 PM
Looks good I'm sure she will be thrilled!
Title: Re: carousel
Post by: mklotz on September 10, 2016, 06:13:39 PM
Is that a British spelling of 'marvelous'?
Title: Re: carousel
Post by: DMIOM on September 11, 2016, 03:08:51 AM
Yes Marv - that's the normal spelling of Marvellous:

http://www.oxforddictionaries.com/definition/english/marvellous

Dave
Title: Re: carousel
Post by: mklotz on September 11, 2016, 10:30:35 AM
Yes Marv - that's the normal spelling of Marvellous:

http://www.oxforddictionaries.com/definition/english/marvellous

Thanks.  I try to keep track of the differences between British and American spelling but I'd never encountered this one before.
Title: Re: carousel
Post by: awemawson on September 11, 2016, 11:25:19 AM
The mid Atlantic is full of odd letters and the like that get lost in transit  :lol:
Title: Re: carousel
Post by: shipto on September 11, 2016, 01:52:08 PM
 :lol: do you think the missing i from aluminum is there?
Anyway added some bling today.
editted to put correct photo in post.
Title: Re: carousel
Post by: mattinker on September 11, 2016, 02:35:49 PM
That's looking really good!

Regards, Matthew
Title: Re: carousel
Post by: RobWilson on September 11, 2016, 03:16:56 PM
:lol: do you think the missing i from aluminum is there?


 :lol:

More like Klutz was probably just trying to be a smart arse.

Rob
Title: Re: carousel
Post by: shipto on September 11, 2016, 03:36:18 PM
Thanks Matthew I still have things to do but I have to be careful of getting carried away and spoiling it with too much decoration.
Actually the pic is a little dark will have to retake it with the flash on.
Title: Re: carousel
Post by: shipto on September 22, 2016, 05:00:20 PM
ok so I am pretty happy with my work on the top of the carousel and I have put it to one side to start on the body now. I drilled 96 holes in the top for the leds to go into or rather the leads of the leds will go through leaving the leds totally proud and made some trim pieces to go on each of the corners. I have drilled 8 holes in each and glued leds into those as well. in total it will have 192 leds by the time I have finished.
I have decided to use a arduino mega to control the carousel as it allows me to have 48 outputs for the lights leaving me with a couple to control speed and maybe music too. The main thing I cant decide is if I should have 48 sets of 4 lights which will allow me to control all the way around the carousel but limit the effects possible a little or 48 set of 2 lights and just have the lights on 3 of the sides mimic the lights on the controlled side which will allow for better lighting effects  :coffee: all assuming I can hack together enough code to do all I want to do.
Title: Re: carousel
Post by: SwarfnStuff on September 23, 2016, 03:37:41 AM
Looking goodera and goodera Shipto. An interesting and well documented build that will look extra flash with the bling of dancing LEDs. Looking forward to the next installment.
John B
Title: Re: carousel
Post by: shipto on September 25, 2016, 03:35:09 PM
Wires lots and lots of wires  :bang:
found a better way to control them with the arduino (dont even need the mega) shift registers 6 of them to be precise all just using 3 pins on the arduino.  :ddb:
so currently in the process of converting binary and noting down lots of numbers to feed the arduino hopefully from a file on a sd card.
Title: Re: carousel
Post by: shipto on October 05, 2016, 05:41:06 PM
All 192 led's now have wires the top most ones have resisters in line under the heat shrink sleeving. If I had planned ahead I could have got the wires quite a bit neater but they will hopefully remain hidden for the life of the carousel so they will do, its a lesson learned for next time.
I really should sit down and learn the code needed for the arduino but every time I intend to give it some time I seem to think of something else I need to be doing  :doh:
Title: Re: carousel
Post by: SwarfnStuff on October 06, 2016, 02:01:16 AM
Well Shipto,
   You keep plugging away at the carousel and we will keep waiting for the next installment with keen anticipation.
Thanks for posting.

I Can relate to the fact that the other stuff you need to do gets in the way of spending time learning to program the Arduino. I have played with the idea of getting one of those Arduino kits and playing / learning that way but life continues to interfere with many of my little plans. Oh Well.
John B
Title: Re: carousel
Post by: shipto on October 11, 2016, 04:00:48 PM
Kind of success with the arduino coding I have it reading some numbers from a txt file on a sd card and sending the resulting binary out to the shift registers just need to figure out why it's quitting after about five minutes now.
http://www.youtube.com/watch?v=MRSiTSxNWO4
This mock-up is only using two of the six shift registers but it gives a idea of the kind of effect I will get from the full thing.
Title: Re: carousel
Post by: shipto on October 14, 2016, 05:44:03 AM
Definate success  :ddb:
I have altered the code and it now works and I have even figured out how to do away with the delay() so the arduino can now control the lights and the motor speed at the same time wanted it to control the music too but I think this may be a bit ambititous for someone like myself who is basically hacking bits of code together.
this video is taken after it has been running for about 10 minutes and is still running as I type this:
http://www.youtube.com/watch?v=Kbzzkt0wo8E
Title: Re: carousel
Post by: DMIOM on October 14, 2016, 07:28:33 AM
Bravo!  :clap:  :clap:  :clap:
Title: Re: carousel
Post by: Noitoen on October 14, 2016, 09:00:51 AM
Ancient fair rides I used to service had some simple 8 channel light sequencers that were made with a simple EPROM and a binary counter. The 8 bit data on the EPROM was programmed with the sequence and the counter with a simple oscillator sequenced a few dozen of addresses in the memory in an endless loop. With 8 high power static relays they drove hundreds of little lamps around the ride.

Now a days they use computers and a data bus like modern stage lighting to control multicolored led walls.
Title: Re: carousel
Post by: shipto on October 14, 2016, 01:53:50 PM
I guess mine is somewhere in between the two (towards the lower end  :lol:)
but the center is almost finished now and I am soon going to be in the position where I need to join the leds to the eletronics.
Title: Re: carousel
Post by: SwarfnStuff on October 15, 2016, 02:05:45 AM
Going well Shipto,
      Aren't cable ties wonderful gizmos? Everything from the garden to wiring to handcuffs. Oh, and not forgetting those annoying election posters (here in OZ anyway).  :lol:
   We all await the next installment and piccies.
Thanks for the interesting post.
John B
Title: Re: carousel
Post by: shipto on October 22, 2016, 01:07:33 PM
Well a little more progress today I got another strip of wood bent into a circle for the base where all the electonics will be housed, just need to let it dry overnight and I can scarf it together tomorrow.
Also got the platform attached to the top of the carousel I can get a better idea of how long the bars for the horses have to be now.
Title: Re: carousel
Post by: SwarfnStuff on October 23, 2016, 12:43:30 AM
I can't recall seeing any horses thus far Shipto.
    Are you planing to make them or is there somewhere to buy wee horses? To make them will test your skill and patience I think.
 I just searched, "miniature Carousel Horses" and did find some so all is possible depending on the depth of your wallet.

John B
Title: Re: carousel
Post by: shipto on October 23, 2016, 07:47:23 AM
I can't recall seeing any horses thus far Shipto.
    Are you planing to make them or is there somewhere to buy wee horses? To make them will test your skill and patience I think.
 I just searched, "miniature Carousel Horses" and did find some so all is possible depending on the depth of your wallet.

John B
Post #10 swarfnstuff the horses are meant for dolls house rocking horses its one of the few things I didnt mind buying predone as wittling 16 horses would have been far beyond my patience and probably skill too.
Title: Re: carousel
Post by: SwarfnStuff on October 24, 2016, 03:50:09 AM
Thanks Shipto,
        I didn't go far enough back in either my look-see or my befuddled memory bank. Yep, Don't blame you as unless you are a whittling addict 16 horses would extend this project till we both are too old to read the posts perhaps.  :lol:
Good stuff so far.  :clap:  :clap:
John B
Title: Re: carousel
Post by: shipto on November 06, 2016, 11:22:42 AM
More progress to report.
I finished (apart from the decorating) the base and got the center column fixed to it and then started on the hangers for the horses, to start with I put the hooks opposit to each other with the intention of making them a bit like a bayonet fitting it wasnt until I started to put the horses on that I realised by the time they where glued on I wouldn't be able to turn them far enough  :Doh:
So remade the hanger bars with the hooks the same way this time and glued the horses to them just need to paint them gold now and will be ready to crimp them so they cant come off or move sideways and foul up.
Title: Re: carousel
Post by: tom osselton on November 06, 2016, 05:31:41 PM
Looks great!
But where is the Brass ring?  :D
Title: Re: carousel
Post by: SwarfnStuff on November 07, 2016, 12:37:07 AM
Looking bettera and bettera.
Waiting for the video of it running. Keep plugging away.

John B
Title: Re: carousel
Post by: shipto on November 07, 2016, 05:16:58 PM
Tom sorry if i am being a bit thick but "brass ring"?

swarf a video of it turning may not be too far away but as for lights and music that may be a bit of a while, even though I have the arduino code sorted for the lights still need to find some time to sit and work out the electronics for it.
Title: Re: carousel
Post by: tom osselton on November 07, 2016, 06:08:41 PM
This should explain it.

https://en.m.wikipedia.org/wiki/Brass_ring#Brass_ring_carousels_today
Title: Re: carousel
Post by: shipto on November 08, 2016, 05:52:58 AM
Ah thank you Tom I have to admit I have never heard of that.

Sent from my SM-N910F using Tapatalk

Title: Re: carousel
Post by: shipto on November 08, 2016, 03:31:04 PM
Well I decided to do a short video just turning it by hand because the horse hangers are not secured yet and i didnt want to risk a foul up.
http://www.youtube.com/watch?v=Uk0wthgIAME
Title: Re: carousel
Post by: tom osselton on November 08, 2016, 04:37:48 PM
Very nicely done!
Title: Re: carousel
Post by: shipto on November 14, 2016, 04:11:23 PM
The horses now have their tails.
Shoe laces cut to size and brushed out with a tiny wire brush, the ferrule (I think its called that) was cut down then glued into the back end.
Title: Re: carousel
Post by: wheeltapper on November 14, 2016, 04:49:03 PM
useless information No 1,
the piece on the end of a shoelace is called an AGLET.  :D :D

Roy
Title: Re: carousel
Post by: Will_D on November 16, 2016, 06:30:04 PM
Did anyone see the episode (in the last few days, @ 4pm) of the "Salvage Squad" on Discovery ?

They restored a full sized steam galloper!
Title: Re: carousel
Post by: shipto on November 17, 2016, 04:50:56 PM
Unless it was weekend I would have been working but will have to look for it on catch up.
Title: Re: carousel
Post by: shipto on December 06, 2016, 04:48:28 PM
I thought I should post a update in case you all thought this had gone by the wayside again.
I have been busy getting the boards ready for the lights the boards for the top (smaller) dont need any resisters as they are inline on those LED's however the lower boards do as there was not enough room to put them inline in a tidy fashion on those.
the two chips on the board are one SN74HC595 (shift registers) which have a voltage limit of 6volts a mere 80 mA so the second chip is a UDN2981AT which will supply up to 50v at .5A and since I am only using 9 volts and approximatly 320 mA with all light onthey should be more than comfortable here, it took me a while to find these as most of the other drivers are designed to sink the current which would not suit the way I have wired up the LED's.
so anyway pic 1 shows the various bit and 2 shows the first board in the place it will be fixed to, could have done with wiring the connecters the other way around but it should not harm anything the way they are.
Title: Re: carousel
Post by: SwarfnStuff on December 06, 2016, 11:44:19 PM
Congratulations.  :beer:

          Great to hear that you are still plugging away Shipto. I, along with many others will just be patient and wait with eager anticipation for the grand unveiling.  :coffee:  Not to put any pressure on your good self though. Just keep enjoying what you are doing.   
John B
Title: Re: carousel
Post by: shipto on December 17, 2016, 12:04:48 PM
http://www.youtube.com/watch?v=-j1GdgOc6RM
bit of a ropey video showing first test of the lights working. There are one or two problems, one pair of lights isnt lighting at all could be break in cable, two pairs are on all the time possibly a stray bit of solder or a track not cut through properly and theres a slight problem with the very basic sequence but that is most likely the numbers being fed to it are not right?
Still after monday I finish for Christmas  :ddb: so will have plenty of time to get this sorted along with a much better sequence for the lights.
Title: Re: carousel
Post by: shipto on December 18, 2016, 02:35:49 PM
http://www.youtube.com/watch?v=DYSYhFBScOY
Better glitches fixed  :D
Title: Re: carousel
Post by: AdeV on December 18, 2016, 08:42:18 PM
That looks magnificent! Marvellous, even  :clap: Should look really special when it's rotating as well... will that be under computer control too (e.g. so it starts, speeds up, runs, slows down & stops ala the real thing)?
Title: Re: carousel
Post by: mattinker on December 18, 2016, 09:05:52 PM
What a splendid present!!

Matthew
Title: Re: carousel
Post by: tom osselton on December 19, 2016, 03:18:22 PM
Beautiful! Well done!
Title: Re: carousel
Post by: shipto on December 21, 2016, 05:24:32 PM
Thanks all its really coming together, I have been spending most of the extra time I had off converting binary to decimal for varous sequences on the lights. File size is currently 22kb and that gives me a varying cycle lasting about 50 seconds so far luckily I only need to do a few conversions the rest is simply cut and paste to repeat the sequences. I will get it to a 3 minute cycle and leave it at that I think.
The rechargeable batteries arrived today so next job is fixing enough of them in to run it all along with the charging circuit then once the serial mp3 player arrives from China that will be everything in place and it will be down to getting the rest of the code right to run it properly.
AdeV the motor will be controlled by the Arduino but hadn't thought about stopping it automatically but I like the idea I might see if I can get it into the code but not sure if I can have multiple milllis()?
Time to brave the sometimes brutal arduino forums I think.
Title: Re: carousel
Post by: AdeV on December 21, 2016, 09:04:14 PM
AdeV the motor will be controlled by the Arduino but hadn't thought about stopping it automatically but I like the idea I might see if I can get it into the code but not sure if I can have multiple milllis()?
Time to brave the sometimes brutal arduino forums I think.

They can be brutal, I agree. The most common, and most annoying IMHO, response often being "Why do you want to do THAT?". To which my keyboard always seems to reply "None of your damn business!"

Anyway... feel free to post your code here if you want, I'm happy to take a look at it & see if I can help. Personally, I'd implement it along these lines (this is makey-uppy-pseudocode, you'll have to convert it to real code yourself...)

First: Define the states for your motor; typically: Stopped, Starting, Running, Stopping. How you get from "stopped" to "starting" I leave up to you (press a button? power on?)
Second, define the duration of each state (excluding Stopped, assuming you don't want it to cycle forever until switched off).

At the start of the main loop, set a variable to the current millis() value (e.g. "_timeNow")
Have a second variable (e.g. _currentStateTime). If this is the first loop, set it to _timeNow, and set your current state to Starting (I assume you want the carousel to start immediately when it's powered on)
Subtract _currentStateTime from _timeNow to give you the number of millis into the current state you are. For Starting and Stopping, divide this value by the duration to give you the proportion of the elapsed state time (between 0 and 1). For Starting, multiply this by your maximum motor speed (e.g. 127, or 1024 if you're using a PWM output) & set the current motor speed to that value. For stopping, use (1-proportion) instead. This will give you a smooth ramp up in speed from zero to flat out; or a smooth ramp down from flat out to stopped. When _timeNow - _currentStateTime >= current state max duration, switch state & set _currentStateTime to _timeNow again. Thus re-setting the clock. For running & stopped, you don't need to alter the motor speed (unless you want to set it to max/zero to make absolutely sure it's on or off).


OK, let's try that in pseudo-code...

Code: [Select]
// Adjust times to personal preference
const unsigned long startingTime = 5000;  // 5 seconds
const unsigned long runningTime = 20000; // 30 seconds
const unsigned long stoppingTime = 7500; // 7.5 seconds
const unsigned long stoppedTime = 10000; // 10 seconds

byte _currentState = 0; // 0=undefined, 1=starting, 2=running,3=stopping,4=stopped
unsigned long _currentStateTime = 0;
unsigned long _timeNow = 0;

loop()
  _timeNow = millis();
  switch (_currentState) {
    case 0: // Undefined
      // First run comes here, set state to Starting.
      _currentStateTime = timeNow;
      _currentState = 1;
      break;
    case 1: // Starting
      if (_timeNow - _currentStateTime >= startingTime) {
        _currentStateTime = timeNow;
        _currentState = 2;
        analogSet(motorPin, 1024); // Ensure we're at maximum speed
      } else {
        float __proportionElapsed = (_timeNow - _currentStateTime) / startingTime;
        analogSet(motorPin, __proportionElapsed*1024); // accelerating
      }
      break;
    case 2: // running
      if (_timeNow - _currentStateTime >= runningTime) {
        _currentStateTime = timeNow;
        _currentState = 3;
      }
      break;
    case 3:
      if (_timeNow - _currentStateTime >= stoppingTime) {
        _currentStateTime = timeNow;
        _currentState = 4;
        analogSet(motorPin, 0); // Ensure we're completely stopped
      } else {
        float __proportionElapsed = (_timeNow - _currentStateTime) / startingTime;
        analogSet(motorPin, (1 - __proportionElapsed) * 1024); // slowing...
      }
      break;
    case 4: // Stopped
      if (_timeNow - _currentStateTime >= stoppedTime) {
        _currentStateTime = timeNow;
        _currentState = 1; // Go back to starting
      }
      break;
  }

   // Rest of code (that looks after the light show)
}

OK, so unlike my description above, that will loop continuously, with a 10s stop period. If you wanted to start the carousel on a button push, you'd use an interrupt to set a "start" flag (which would then be ignored until the sequence was complete). The final "stopped" section would reset the "start" flag, and the loop would idle until the button was pushed, setting the start flag & starting the whole sequence again.

Also... I presume you'd want the light show to stop with the carousel; or perhaps change to a partial (constant) display; you could use the _currentState variable to control the light show as well...

Un-mentioned on the Arduino millis() page (https://www.arduino.cc/en/Reference/Millis) is the fact that, being an unsigned long integer means that when the millis() variable runs out of space (overflows), the "millis() - previous time" logic continues to work properly! e.g. let's say millis overflows after 255 (byte sized), because of the way microprocessors do arithmetic on integers, 10 - 250 = 16 (for unsigned 8-bit bytes). In your head, you have to imagine it's actually (256 + 10) - 250. In the MCU, the overflow flag gets set, and ignored. Of course, the more bits in the integer, the higher the overflow number.... so a 10-bit word would overflow on 1024.

If you want REALLY fine control over the durations, use micros() instead!  :lol:
Title: Re: carousel
Post by: shipto on December 22, 2016, 04:08:54 AM
This is the code thats currently running the lights it may or may not be correctly formatted but it works as you see in the video's.
Code: [Select]
/*
  SD card read/write

  SD card attached to SPI bus as follows:
 ** MOSI - pin 11
 ** MISO - pin 12
 ** CLK - pin 13
 ** CS - pin 10

*/
// This one is working kinda :)
#include <SPI.h>
#include <SD.h>
#include <SoftwareSerial.h>
File myFile;


//Pin connected to ST_CP pin12 of 74HC595
int latchPin = 7;
//Pin connected to SH_CP pin11 of 74HC595
int clockPin = 8;
////Pin connected to DS pin14 of 74HC595
int dataPin = 9;
unsigned long previousMillis = 0;
const long interval = 100;

void setup() {
  Serial.begin(9600);
  while (!Serial) {

  }
  pinMode(10, OUTPUT);
  digitalWrite(10, HIGH);
  pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
  Serial.println("Hello");

  if (!SD.begin(10)) {
    Serial.println("cant find card make sure you have put it in slot and restart");
    return;
  }
  Serial.println("Found SD card");



}


void loop() {
  myFile = SD.open("lights.txt");
  while (myFile.available())
  {
    unsigned long currentMillis = millis();

    if (currentMillis - previousMillis >= interval) {
      previousMillis = currentMillis;

      int BankOne = myFile.parseInt();
      int BankTwo = myFile.parseInt();
      int BankThree = myFile.parseInt();
      int BankFour = myFile.parseInt();
      int BankFive = myFile.parseInt();
      int BankSix = myFile.parseInt();
      Serial.println( BankOne); //remove when done.
      if (BankOne == 256) {
       
        myFile.seek(0);
      }
      else {
       
        digitalWrite(latchPin, LOW);

        shiftOut(dataPin, clockPin, LSBFIRST, BankOne);
        shiftOut(dataPin, clockPin, LSBFIRST, BankTwo);
        shiftOut(dataPin, clockPin, LSBFIRST, BankThree);
        shiftOut(dataPin, clockPin, LSBFIRST, BankFour);
        shiftOut(dataPin, clockPin, LSBFIRST, BankFive);
        shiftOut(dataPin, clockPin, LSBFIRST, BankSix);

        digitalWrite(latchPin, HIGH);
      }

    }
  }
}
So as I said I am not a great coder but I think from your example (thank you for taking the time btw) that where I have "const long interval = 100;" I can simply have others like for example "const long Running = 180000;" (3 minutes) and then do all the extra code in the loop() section.
I am now thinking about various other things now so thank you for increasing my workload  :lol:

Edit: in case anyone is interested here is a snippet from the numbers in lights.txt on the sd card:
Code: [Select]
000,000,000,000,000,000
000,136,000,136,000,136
000,204,000,204,000,204
000,238,000,238,000,238
000,119,000,119,000,119
015,051,015,051,015,051
255,017,255,017,255,017
255,000,255,000,255,000
240,000,240,000,240,000
000,000,000,000,000,000
240,000,240,000,240,000
255,000,255,000,255,000
255,017,255,017,255,017
015,051,015,051,015,051
000,119,000,119,000,119
000,238,000,238,000,238
000,204,000,204,000,204
000,136,000,136,000,136
000,000,000,000,000,000
000,136,000,136,000,136
000,204,000,204,000,204
000,238,000,238,000,238
000,119,000,119,000,119
015,051,015,051,015,051
255,017,255,017,255,017
255,000,255,000,255,000
240,000,240,000,240,000
000,000,000,000,000,000
240,000,240,000,240,000
255,000,255,000,255,000
255,017,255,017,255,017
015,051,015,051,015,051
000,119,000,119,000,119
000,238,000,238,000,238
000,204,000,204,000,204
000,136,000,136,000,136
000,000,000,000,000,000
000,136,000,136,000,136
000,204,000,204,000,204
000,238,000,238,000,238
000,119,000,119,000,119
015,051,015,051,015,051
255,017,255,017,255,017
255,000,255,000,255,000
240,000,240,000,240,000
000,000,000,000,000,000
240,000,240,000,240,000
255,000,255,000,255,000
255,017,255,017,255,017
015,051,015,051,015,051
000,119,000,119,000,119
000,238,000,238,000,238
000,204,000,204,000,204
000,136,000,136,000,136
000,000,000,000,000,000
000,136,000,136,000,136
000,204,000,204,000,204
000,238,000,238,000,238
000,119,000,119,000,119
015,051,015,051,015,051
255,017,255,017,255,017
255,000,255,000,255,000
240,000,240,000,240,000
000,000,000,000,000,000
240,000,240,000,240,000
255,000,255,000,255,000
255,017,255,017,255,017
015,051,015,051,015,051
000,119,000,119,000,119
000,238,000,238,000,238
000,204,000,204,000,204
000,136,000,136,000,136
000,000,000,000,000,000
000,136,000,136,000,136
000,204,000,204,000,204
000,238,000,238,000,238
000,119,000,119,000,119
015,051,015,051,015,051
255,017,255,017,255,017
255,000,255,000,255,000
240,000,240,000,240,000
000,000,000,000,000,000
240,000,240,000,240,000
255,000,255,000,255,000
255,017,255,017,255,017
015,051,015,051,015,051
000,119,000,119,000,119
000,238,000,238,000,238
000,204,000,204,000,204
000,136,000,136,000,136
000,000,000,000,000,000

000,000,000,000,000,000
000,000,000,000,000,000
255,255,255,255,255,255
255,255,255,255,255,255
000,000,000,000,000,000
000,000,000,000,000,000
255,255,255,255,255,255
255,255,255,255,255,255

016,016,016,016,016,016
032,032,032,032,032,032
064,064,064,064,064,064
128,128,128,128,128,128
008,008,008,008,008,008
004,004,004,004,004,004
002,002,002,002,002,002
001,001,001,001,001,001
016,016,016,016,016,016
032,032,032,032,032,032
064,064,064,064,064,064
128,128,128,128,128,128
008,008,008,008,008,008
004,004,004,004,004,004
002,002,002,002,002,002
001,001,001,001,001,001
016,016,016,016,016,016
032,032,032,032,032,032
064,064,064,064,064,064
128,128,128,128,128,128
008,008,008,008,008,008
004,004,004,004,004,004
002,002,002,002,002,002
001,001,001,001,001,001
016,016,016,016,016,016
032,032,032,032,032,032
064,064,064,064,064,064
128,128,128,128,128,128
008,008,008,008,008,008
004,004,004,004,004,004
002,002,002,002,002,002
001,001,001,001,001,001
016,016,016,016,016,016
032,032,032,032,032,032
064,064,064,064,064,064
128,128,128,128,128,128
008,008,008,008,008,008
004,004,004,004,004,004
002,002,002,002,002,002
001,001,001,001,001,001
016,016,016,016,016,016
032,032,032,032,032,032
064,064,064,064,064,064
128,128,128,128,128,128
008,008,008,008,008,008
004,004,004,004,004,004
002,002,002,002,002,002
001,001,001,001,001,001
016,016,016,016,016,016
032,032,032,032,032,032
064,064,064,064,064,064
128,128,128,128,128,128
008,008,008,008,008,008
004,004,004,004,004,004
002,002,002,002,002,002
001,001,001,001,001,001
016,016,016,016,016,016
032,032,032,032,032,032
064,064,064,064,064,064
128,128,128,128,128,128
008,008,008,008,008,008
004,004,004,004,004,004
002,002,002,002,002,002
001,001,001,001,001,001
016,016,016,016,016,016
032,032,032,032,032,032
064,064,064,064,064,064
128,128,128,128,128,128
008,008,008,008,008,008
004,004,004,004,004,004
002,002,002,002,002,002
001,001,001,001,001,001

000,000,000,000,000,000
000,000,000,000,000,000
255,255,255,255,255,255
255,255,255,255,255,255
000,000,000,000,000,000
000,000,000,000,000,000
255,255,255,255,255,255
255,255,255,255,255,255
The ideal thing about this is that I could add notations in there to describe what the numbers will do if I wished to do so as the parseint ignores anything that isnt a number, there is no real need to make them all 3 digits either but I find it easier to keep track when its all nice and uniform.
Title: Re: carousel
Post by: shipto on January 02, 2017, 05:01:00 PM
Cant believe my holiday is almost over already  :bugeye: back to the daily grind tomorrow and I didnt spend half as much time in the shed as I would have liked.
Did get some more done on the carousel however I made up the battery pack from the batteries that arrived just before Christmas and rigged up a charging circuit I got from t'internet.
Made a little mistake with the placement for the charger socket so will need to fill the mess that was left but the only things missing now is the serial mp3 player for the sounds and a little board for the motor.
Title: Re: carousel
Post by: shipto on January 20, 2017, 05:14:12 PM
http://www.youtube.com/watch?v=idssnWkx684
Just a quick video showing the carousel running all be it too fast and the motor is not controlled by the arduino at the time I took the video because I had disconnected it to check on the amps being drawn by the motor.
The main problem to overcome at the moment is the speed the video shows it going at the slowest it will go before it stalls (approx 15rpm) so I have ordered a higher geared motor with a top speed slightly slower than it is in the video 12rpm.
I am also going to abandon the rechargable batteries as I dont think I will ever get them to last a reasonable time.
Title: Re: carousel
Post by: SwarfnStuff on January 21, 2017, 12:06:07 AM
Still looking good Shipto.
      Yep, a tad fast, the horses would be well giddy if not almost in orbit at the current speed. Still, you will have the speed in hand once the new slower motor arrives.
      I think a suitable power supply might be the go too, guess it has to run motor plus lights and Arduino so a bit of thinking there for you.
     Looking forward to the next installment, the beauty of being retired is being on permanent holidays.
       :scratch:  Hmm hang on, Wednesdays = club meetings, Mondays usually set aside to keep the medical profession in work, Fridays of the school year = take the 7yr old grandson to swimming lessons.
  Then there is the inevitable, fix this please from SWMBO.  :doh:
Oh well, I do get to play in the playpen in between and one day I just might finish something useful.
Congrats on the  progress.

John B
Title: Re: carousel
Post by: AdeV on January 24, 2017, 08:48:23 AM
I can't see the video, unfortunately, due to geographical restrictions (the Great Firewall of China)... but, how are you controlling the speed of  your motor? If you've been using a variable resistor & dropping the volts to the motor, then you'll find that if you control it via Pulse Width Modulation from the Arduino, you can run at a MUCH lower speed before it stalls; because the PWM supplies full voltage, the motor is much better able to overcome the "stiction" which would otherwise afflict it at very very low speeds...

As it happens you've already bought a slower motor, but maybe this is something to consider even with the new motor.

Personally, I'd use the arduino's PWM output to drive a transistor to drive the motor, with all the usual reversed diode surge protection on the motor to prevent it from frying your transistor and/or arduino.
Title: Re: carousel
Post by: shipto on January 24, 2017, 05:26:06 PM
In the video you cant see unfortunatly (dont know if I can fix it or not I will check the settings) the motor was running direct from my variable power supply at just shy of rated voltage but any lower and it would stall. I may have been able to get the speed down with the pwm from the arduino but decided on the whole to go for a uprated motor as they where so cheap 24v 12rpm for under 10.
As it happens I am using exactly what you say arduino-transistor-motor I have a tip142 in place so the surge diode is built in
Title: Re: carousel
Post by: AdeV on January 25, 2017, 03:47:42 AM
(dont know if I can fix it or not I will check the settings)

No, it's the Great Firewall of China blocking the whole of YouTube (also: Photobucket, Flickr, anything to do with Google, and several others).

... decided on the whole to go for a uprated motor as they where so cheap 24v 12rpm for under 10.

Well, at that price, it'd be rude not to!

I got a 12v 1-100rpm geared motor from eBay for some similarly low price. Actually, I could do with finding some of these suppliers... I guess postage must make up the bulk of the cost from China, so I should be able to buy locally for pennies, slip 'em into my suitcase for the flight home, and billy-bob's your uncle :)
Title: Re: carousel
Post by: Noitoen on January 29, 2017, 05:59:53 AM


No, it's the Great Firewall of China blocking the whole of YouTube (also: Photobucket, Flickr, anything to do with Google, and several others).



I think you could work around this problem if you have a pc running back home (UK I suppose). Use something like Teamview and see the video and other stuff through that. Our company used to have YouTube blocked on their network and this is how we did it.
Title: Re: carousel
Post by: AdeV on January 29, 2017, 06:30:53 AM
I'm using a VPN from time to time, and, yes, Teamviewer - and they do both allow access to Youtube... trouble is, a lot of the time, the speed is so low as to render it useless, or indeed not render it at all!