i need to conttrol the speed on a 24 volt dc motor and i want to use a 120 volt ac dimmer switcth
you need a 120V ac to 24V dc transformer connect the dimmer switch to the transformer power IN supply, why you want to do this is another Q ;/
If that dimmer is solid-state, I don't know if it will work. If not, it is just a variable resistor. In that case, connect them in series
An 1/8th horse motor is going to require at least 5 amps on 24V...that's some serious current for most 24V supplies, and Radio Shack isn't going to have such brute force 24V supplies. If you want to do this inexpensively, look into battery chargers for small forklifts, military vehicles (best bet), or diesels. Most older military vehicles still use 24V, and I think a lot of commercial diesels are moving over to 24V. At any rate, you should be able to buy an old 24V charger for maybe $30 this way. If you don't have luck that way, you could buy your big hoss power supply through Grainger, Digikey, Mouser, etc. but be prepared to pay at least $100. Remember, you'll need a power supply capable of AT LEAST 5 amps at 24V. The best way to go is to buy a DC inverter/chopper drive for you motor, but such things are expensive ($300 and up). Yeah, not cheap! Now you see why most motors of any reasonable power rating are 120V and up! FYI don't try to make your own power supply unless you are pretty good at such things, and for heaven's sake don't try to use a Zener by itself to regulate a high current 24V supply (can you say Wow, that sure blew up in a hurry!). Actually, your motor isn't all that sensitive to voltage variation, it'll just slow down or speed up a little. Another thing remember is to have a good contactor relay to control your motor as an on-off switch, and to have a freewheeling diode to protect said relay/power supply when you interrupt the current to stop the motor. If you don't have either an RC snubber or a freewheeling diode, your relay and/or power supply will be headed for a really early retirement the first time you try to interrupt current (you'll discover why V = dI/dt in a spectacular way). All motor drives have this protecton built in, but power supplies do not!