Shop OBEX P1 Docs P2 Docs Learn Events
Regulating a 12v DC Power Source — Parallax Forums

Regulating a 12v DC Power Source

willthiswork89willthiswork89 Posts: 359
edited 2006-09-26 14:23 in BASIC Stamp
Im Talking about a car battery, im wondering number one will the stamp consume enough energy to kill my battery, and where or how can i build a regulator to regulate it to a safe operating voltage>? basically im taking a RFID reader and taking the Clutch Saftey switch and plugging a relay between it, basically what the switch does is wait for the clutch to be pushed in then it will allow the starter to turn the car over, im going to by pass it either with a relay or a transistor, i need to operate off the battery or carryalot of nine volts with me lol, im going to be using the Homework board for this project, at least for now some of the porlbmes i have thought of are

How will the microcontroller no to disconnect the switch? once i use the RFID reader it will click over to allow the car to be started, should i use a timer? like pause 30000? then by that time i should have my car started and it will go into low power mode and wake up every 2 seconds to check for input, if i use the battery i should be able to leave it powered constantly, Just leave some comments tell me what you guys think about the idea and some possible problems, and solutions! thanks guys

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Learn somthing about everything, and Everthing about somthing-
«13

Comments

  • terahertzterahertz Posts: 55
    edited 2006-09-08 01:23
    im wondering number one will the stamp consume enough energy to kill my battery

    Yes tongue.gif· eventualy, probably take a week or so.

    and where or how can i build a regulator to regulate it to a safe operating voltage?

    Get an LM317 for voltage regulation,·look on line, there are easy calculators to tell you which 3 resistors to use and how to connect it.

    Just leave some comments tell me what you guys think about the idea and some possible problems, and solutions! thanks guys

    Sorry, I don't undersatnd what your project will do???
  • terahertzterahertz Posts: 55
    edited 2006-09-08 01:36
    Sorry, I posted without double-checking.

    You'll need only 2 resistors not 3. You may or may not need the 2 capacitors, they're there only to filter some of the high frequency noise from the DC lines. The capacitor with the + sign is the type shaped like a cylinder. The one without the + sign is the flat round kind.

    I don't know if the caps are 100% needed for your ap with the car.

    I get it now, your project prevents a car from starting without your RFID tag close by, right? Cool, please let me know how your project works out, sounds like a good idea.
  • Mike GreenMike Green Posts: 23,101
    edited 2006-09-08 01:48
    You might be better off with a LDO (low dropout) regulator with a fixed output voltage (5V). These have lower quiescent current than an LM317 (won't drain your battery as quickly). The stamp can go to SLEEP for most of the time, wake up once a second or so, power up the RFID reader, then go back to sleep. In sleep mode, the Stamp consumes very little power.
  • Darth VoltarDarth Voltar Posts: 2
    edited 2006-09-08 02:10
    If you use car supply, fuse it or carry a fire extinguisher.
  • terahertzterahertz Posts: 55
    edited 2006-09-08 02:24
    If you use car supply, fuse it or carry a fire extinguisher.


    jumpin.gif·Good point.

    Is there a recomended fuse rating?

    I'm the FNG, this is a fun forum.yeah.gif
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-09-08 20:30
    My project will disable the car from being started by the key until my car swiped over the RFID Reader, i thought about just using the 9 volt but that would suck to have it die and not be able to turn the car on haha, Thats a good point about the fuse i might just go ahead and run off the 9 volt and wire up a by pass switch sosmewhere secretive. for those of you STILl not understanding what my idea will do


    No RFID Swipe-> Turn Key to Start Car-> No Start

    RFID Recognized Swipe->Turn Key to Start Car-> Transistor/Relay allows the two wire switch to ground out-> Starter Turns Over


    will a transistor work for this project do you guys think? i have one side going to the collector the other end going to the emmitter and base going to the stamp? since i knew relays have a life span transistors work forever to my knowledge unless you smoke em.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Learn somthing about everything, and Everthing about somthing-
  • Mike GreenMike Green Posts: 23,101
    edited 2006-09-08 20:51
    There are all kinds of previous threads that describe in gory detail about using a Stamp pin to drive a transistor to drive a relay. Download the Industrial Control manual from the Parallax website and look on page 86. Your basic idea sounds fine.

    You might want a separate 5V regulator for the RFID reader, a low drop-out regulator designed for use in automobiles (look at the datasheet where it will say this), one with a separate on/off pin that you control from the Stamp. That way, you can turn off everything but the Stamp and the Stamp itself can go to sleep most of the time to reduce the current requirements even further.
    It's probably not necessary, but a useful exercise in saving power.

    Post Edited (Mike Green) : 9/8/2006 8:55:20 PM GMT
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-09-08 21:51
    I dont want to use a transistor for the relay i wanted to use the transistor AS the relay, but i tried it using a pushbutton and the issue ive noticed is that even though it doesnt allow voltage through the transistor the car will still start? like there are tow wires basically when they touch they conplete the circuit and i can use my key, when i connect one side to the collector and one to the emmitter it still starts when the battery isnt even on the microcontroller, can i not use a transistor? does it still allow too much volatage/current through the trnasistor to complete the circuit? i tried putting a 220 ohm resistor on the emmitter then to the negative side of the switch and it didnt start when it was high or low so i dont know what to use, i wanna stay away from relays if i can!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Learn somthing about everything, and Everthing about somthing-
  • Mike GreenMike Green Posts: 23,101
    edited 2006-09-08 22:17
    The keyswitch in a car has several positions. In the first position, it supplies current to the car's computer controller and the accessories including lights, electric windows, etc. The start position supplies current to a starter relay which supplies a lot of power to the starter via some very short very heavy wires. This switch has to switch several amperes and I suspect you're trying to use a low power switching transistor which won't work as you've noticed. The Stamp can't supply enough current to activate an ordinary power transistor for the amount of current needed. You'll have to use a Darlington switch or a relay. Check with the car's repair manual to see how much current is needed. I strongly suggest using a relay with the contacts not on the ground side. Unless you have a wiring diagram of the car and understand it, you don't want to go around switching the ground side of switches. You don't know how that'll affect other circuits, what impact it may have on electrical noise, etc.
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-09-09 00:10
    taking the Clutch Saftey switch and plugging a relay between it, basically what the switch does is wait for the clutch to be pushed in then it will allow the starter to turn the car over

    i dont think you read what im doing man, Im using the clutch safety switch to be able to diable the start, the car is a manual and if you have one you know the clutch has to be pushed in for you to use the key to turn the car on. Its a switch under neath the dash board which has current running through one side, when the cars clutch is in the power circuit is completed and the car can start. so what im doing is taking the two wires off of the little switch and putting one side to the collector and one side to the emmiter.... but there is still too much current going trhough the transistor to stop the car from recognizing a connection. Do you get it?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Learn somthing about everything, and Everthing about somthing-
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-09-09 02:08
    willthiswork89 said...
    ...but there is still too much current going trhough the transistor to stop the car from recognizing a connection. Do you get it?
    It's NOT you -- it's everybody else.
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-09-09 02:42
    are you being sarcastic or... lol i tried explaining it best i could and it seems like people didnt finish reading what i said and replied completley skipping my question.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Learn somthing about everything, and Everthing about somthing-
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-09-09 02:45
    I guess that the clutch switch completes/interrupts the starter circuit.· How much current is involved here?· I need a schematic.· I think that you should be using a relay, not a transistor.

    Post Edit -- I think that this RFID-enabled switch should be in series with (added to) your existing system, not in place of any element (or switch.)· You could use the key to initialize the Stamp (the same way the key turns on the radio if you leave it on.)· So, you'd click it one notch (dashlights, Stamp activating...) and then give it a·second or so and then go ahead and crank the starter, etc.

    Post Post Edit --·Whatever you do, make sure that in case life happens, that you can jumper everything out and still make it into work on time.· Does that make sense?

    Post Edited (PJ Allen) : 9/9/2006 3:00:56 AM GMT
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-09-09 03:26
    were dealing with a 18+ guage wire its very little current i would imagine tomarrow ill get my voltmeter out and check it because its dark... im not real sure but basicallly in a manual car everyone knows if you push it the car will start, well the switch disables that from happening incase it rolls down a hill or somthing in gear, so

    If(ClutchSwitch = Enabled AND KeyPos = 3)
    GoSUB StarterInit


    now thats as basic as i can get it, because im not positive on voltage or anything but in my mechanics tech lab i know that most sensors run on logic level because the CPU is just a souped up microcontroller running normally < 1 Volt again, dont hold me on that but looking at the gauge wire its running its nothing more then that, guys for you tech heads its a momentary Switch, like a car horn it just completes the circuit. lol i forgot im not on a mechically inclined website, just electronically inclined! i hope this helps you guys, Help me!

    edit:

    PJ i would love for the stamp to be powered off the car but its looking kind of tedious to get that voltage down to power the stamp, probably constly too. If i could create the regulator then that would be wonderful, and figure out in my servince manual what wire power i can use when the car turns on, maybe splice into the radio power circuit?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Learn somthing about everything, and Everthing about somthing-

    Post Edited (willthiswork89) : 9/9/2006 3:30:50 AM GMT
  • FranklinFranklin Posts: 4,747
    edited 2006-09-09 03:41
    wtw89, have you finished any of the other projects you've started here? Tell us about your sucess, please.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-09-09 03:47
    well the car actually is close to impossible because the relays draw too much current, it was stupid to try so i left it alone until i have a little more 'tools' of the trade to do it. i build a mouse trap using infrared beams and a servo to shut over the thing. Built a Cricket to drive my parents whacko. Hmm, The only REAL Project ive ever had major issues with was that dumb Car which ended with 3 burns, and no success. So when school started i quit playing with my controller and ive been in auto mechanics and wanted to do this but wants some clarification on how it should draw its power, im hoping people can help me out here a little.

    if anybody is still confused heres one of my PRICELESS paint schematic/Explanations

    ·

    *so basically its a rouch diagram of what the thing really does, it doesnt complete the circuit to the starter, just tells the ECU its OKAY to power the starter up, basically that there is a human operating the vehicle. in my drawing you will notice its in its Open position meaning the clutch has not touched the button to complete the circuit*

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Learn somthing about everything, and Everthing about somthing-

    Post Edited (willthiswork89) : 9/9/2006 3:56:17 AM GMT
  • terahertzterahertz Posts: 55
    edited 2006-09-09 04:31
    WTW89.
    I'm pretty sure I know what your talking about. Your BS can't supply enough current to make a relay work. The fact that you used an equation to try to exlain what you're doing is interesting.

    ·your sig says -Learn somthing about everything, and Everthing about somthing-
    Take some time and look into how a transisitor works, If you understand anything at all it will be well worth your time. You can put a signal on the B of a Q and control large amounts of current.
  • JonathanJonathan Posts: 1,023
    edited 2006-09-09 15:12
    WTW,

    We all know how frustrating figuring out a project can be. Take a deep breath, and try not to take it out on the folks that are trying to help.

    It sounds like you have gotten some good advice here. Firstly, use a relay to switch the power to the car's starting circuit. Use a transistor to drive the relay from the Stamp. If you are using a regular relay (one with a coil) use a diode reversed across the power leads of the relay to prevent voltage spikes from the relay backing up into the stamp. Look up "back EMF" to see what I mean here. If you are using a SS (solid state) relay with < 5V actuation, dont worry about the diode or the transistor. If you use a SS relay with a actuation > 5V use the transistor but forget the diode. In all cases, have at least a 220 ohm resistor in series with the Stamp pin. With a transistor, use a 1k.

    As PJ noted, don't simply replace the clutch switch. This is an important piece of safety equipment, both for you and the car. Put the relay in series with the clutch switch. That way BOTH the RFID and the clutch switch will have to be closed in order for the car to run.

    Start by getting the Stamp to turn on an LED with a transistor. Figure out how to place the back EMF diode. If you have it wrong, the LED won't light. Then use it to switch a relay. Then use it in your project.

    An additional note: Cars can have very noisy electrical systems that can cause problems with the Stamp. If you get it all to work on the bench and then it has problems when installed in the car, that may well be the problem. If so, look up filtering power supplies and come back here with questions.

    Good luck!

    Jonathan







    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-09-09 15:48
    guys its very unsafe to directly control the Starter, the clutch saftey switch has been "Paper Clipped" because of a hole in the rubber boot for the clutch, so the car started without the clutch it for me. the real thing that saftey switch is fori s so that you dont turnthe car over then it in gear and hit somebody, its more of a mechanics life saver. i thought putting this in would give me that security of the saftey switch, without messing with it too much. as i was stating before i do not want to use a transistor to run a relay, i wanted to use a transistor to run the small little pin switch. i know how transistors work. I See it as a well of water on the top(C) a Turnable vlave in the middle "B" and a empty well on the bottom "E" basically when you Apply Voltage "Turn the Valve" Water is able to come through C and goto E. The problem i noticed yesterday is that the transistor must be letting too much current through it without any voltage accross B to allow the car not to start. Im going to go get a readinf of how much voltage were working with and get back to you guys, and since im dealing with Micro Mini Relays they have LEADS that are too skinny to stick in the BreadBoard! do you guys think i could go get a Reed Relay SPST? it seems like it would be more convenient then my micro DPDT

    But i DO NOT want to control the STARTER DIRECTLY, i want to control the sensor on the car which tells the ECU to allow voltage to the RELAY in the car itsselft to start the starter.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Learn somthing about everything, and Everthing about somthing-
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-09-09 19:26
    willthiswork89 said...
    But i DO NOT want to control the STARTER DIRECTLY, i want to control the sensor on the car which tells the ECU to allow voltage to the RELAY in the car itsselft to start the starter.
    I think we're all on the same page.· The starter motors can·draw 100s of Amps.· So, right, you want to interrupt/enable the starter relay.·
    There's no "sensoring" going on, here, no 5V.· It's all system/battery voltage.

    (see pic attached)
    729 x 409 - 18K
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-09-09 21:38
    you have it wrong, i will get a picture for you how tiny the wire is, sureley this wire isnt driving 100's of amps each sensor goes to the ecu, its just another sensor guys its not apart of the starter wiring diagram at all. It just tells the ECU that its okay to tell the relay to power up. you have the idea but the issue is not that, im using a Reed Relay 5VDC 20Ma Nominal Current to cut the power of the clutch switch, the clutch switch has been jumped since i got it anyways so its not a big deal. it will be safer with this anyways. The question i have now is how to power the stamp from the POS I key wiring diagram. i need to knock the 12 volts down to somthing safer for the stamp. Thats all i need to know, the rest i have pretty much figured out i think.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Learn somthing about everything, and Everthing about somthing-
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-09-09 21:44
    I have it RIGHT, kid.· The starter gets the cranking amps, not the starter coil.· My pic shows just that.·
    PJ Allen said...
    So, right, you want to interrupt/enable the starter relay.
    The relay, he wrote, NOT the bloody motor.

    Post Edit -- The 78ST105 is available from DigiKey, their PN is PT78ST105V-ND· http://focus.ti.com/lit/ds/slts059a/slts059a.pdf

    You can use it as a voltage regulator, but -- it can, given improper handling, be made into a finger-burner or a cigar lighter.




    Post Edited (PJ Allen) : 9/9/2006 10:19:00 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2006-09-09 21:58
    The Micrel MIC2950-05 is a 5V regulator that can put out 150ma (more than enough for the stamp and a relay). I'd get a second one for the RFID reader. It's designed for the automobile electrical environment. You need an electrolytic capacitor maybe 10uF across the output terminals (+5V/Gnd) rated at 6V to 10V.

    The LM2931-5.0 originally from National Semiconductor is similar, with similar current output and also designed for automotive use.

    I'd stay away from the LM117 if possible. It uses more idle current, requires adjustment resistors, and isn't specifically designed for the voltage surges common in an automobile's electrical system.

    Either the MIC2950 or the LM2931 would work nicely here. Be sure to have an appropriate sized fuse between your box and probably the accessory power switch on the ignition keyswitch. That way, your box is only turned on when the key is turned to the first position. Check your car's manual for the best place to connect in. You want your box to be on in both the first and start positions of the switch.

    Post Edited (Mike Green) : 9/9/2006 10:04:57 PM GMT
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-09-09 23:03
    Is there just one regulator i can use to run the entire stamp? its seeming like a real difficult thing to do, i want it to be secure but i would like ot get it done in a week or less haha it would be nice to run a 12v DC relay SPST to run the 9 volt power source that way theres no LM things or MIC MAX or FOE's about it. im trying to stay away from relays also, but as you know when the car turns over it cuts power to EVERYthing except the starter meaning running by car battery will shut the relay off which will interupt the entire starting system. so thinking about that im thinking it might not be possible to do this. what are your guyses thoughts on Powering the system, not anything else lol

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Learn somthing about everything, and Everthing about somthing-
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2006-09-10 01:19
    willthiswork89

    You can use one regulator BUT MAKE SURE THAT YOU USE A HEAT SINK because when you run the card reader and the stamp
    you will be drawing about 110 mil amps
    Now that make the regulator·run very warm
    Now if you run Stamp on one regulator and Card Reader on other regulator then you do not a heat sink and i have used the UN2803
    now this very easy·(and i also put a regulator on Un2803)

    ·If you need more than 20 mil amps then you can tie more than one InPut together and more than and more than one OutPut together to get more current i tie 3 of them together and work with getting warm

    Regulator do not cost very much and i use one every device that i use

    In one porject that i just did i had a relay that used 80 mil amps of current·i just used the UN2803 that Parallax sells in just that way

    Now if the safety has 5 volts·on ·that switch then the cars controler uses that to sence the switch and unless you make it see the same
    volts then you might see a Failure or damage the controler on your car

    Now if i where doing this i would use the relay coil for the starter· but that just me and that my 2 cents worth which may not be worth much

    I hope this help you

    Sam
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-09-10 01:28
    im just going to use a relay instead of the switch, all the switch does is connect point A to point B, are there any regulators i can get from radio sahck? i do not want to go and wait for them to come so the faster i can get it the better.

    FOr simplicity im using the Saftey switch since

    A. The saftey switch needs to be bridged to even start the car because the boot that presses on it is messed up

    B. The micricontroller just needs to control a 20MA Reed Relay to connect it like that switch would do so no damage to the sensor since its just doing what the switch did.

    Again when the car started the power to the stamp will be disabled since it takes everything the car has to turn on and will disable the microcontroller which will disable my reed relay which in turn will interupt the car from starting,. Thats hte problem im facing and not sure how to compensate for that besides just using a NINE VOLT to control the microcontroller. so update to question


    Question:
    What can i do to power the stamp since when the car turns over the power is cut from everything except the starter?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Learn somthing about everything, and Everthing about somthing-
  • Mike GreenMike Green Posts: 23,101
    edited 2006-09-10 02:15
    When the starter turns over there are still some things connected to the battery. In particular, the computer is connected. If you can go through the car manual (schematics) you will find which circuits are still enabled when the starter is running and which ones are disconnected.
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-09-10 03:16
    well the car is a 1992 honda prelude, i dont have the manual , i might be able to find it online but ill tell you if i can, can i get regulators at radioshack?
    theres my baby [noparse]:)[/noparse] this is the test subject haha it has been for various things. so anyways ill begin looking up the service manual for the 92 lude and if you guys could answer my question for if the regulators can be bought at readioshack ide be happy!





    Edit** I Found these at radioshack



    http://www.radioshack.com/product/index.jsp?productId=2062599&cp=&origkw=regulator&kw=regulator&parentPage=search



    can someone explain them to me a little in detail?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Learn somthing about everything, and Everthing about somthing-

    Post Edited (willthiswork89) : 9/10/2006 3:22:43 AM GMT
    600 x 450 - 67K
  • terahertzterahertz Posts: 55
    edited 2006-09-10 03:46
    That will work, buy a a few of them. Connect the middle pin to the - of your battery and either of the other 2 pins to the + of your battery. Check the voltage on the unused pin, if its 5V then it's wired correctly, if it's not 5V then you know it goes the other way. That's it.
  • ChrisPChrisP Posts: 136
    edited 2006-09-10 04:47
    In automotive I've succesfully run a standard 7805 with a 1n4004 diode in the supply lead to remove AC, and a 10uf capacitor across the outputs leads.

    5 volts @ 1 amp output, and have a serious penchant for Internaional rectifiers logic level fets. More like a solid state switch, no biasing, just a pull down resistor.
    IRLZ14 will more than handily drive a relay with minimum components, and yes PJ's schematic is dead on.

    Just make sure the FET is carrying the same ground as everything else. 7805 supply, and IRLZ14 relay driver from the stamp
Sign In or Register to comment.