Relays and the Propeller
malcolm3000
Posts: 12
Hello,
I'm new to microcontrollers and have been playing with my new Propeller and eventually will begin interfacing it with my meccano set.
I've had some luck running a small electric motor using a transistor but want to use a relay to be able to use higher voltages than 3.3v (the motor sometimes needs to be turned to allow it to run at 3v). However, the relays I find at radio shack need 5v to pull the coils in.
My questions are these;
1. Should I use 5v to run the propeller or is this a poor practice and put too much strain on the chip?
2. Are there any relays that will pull in using the smaller voltages?
Thanks,
Malcolm.
I'm new to microcontrollers and have been playing with my new Propeller and eventually will begin interfacing it with my meccano set.
I've had some luck running a small electric motor using a transistor but want to use a relay to be able to use higher voltages than 3.3v (the motor sometimes needs to be turned to allow it to run at 3v). However, the relays I find at radio shack need 5v to pull the coils in.
My questions are these;
1. Should I use 5v to run the propeller or is this a poor practice and put too much strain on the chip?
2. Are there any relays that will pull in using the smaller voltages?
Thanks,
Malcolm.
Comments
search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=Z622-ND
You could also use a transistor just like with the motor, but controlling a 5V or higher coil voltage relay.
You could also use a transistor with a higher voltage motor.
There are some Solid State relays that will trigger from 3.3 volts, but you might be better off using a opto isolator chip, so that the prop triggers the led in the opto, and the opto triggers a relay, as this will help protect the prop from the relay better.
John
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whistler: I want peace on earth and goodwill toward men.
Bernard Abbott: We are the United States Government! We don't do that sort of thing.
Sneakers (1992)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
Here www.electronicsteacher.com/circuits-and-diagrams/motor-and-general-control-schematics/r106.gif
and here home.att.net/~Tom.Horsley/phonetale/relay.jpg
and here (operation of transistors in circuits) www.kpsec.freeuk.com/trancirc.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Adrian Sosa Araujo.- San Luis, ARG - Time Zone (GMT -3)
El planteo de un problema es mas importante que su soluci
I've gotten the transistor to energize the 5v relay and I can hear the relay work. I even used a separate voltage supply to actuate the motor and the motor turns every time.
However, the end result that I was looking for was to have a single power supply. I have a 9v DC adapter plugged into my home ac outlet and thought that I could get all the power I needed from it (rather than just the 9v battery). This was to run the chip and motor(s). However when I initially tried the one power supply and tried to turn the motor on, the power fluctuated in the system, chip and all, preventing the motor or chip from running properly. I have the chip board set up by following Parallax's PE platform (40-Pin).
I suspect that I have to understand my circuit and capacitors better or use two different power supplies. One to be dedicated to the chip alone and the other to run all other items through relays. Could I be discharging the capacitors too quickly?
I appreciate your help before and if you have any suggestions to help me stick to one power supply, I would be thankful.
Thanks,
Malcolm.
If your motor is designed for use with a 6V battery or 4.5V battery, it can be damaged by running it at higher voltages. It would be nice if you had some idea of the current drain of the motor. Under heavy load, a small motor can draw as much as 1A or more, perhaps way more than your wall wart can provide.
Until you understand the needs of your circuit and parts, in the absence of information from datasheets or spec sheets, you'd be better off having one supply for the Propeller and another one for the motor(s), with a common ground terminal for all the supplies.
nope. Works very happily at 3V too. Check the datasheet.
Thanks for your input.
I do have the specs.
1. Relay draws 89.3 mA with a pick up voltage of 3.5V
2. Motor draws .18A~.25A at no load (which is what it is seeing at the moment) at 1.5V to 3V.
3. The adapter puts out 9v with a maximum of 1.0A. (With the motor running at no load the total amperage drawn is 274ma measured at the adapter).
I've noted that when the motor is not running (it needs a push which is what I'm trying to avoid) the total current drawn (measured at the adapter) is 312ma.
When the stores open today I'll be buying the second power supply but eventually there has to be a solution. There are many toys out there that run the motors and chips fine under one power supply.
Thanks,
Malcolm.
1) We need a schematic of what actually is wired, not what you think is supposed to be there.
2) We need a more detailed description of what happens after you reset your Propeller
3) We need a listing of your program
The schematic and listing should be as attachments to your reply using the forum's Attachment Manager.
>nope. Works very happily at 3V too. Check the datasheet.
Javalin, I know what the datasheet says (3.3 volt power (2.7 – 3.6 VDC)), the point is - he asked about running the prop with 5v.
John
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whistler: I want peace on earth and goodwill toward men.
Bernard Abbott: We are the United States Government! We don't do that sort of thing.
Sneakers (1992)
I have attached the schematics Propeller 1 and Propeller 2 as well as the in PDF format (I've haven't done any serious programing since I took C many years ago and I know there is a better way but at the moment I'm learning as I go). The schematic that has the chip has two circuits. One shows the power distribution but that has been modified. See my attachment which shows the motor and relay.
I will check to see once I post if I can read the attachments. If I cannot, I will re-submit.
Thanks,
Malcolm.
2) You do need a diode in series with the LED on the next pin to limit the LED current. Usually 150 Ohm or something like that (from 100 Ohm to maybe 330 Ohm roughly).
HTH
Once you get one motor running, why not another..and another?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki Rocks! - propeller.wikispaces.com
I found out that my relay (running about 180mA) kicks out using a separate power source. I'm guessing the relay overheats carrying the current to the motor and somehow that resets my chip. On P16 I have an LED that should stay on when the P17 is also on (P17 is the output for the coil on the relay) but it goes out. I believe the relay overheats because when I reduce the current on the motor it seems to run indefinitely. Before, the motor ran for about 5~10 seconds before resetting the chip and that's even with the motor running on a completely separate power source (I bought another 9VDC power supply). This is frustrating. The motor needs high current to start but once started the current needs to be reduced.
The relay is a Radio Shack part number 275-240 5VDC and on the front of the package it's rated for 1A (120VAC/24VDC) but on the back the Nominal Current is listed as 89.3mA. Which is correct? Can the relay handle 1A or only about 90mA? I'll visit Radio Shack this week and try to find out.
Malcolm.
By the way...I've noticed some very nice diagrams. I have multisim 2001 student edition but could not find a voltage regulator in the components so I had to draw my sketches out by hand. Is anyone here familiar with Multisim and how I can model a voltage regulator.
Thanks.
I am not an EE by any means, but why not just run the base of a TIP120 Darlington driver from a prop pin through a 100 Ohm resistor, and directly run the motor with low-side switching? I am running a 200 mA, 12 Vdc motor this way and it works well, with no heating of the chip at all even without a heat sink. On a Protoboard, I just use the raw wall wart power in to run the motor. Plus, a simple PWM gives excellent speed control. Starting the motor up too quickly can cause the prop to reset (it has a large rotor mass), but ramping the PWM gives smooth starts and stops. Still working on PID speed control ....
Just make sure you have a diode across the motor leads.
Cheers!
Take Paul R's post for instance, it seems it would address your requirement rather than your question. As to the transistor shorting and taking out the prop I would put that in the same category as lightning damage. Keep it simple, one transistor and one resistor plus a diode for the motor. There is that issue with power supply droop and you can overcome it with the suggestions that have been offered. However none of them can help you if the motor stalls as your power supply does not have enough current in this instance to maintain it's output voltage within acceptable limits. The worst that can happen is that the prop resets and the motor is turned off and unless it's a safety critical system this is quite acceptable behavior don't you think?
*Peter*