Gallery, Projects and General > Project Logs |
Mill Electrotrickery Part 1 - Stepping out with Arduino |
<< < (3/7) > >> |
RodW:
Kwackers, thanks for the feedback, much appreciated. I know you have a controller out there, did Chris link to yours? I used to know C backwards and once managed to squeeze a compete inventory system into a 64k hand held terminal but that was 30 years ago. However I am very rusty with the language and the Arduino which I played with a few years ago. The thing I am really struggling to remember is the advanced type definitions and defining more complex data structures. I started to write my own menu systems and got it going but when I found this library, it was written much the way I wanted mine to end up so I decided to run with it to save some time. Of course, this immediately exposed me to someone else's poor practices which included not using constant Flash memory for menu items and not checking for errors when allocating memory, both of which bit me. Some of the other libraries I looked at were useless! I managed to halve his memory usage but had problems accessing Flash memory variables so moved on to other tasks while I learn the Flash memory ropes. Now I have a problem to solve with an Arduino that requires a screen and keyboard, I wanted to write a robust modules for menus, field input and processing a screen and navigate around multiple fields for future projects. The Arduino has a F() macro and the PROGMEM variable modifier to deal with strings stored in Flash memory and I have nearly got my head around this. Well enough to store my own code there anyway! Anyway, moving right along, this is my evening project as I have other more critical projects competing for shop time. I have just about got the field input stuff working the way I want it and using Flash memory for field prompts, but need to wrap it into an Arduino Library and then build the screen handling. Once this is done, I will be ready to actually start dividing! I think, at this stage, there is heaps of Memory with the Arduino to do what I want to achieve. 32k Flash memory, 2k volatile memory and 1k of EEPROM. I thought I would see if I could incorporate the SD card to reduce the overhead of any scripting features etc I may add as they can be written in a text editor but time will tell how much I can squeeze in! |
kwackers:
No probs, yeah the link Chris posted was to mine. Like you I wrote something out of interest that would do a particular job for me. Once it was finished I made it more commercial and published the design. Haven't done much work to it for a few years now but then apart from making it into something else there isn't really anything more I can do. I started out by writing computer games on small platforms so I'm fairly used to squeezing lots of code and data into small spaces (although for many years that was done by coding it all in assembler). For these sorts of projects a typical Arduino / PIC is massively well endowed! If I was doing something now I'd be tempted to make it wireless and give it a web page you could access on your local network just for the hell of it... :loco: Interesting stuff. |
RodW:
--- Quote from: kwackers on May 28, 2013, 10:38:15 AM --- For these sorts of projects a typical Arduino / PIC is massively well endowed! If I was doing something now I'd be tempted to make it wireless and give it a web page you could access on your local network just for the hell of it... :loco: Interesting stuff. --- End quote --- Don't give me ideas now. My home network has its own web site and the exterior Wireless Access Point covers the shed.... The enhancement I had thought of was incorporating a rotary encoder knob which might simplify data input and could allow you to rotate the table. By then I think I might almost have run out of ports so maybe the internet connected table might not get off the ground... But I agree, it would be cool to be able to push a new config to it via the web. |
raynerd:
--- Quote from: kwackers on May 28, 2013, 10:38:15 AM ---If I was doing something now I'd be tempted to make it wireless and give it a web page you could access on your local network just for the hell of it... :loco: Interesting stuff. --- End quote --- I presume this will be in the 2013 code :) :whip: A few years ago, you may remember, kwackers, that I wrote an x axis controller. It was pants (I'm sure you imagine since I made it :Doh: ) but did the job. However, I've now moved over to using another of your controllers for linear travel of my x axis! It would be fab if there was a linear mode built into it, I'm guessing it would work identically just at the moment I have to set it so that x degree (can't remember off hand) equates to 10mm. Due to the steps per revolution figure maximum value, I can't get 1 deg to equal 1mm . Something you may wish to design on your arduino controller as well rod? Chris |
RodW:
--- Quote from: raynerd ---I presume this will be in the 2013 code :) :whip: A few years ago, you may remember, kwackers, that I wrote an x axis controller. It was pants (I'm sure you imagine since I made it :Doh: ) but did the job. However, I've now moved over to using another of your controllers for linear travel of my x axis! It would be fab if there was a linear mode built into it, I'm guessing it would work identically just at the moment I have to set it so that x degree (can't remember off hand) equates to 10mm. Due to the steps per revolution figure maximum value, I can't get 1 deg to equal 1mm . Something you may wish to design on your arduino controller as well rod? Chris --- End quote --- Chris, is am being dragged kicking and screaming from old K&R C to the advanced constructs of C++ which has a lot of advantages so I will do my best. Its funny you mention this. I know a software developer who is into woodwork and he wanted to turn a leadscrew to move the backstop on his table saw so 300mm = 300mm so I have given this matter some thought. I think the issue is the drive is much more direct as you are missing the 90 turns to the revolution gearing of the rotary table. Some stepper controllers do micro stepping, the $10 Polou driver i first played with has the option to go down to 1/16 of a step movement per step by setting some additional signals on the board. The gecko controller I have purchased but not quite ready to play with (been a busy week) has a stated resolution of 10 micro steps hard wired in. So for the 200 step per rev steppers like mine that means you have 2000 steps per revolution. So if you have a 2mm pitch leadscrew If I get the maths right, you would have 1000 steps per mm (0.0001 mm per step). So perhaps the lack of resolution you are experiencing can be simply resolved with a stepper driver board upgrade or by setting a few signals to increase the resolution of your existing controller. It is 2013 after all! |
Navigation |
Message Index |
Next page |
Previous page |