-
Re: Rotary table indexer
If anyone is interested I have new PCB's in stock on my site.
I've changed the design slightly:
There's an extra 100nF decoupling capacitor on the input side of the regulator. I've moved the 5v line from the power socket to the driver socket (since it's only used by drivers anyway and there's much less chance of accidentally blowing anything up!). I've shifted components around slightly and there's a second driver socket (not used for the divider but may be used in the future for other projects).
I've updated the files in the downloads section to reflect the changes and added a zipped set of gerber files for anyone who wants to make their own.
See: World of Ward :: Home.
-
Re: Rotary table indexer
Hi Steve, I have just ordered a PCB, components and a PIC18F452 from your site and I'm looking forward to having a go at constructing this project.
One question for you - or anyone else for that matter. I am having trouble getting MPLAB set up for programming in C. Previously the little bit of PIC programming I've done has all been in assembler. Now I have set up with MPLAB 8.92 and the old HiSoft Lite version of PICC18 - I want to program 18F4520 chips. But I can't get it to work. When I enter example code from HiSoft it just gives various errors and refuses to compile. We are only talking about 3 line programs and I am sure that I have copied everything correctly so I'm a bit baffled. Do you or anyone have any recommendations for a free version of C to use with MPLAB. At present I am avoiding upgrading to MPLABX as I am told it needs a really fast computer.
So, suggestions?
Thanks, Hugh
-
Re: Rotary table indexer
Hi Hugh,
getting IDE's to work is a big subject so I can only offer some vague pointers.
So you're using a version of HiSoft and example code that should compile using it but are getting errors. The most likely problem is that MPLAB isn't actually using the correct compiler. I'd start by checking the command line it's using to make sure it is. If it's using the correct compiler then the only other thing off the top of my head is that the command line is malformed and using the wrong options.
The IDE doesn't actually do an awful lot, in the main it's just a text editor that knows what files constitute your project and knows what tools (compilers etc) to use to build them. With that in mind you may also want to manually compile the example code using a dos command line to see if it works ok. If it does try the same but with the command line that MPLAB is using - you may well find that there are options in there that cause it to melt down.
Finally, depending on the types of errors you're getting (but related to the command line) you might find that the various locations the IDE tells the compiler to find the headers and libraries etc is wrong.
Hope that's of some use, unfortunately it's a *big* subject and at the very least I'd need to see the command line that was being sent to the compiler along with the compiler manuals etc.
Not sure that MPABX requires a powerful computer btw - I'd try it and see, you can always uninstall it. When you've installed it remember to install the free C compiler too.
Cheers,
Steve.
-
Re: Rotary table indexer
Hi Steve,
I've just built your controller on Veroboard. I have noticed that the keyboard mapping does not seem to correspond with the V2.0 schematic.
Mapping shown on V2.0 schematic
RD0 C1
RD1 C2
RD2 C3
RD3 C4
RD4 R1
RD5 R2
RD6 R3
RD7 R4
The way I think it should be.
RD0 R1
RD1 R2
RD2 R3
RD3 R4
RD4 C1
RD5 C2
RD6 C3
RD7 C4
Looking at the data sheet on the Farnell keyboard the mapping on the schematic would correspond with the keyboard mounted as shown in the data sheet. Looking at the pictures of your construction it looks like the keyboard is mounted upside down. (With the cable coming out of the top.) Has the keyboard mapping been changed from the original documents ? I looked at your source code in post No. 1 and this seems to match the layout on the schematic.
Regards Les.
-
Re: Rotary table indexer
Hi Les,
I'm aware that the circuit diagram isn't correct. I keep meaning to change it but can't find the license file for the software I originally used to draw it!
The reason is lost in the annals of time but I think that in order for the 'stick on' keypad to physically connect it needed rotating and I changed the firmware to work with it but never got around to changing the circuit.
I'm not sure that the source in the original post should match the schematic since this should work with the current hardware layout. I'd have archived the source at the point I decided to make the original post so it should reflect working hardware with the keypad in it's final position.
I'm not in a position to check any of this out at the moment, I'll check and make a definitive post on the subject later (and if I can find the license key then I'll re-label the keypad on the schematic).
(There is a post way back in the thread I made with the correct keypad mapping defined).
Obviously the PCB is correct and matches the stick on keypad as does the keypad I have on my site.
Cheers.
-
Re: Rotary table indexer
Hi Steve,
Thanks for your reply. I have now installed MPLABX and the free version of XC8 and so far so good. These two obviously work together in perfect harmony and apart from the time MPLABX takes to start up, it all works fine on my desktop. The support documentation with XC8 is very good for a beginner, I guess Microchip are trying to get people to migrate to the latest version and are trying to cover all user groups. So, I will stick with this and try a few tentative footsteps into the arcana of C programming.
Regards, Hugh
-
Re: Rotary table indexer
Just in case it isn't clear - the PIC you ordered from my site is already programmed so you don't need to reprogram it simply plug it in!
The compiler that comes with MPLABX won't directly compile the source in my original post due to changes in some of the macros etc that were provided. I have partially ported the latest code and have two issues left that need looking at: (When turning the update to the LCD is glitchy and the program mode save and load don't yet work). When I get some time I'll fix these and probably drop the code on my site.
-
Re: Rotary table indexer
Hi Steve,
Thanks for the quick reply. When I was looking for the data on the keypad on Farnell's website I noticed that it is shown as no longer manufacture. At the moment I am using a keypad removed from an old phone. If I had used the Farnell keypad I would not have noticed the error in the schematic. Even though I am retired I still do not seem to have enough time to do all the things I want to do.
Thanks again for a nice design.
Les.
-
1 Attachment(s)
Re: Rotary table indexer
For anyone interested I've updated the schematic on my site (hopefully the keypad layout is now correct!) .
Also attached to this post.
Attachment 241854
-
Re: Rotary table indexer
Just an enquiry, does anyone have a problem with their controller periodically reseting on it's own. MIne does, and I don't know enough about electronics to figure it out myself.
-
Re: Rotary table indexer
Hi,
does it reset when you press a key? If so then in my experience about 10% of 452's do this for reasons I've never figured out. Try replacing it.
(If you bought it from me send me an email and I'll replace it, I do test them but it's possible one slipped through the wire).
If it's not that then the 452 may be responsible anyway, if possible worth trying another. Beyond that, PSU, noise from the stepper (try it without a motor/driver connected)...
Cheers,
Steve.
-
Re: Rotary table indexer
Hi Steve
The controller seems to work exactly as it should. It just every once in a while (maybe 5-6 times a day) it will reset when it is preforming a move. I'm sure it is related to a noise issue. I am using a rutex servo drive and a large dc servo to drive the table. I am careful to not route any light wiring of the sense/acknowledge or the step/direction pins anywhere near or parallel the high current wires leading to the servo. All wires used are shielded. I haven't tried changing the psu, I'll try that. I have a selection of small ferrite beads I should also try. I don't use this machine much, only about 3-4 days a year, but every year I try a bit more to get it corrected. Thanks