Hello, I'm trying to create basicly my first PCB, and I would like someone to take a look at it, please, as I really would like it to work. Here's the link to the final product What I'm trying to do is install a custom car PC to my car. Now the problem is I don't just want to cut it cold of power everytime I stall the engine or want to turn it off for other reasons (hence the cutoff switch in PCB) The idea is that when the key is in lock (IGN switch live) you press a button which controls the relay. The relay coil is backfeed from the output of the contacts, so you can release the button shortly and it will stay on. The car PC is woken up from this relay, as are all the other related components. Now when you cut the IGN either by stalling the engine or pulling the cut off knob, a few things should happen;
I didn't use any transistors for they are still totally weird to me and relays to me seem safer as they share no contact coil circuit/contacts circuit. I hope someone of you can take the time and look through my stuff. I think it should work as it is, but I might have made a wiring error or perhaps I should have a diode in a place I can't see for myself. Maybe the values are strange, for I just picked what I saw best. Thank you, Miikka K |
by Jouzer
March 03, 2013 |
Relays are too slow to deal with the sorts of problems you are trying to avoid. Your whole circuit looks way too complex too. You should be able to do this with a diode to feed in power from the switched side of the car battery, followed by a large enough capacitance to hold the supply up on short glitches and longer brown outs. Followed by a voltage regulator of some kind to regulate the nasty noisy spiky car voltage down to a clean voltage for the RasPi. You can also manually turn the RasPi on and off as long as the switched battery feed is live by enabling/disabling the regulator. If you need to keep it live all the time connect the diode to the car battery +ve connection before the switch. You need to clarify your requirements. More facts and timing info, less words. :) |
by signality
March 03, 2013 |
Thank you for the input. I guess I shouldve been clearer with the requirements, sorry about that. However, the schematic is complex because my requirements are as well. a. the rpi must not turn on automatically in any circumstance because when cranking the engine the voltage spikes could destroy things b. the rpi must recognize the ign status, shutting down the software side before the power is plugged off, do this automatically sensing IGN voltage through the programmable gpio port built in c. something, in my plan the 555 circuit must provide power to the electronics even after the IGN is off, so.that the computer.may perform the shutdown automatically. however, manual operation of power supply is not an option. i do have a regulated powersupply for the rpi but i forgot to include it in the picture. I know its a lot of requirements and a bit complex, but its a hobby car and i want to make the usage of car pc as convenient as possible, ie. not having to manually shut it down and wait for it and flick switches and whatnot, nor risk corrupting the OS by cutting the cord with a switch everytime. A big enough capacitor would replace the 555 in the relay coil but they are rare and expensive, the very very big ones.. and the idea just feels stupid with simply caps as we're talking possibly a minute+ of keeping the relay closed. Anyhow, I just wanted someone to see if my schematic should work, I cant figure out an easier way to accomplish all my requirements, for.me its not too complex, it probably just looks like it because of bad drawing skills. Thanks, Miikka.K |
by Jouzer
March 03, 2013 |
@Jouzer, Miikka, do yourself a favor and read @Signality’s posting again. Your system is complicated (too complicated that I could understand it together with your story) but your requirements may be very simple (and clear). Do not stick to your “ready” concept, instead start to make up your mind first, from the beginning:
Write it down. Explain it to yourself. You may have to go twice (…) through that list. I often realize my target was wrong after the second loop ... Happy hacking! Regards, Sancho |
by Sancho_P
March 04, 2013 |
Well I sat down and ran it through with an electric engineer. We were able to conclude that my schematic while looking very complex, is the best way to do what I want. After all, its just a 555 timer and necessary components to run it and a few relays, if I wanted it simplier than that I would have to go down on requirements and settle for less. By the way, this is like my 10th design of the PCB so it's not like I hadn't calculated other options. Thank you, and I pardon for asking you to proofread my schematic, I should've realized it's not easy to do if I can't provide accurate but short description of requirements. If we sat down and talked you'd probably realize it's actually quite simple. Thank you, this community has certainly proven itself that for such a complex question I got a few people trying. Miikka K |
by Jouzer
March 05, 2013 |
" ... if I wanted it simplier than that I would have to go down on requirements and settle for less." No-one said you had to drop your requirements or that anything would be "simpler". However, a properly designed electronic solution would be far more reliable than using a bunch of electromechanical components. Having had a look at the circuit you posted there are at least two fatal errors in it (I stopped at that count): 1) There is at least one route whereby the output of the 555 timer can be shorted to the 12V supply. Since the output is normally low this will almost certainly destroy the device. 2) There is nothing to protect the supply to the Raspi (To RPi and other aux) from spikes on the car 12V supply. other errors: 3) The 555 has no supply bypassing. This is strongly advisable if you use a bipolar 555 chip. http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/CD00000479.pdf 4) It is not clear how the RPi GPIO 5V connections are supposed to work but the relay aappears to have no useful function. :) |
by signality
March 06, 2013 |
Thank you for that answer, it's really helpful to me. I'm surprised my teacher didn't spot that 555 output issue. It renders my schematic useless, or I would have to go even more complex, so no thank you.. As for the others, there actually is a regulator/power supply for RPi, I just didn't draw it as I was focusing on the timer/control circuit, for me the actual power for the electronics is simple and solved. Sorry. The GPIO relay works as an electronic switch, to enable for GPIO output connect to input when the ignition goes off, so it's a signal for RPi to go software shutdown. However, the 555 output is a true problem, if I put a diode in between the voltage will go so low I don't think it will work with the coil anymore, since the 555 already outputs 2/3 of input voltage. Well, I had my RPi and installed the OS yesterday, and it seems the shutdown time is after all only a few seconds, I should be able get by with replacing the 555 timer and related components with simply a few big capacitors in paraller to the PWR relay, making it a lot simpler. Is there a way to count how long a capacitor can operate the coil? I see no danger in just trying it, but it'd be easier to know how many 5k uF caps I'll need to buy. I have one to try with, is the farad/time relation linear? |
by Jouzer
March 06, 2013 |
@Jouzer: You don’t need the cap’s power if your car battery still has it. I guess it won’t work with a (power) cap anyway because your “When time is due, the xxx goes to low, the power relay opens the circuit and everything goes to sleep.” is a desire, but not not a specification. What if Raspi detects an error / loop / cant’ shut down? Today your program may be simple but … Only the Raspi must shut down it’s own power supply. [ This simple statement includes an automated shutdown when running in a loop / program error ] Start by designing the Raspi’s power supply (from 14.75V down) but with full protection against powerful spikes (18V) and drop outs (11.5V), depending on your car audio and especially on your wiring / connection points in the car. Hint: The first element you have to use is a fuse. Your 4): The Raspi is completely isolated from the 12V circuit. What you see is a (bad) attempt to check if the relay’s contact is closed: a) The output (left) is set to “on” and sent back to an input if the contact is closed. Because of the very high internal resistance the input is floating and acts as antenna, the LED is useless (if this is the full schematic). The contact current will be too small to clean the (car rated?) relay’s contacts. Flyback is missing (as is all spike protection), the Raspi programmer will have fun debugging (I tell you, it will mostly happen when already installed in the car)! b) You could set the output to zero and add an internal pull up (1.8K?) to the input, this would slightly improve the design, but the LED … ? “Car rated” (humidity, vibration, …) relays usually have a coil resistance of 80 to 100 Ohm (Miikka got that right, or simply keeping the CL’s default value?) and need at least 20mA contact current (at DC), the more the better … Regards, Sancho |
by Sancho_P
March 06, 2013 |
Thank you Sancho, but I have to say, that and most of the other stuff you're saying, hasn't really helped at all. I know you probably mean well, but to me it comes out as mostly gibberish with a strong hint of despise. I don't know if you've picked it up by now, but again, I have very low skills with designing electric stuff. I only know how to use a handful of components and most of all the active components are out of my comprehension. I don't mean I can't and don't want to learn and study, but your advice isn't pointing me in any direction, just wiping the carpet under my feet. It is obvious I will use a fuse. As for RasPi turning it's PSU off, it's already been thought off, but I can't find a way to do it as the control of GPIO ports is lost when shutdown is enabled, and the bus voltages aren't turned off at shutdown command, just the software. It's beyond my capabilities, I'm afraid. Thank you anyway. I will just use the caps, and if they don't work or you know they wont for any reason, that's information I could use. |
by Jouzer
March 06, 2013 |
Please sign in or create an account to comment.
CircuitLab is an in-browser schematic capture and circuit simulation software tool to help you rapidly design and analyze analog and digital electronics systems.