PDA

View Full Version : What filter for BS1 running off 12v automotive power?



brettm
08-12-2006, 11:03 AM
I have a BS1 application that runs fine on my desk with a 12v power supply, but gets a little crazy when I hook it up to my truck.· I was looking at this example on Wikipedia (http://en.wikipedia.org/wiki/Low-pass_filter#Examples_of_low-pass_filters) and wondering what values would be good to use for the resistor and capacitor and if anything else would be recommended?

·Edit:· to bring some completion to this thread, through a process of elimination I figured that the problem had to be related to feedback from the solenoids.· a simple diode across them took care of the problem.· I expected it to be more complicated http://forums.parallax.com/images/smilies/smile.gif

Post Edited (brettm) : 8/16/2006 5:07:52 AM GMT

Chris Savage
08-12-2006, 11:17 AM
Hello,

·· There is a filtered vehicle power supply schematic over at the SEETRON website.· I hope this helps.· Take care.

http://www.seetron.com/an_vpwr1.htm

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

brettm
08-13-2006, 01:42 AM
that one is far more complex that the wikipedia diagram... any thoughts?

http://en.wikipedia.org/wiki/Low-pass_filter#Examples_of_low-pass_filters

I think I'm going to try a 200 ohm resistor and 10uF capacitor...

Mike Green
08-13-2006, 06:49 AM
One of the problems with an automobile power supply is that there's a lot of high frequency, high energy pulses floating around because of the motors, ignition system, and other things getting switched on and off. The average voltage is more typically 13.8V than 12V and can sit higher at times. I really would suggest a voltage regulator and one designed for automobile use. Many of the newer low dropout regulators are designed for this type of use and don't need a reverse polarity protection diode. I would use a filter designed for automobile use (Radio Shack sells some) with an inductor and capacitor on the input of the regulator. Many of the LDO regulators require a 100uF or higher capacitor on the output for stability.

brettm
08-14-2006, 02:31 AM
Thanks for the input Mike, I have a Radio Shack a mile away and I'll go over there and see what they have, though I don't recall ever seeing those. Could you perhaps find an internet link to one for me?

I understand there is a lot going on electrically in an automobile, but one thing that confuses me is that I get the same results whether the motor is running or not. I would think that with the motor (and therefore ignition system, etc) off and simply drawing off the 12v battery it would get a clean source of power....

Mike Green
08-14-2006, 07:20 AM
With the motor off, you shouldn't have problems. The regulator on the BS1 is supposed to be "comfortable" at the 14V typically seen in cars. It may be that you're drawing enough current for external devices to thermally overload the regulator at 14V where it's ok at 12V and it shuts down until it cools off. Radio Shack also has plug in automobile power supplies (wall-warts?) that have a regulator and a fuse, etc. You could pick one that puts out 9V with enough current for the task and use that. Their #273-1863 has a 1A output and is $19. Their #273-1818 seems to be an older model. It has switch selectable voltages from 4.5V to 12V and costs $33. Their website doesn't give an output current rating, but I suspect it's somewhere in the 500ma to 1A range.

Post Edited (Mike Green) : 8/14/2006 12:24:43 AM GMT

brettm
08-14-2006, 08:06 AM
The 14v shouldn't be the problem because it's actually 11.98v with the motor off, and my transformer I use from an AC source actually puts 15v through the chip with no problems. I've also tried using a 7805 5v regulator before the BS1 with the same problems.

I shouldn't be overloading the output, I'm running 5 transistors (2N4400) with 10k resistors to the base, so each of those 5 pins should only be putting out about 1mA. That also wouldn't explain why it works off a transformer but not my car battery.

I am completely confused, especially by it not working when the vehicle is not running.

Mike Green
08-14-2006, 09:57 AM
Well, maybe you need to post your circuit in detail because from your verbal description it should work. Do describe specifically what does what with the 12V wall-wart and with the vehicle power source.

brettm
08-16-2006, 01:49 AM
Okay, I tried the RadioShack 273-1863, no luck.

My BS1 is·using 2 momentary inputs·to control 5 outputs, the inputs send the program up or down·through a series of different output combinations.· All the outputs run through a 10k resistor to the base of a 2N4400 transistor which are all grounded to VSS at the emitter.· On 3 of the transistors I have LEDs on the collector side fed by VIN (the LEDs have a built in resistor and are rated 15mA at 12v).· On the other 2 transistors I have 1A relays (335ohms across the coil, 36mA)·on the collector side fed by VIN, and through these·relays I'm trying to control 2 solenoids that pull about 800mA.

When I have this circuit hooked up to the transformer (says 12v 200mA, but is actually putting out 15v) everything works perfectly.· The 200mA transformer obviously doesn't supply enough power to power the solenoids, but the LEDs and relays work perfectly.

When I have this circuit hooked up to the 12v battery (direct connection, vehicle running or not, no difference) it will work for a short while (usually around 30 sec) then freeze at one stage and once frozen·every ~2 sec the LEDs quickly·switch off and back on.·

Now here is where it gets really interesting.· If I have it hooked up to the 12v battery but disconnect the solenoids from the relays, the LEDs and relays work perfectly.· Now I can't understand why removing a load from the relays would let the BS1 run properly·when the relay is simply a mechanical connection and the only impact they should have on the circuit is the power needed to drive the coil...?

Any help?

Chris Savage
08-16-2006, 02:55 AM
How long are the leads going to them?· Long leads can act as an antenna and pick up EMI/RFI and cause problems.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

matthelm
08-16-2006, 02:59 AM
OK, sound like the Solenoids are causing the problem. They are basicly just large relays. Could they be causing EMI (Power or Ground bounce) in the stamp?

brettm
08-16-2006, 03:14 AM
I feel that I've determined it's not a power source problem, so I started a new thread:· http://forums.parallax.com/showthread.php?p=601230

Loopy Byteloose
08-16-2006, 03:22 AM
I see...
You are using the relay to drive a more powerful solenoids.

The problems is a huge inductive field collapse of solenoid that is sending a spike of high voltage back to the BasicStamp.

Nasty, nasty stuff.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"If you want more fiber, eat the package.· Not enough?· Eat the manual."········


···················· Tropical regards,····· G. Herzog [·黃鶴 ]·in Taiwan

brettm
08-16-2006, 03:29 AM
Kramer, I'm going to quote you and reply in the new thread, please join the discussion there, thanks! http://forums.parallax.com/showthread.php?p=601230