Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: Marauder_Pilot on September 10, 2007, 01:36:58 PM
-
I'm working on building a pneumatic cannon, using a series of pneumatic pistons to automate the reloading of the cannon. Each piston will be controlled by a small solenoid valve, which opens and closes on a 12v circuit.
What I'd like to do is find or build a control board that could automate the process. Here is how I'd like it to run.
Pull Trigger
Open main valve (firing the cannon)
Close main valve
Retract breech piston (Opening the breech, allowing a shell to be ejected and a new one to drop in)
Extend ejector pistons (pushing out the spent shell, AKA a piece of PVC pipe formerly containing whatever serves as ammo)
Retract ejector pistons
Wait 1 second
Extend breech piston
Ideally, I'd also like a small 2-color LED that glows green when the breech is closed (Showing that the cannon could be fired) and red when open (Showing when the cannon is reloading). Anybody know of a board that could do this, or the resources that would show me to build one?
-
Ok so you will need a microcontroller to coordinate everything:
http://www.societyofrobots.com/microcontroller_tutorial.shtml
You can either buy them:
http://www.societyofrobots.com/robot_parts_list_microcontrollers.shtml
Or build one:
http://www.societyofrobots.com/step_by_step_robot.shtml
Solenoids are pretty easy to control:
http://www.societyofrobots.com/actuators_solenoids.shtml
You just need to use a single MOSFET to control a solenoid, with the gate attached to a digital output pin of your microcontroller.
This stuff can seem a bit overwhelming at first, so just let us know if you get stuck and we will help.
Oh and the LED is real easy, even more so than the solenoids.
-
Thanks, Admin, those links were a lot of help! They've answered most of my questions, but I still have one-namely, programming. I do do some C programming (I'm a Computer Science student, so I've had a few courses dealing with it), but I've never done anything dealing with robotics. Do you know of a good tutorial and/or libraries dealing with the controls for MOSFETs?
-
To controll a mosfet you have to connect it as admin said: connect a pin of your microcontroller pin to the gate pin of mosfet.
What you need to learn is how to setup a microcontroller and how to change pin status.
For AVR in C:
DDRB = 1<<2;
PORTB |= 1<<2;
DelayMs(200);
PORTB &= ~(1<<2);
With DDRB register you set pin PB2 to output. With PORTB register you can control status of output pins (1 for positive, 0 for ground). So when you set PB2 to 1, the MOSFET will turn on and the solenoid will move. When you turn it off the solenoid will go in the opposite direction.
When you are looking for MOSFET, make sure they can be controled with logic level.
-
Basically use the exact same code as for my $50 robot, but change the servo control delay period to as long as you want the solenoid to be actuated. Instead of attaching the servo signal line, attach the mosfet gate line.
-
Alright, I've just about got everything ready (I've made the slight adjustment that the 4 inline solenoid valves will be replaced by a pair of 4-way solenoid valves, which can control dual-action rams on their own), I just can't find anywhere to get a MOSFET. Do they go by another name, or am I just looking in the wrong places?
-
try digikey.com and mouser.com
-
Thanks. Also, do you have any recommendations for reference books for programming augmented microcontrollers in C?
-
Which microcontroller? (PIC, AVR, etc?) Im self taught so I wouldn't have any books to recommend.
A few have been recommended on the forum (search) . . . and try here too:
http://www.societyofrobots.com/robot_books.shtml
http://www.google.com/search?sourceid=navclient&ie=UTF-8&rls=DGUS,DGUS:2006-11,DGUS:en&q=avr+programming+book
http://www.google.com/search?hl=en&safe=off&rls=DGUS%2CDGUS%3A2006-11%2CDGUS%3Aen&q=PIC+programming+book