So I want to start a car- Explain to me like i'm five
@lokki Awesome. Ymmv?
Your Mileage May Vary. ;-)
Cheers man. Your a great shops. I'll do up my shopping list tomorrow and start my notes. If I start uploading diagrams can you look them over and make sure I've got it right?
Yeah no worries @MarkGabb. Just tag me in the post to make sure I see.
**updated to include ignition barrel part so i know its right
***ok so upon further reading i cant just use any pin i want on the arduino nano, and i have to use specific points...which ones thoug is a bit harder
****after looking at @lokki pictures of his boards again im realizing that i really have no idea what im getting myself into, but perserverence is the key i think
I see what you mean with the pictures, I attempted to edit them in but google drive seems a bit retarded like that. I use imgur, it works well for me.
So first, just to reassure you, the circuits I hacked together are actually really simple. They just look 'difficult' because they were less planned than they were evolved. I changed my mind several times in the process and instead of starting again just rerouted things, added parts and links to join everything together.
So don't be too put off by that!
If I do it again, and I have no doubt I will, I will do it differently.
Now, pin assignments on arduino can be mixed and matched within certain basic limits. The most important concern I find is that you keep the I2C pins and any other hard wired communication points free as long as possible. You use those ones last and only if you run out of pins for other things.
You'll want the I2C pins for your NFC reader board. I2C also allows multiple items to be stacked on the same port BUT only if they have different addresses.
This means that you may have a V3 reader and another I2C device connected to the same port but you may not have two (2) V3 readers conncted to that point at once.
You may have the two readers on the same data lines but only activated one at a time, or you may have the same readers on different ports (I2C and SPI) at the same time.
My approach to this has been to add an extra header for a second board for door access... but I'm not using it until I'm happy with the way the rest of the unit works. At that point I will add circuitry that allows the 'door lock reader' to be active when the car is locked and off, and inactive for a time after the door is unlocked then closed - allowing the 'ignition reader' to become active and start the car.
But don't worry about any of that yet, concentrate on the starter part of your project and you'll be fine.
Your drawing of the ignition barrel is pretty much it in a nutshell - in my skyline though, I have an extra wire that powers the computer and instrumentation, the car runs without it in a basic mode but it does need to be linked in. You may want to check a gregorys manual or similar and have a look at the circuit diagram for your ignition barrel.
What car are you hacking on?
Something I'm noticing on your diagram is that you'll want to add something in between the relay and the arduino to trigger them properly without cooking the arduino - max current rating is really low and running multiple relays straight off the board will end in tears. just add transistor and resistor in between so that it's the transistor triggering the relay when the arduino single pin is active high, (the resistor is for pulldown) and use a flyback diode to stop the relay 'bouncing'.
Duplicate that for all your relays and you'll be right!
Just out of curiousity, what's the go with the reader units in the picture? I'm having crazy issues seeing them properly so talk me through what they are and why they are where they are. :-)
@Lokki the Readers were just any reader i could grab out of fritzing...didnt seem to be anytnhing applicable.....
im having on a mitsbishi mirage 96 model, so no computers.....i figure it makes it easier to start with...and lots of wrecker parts is a screw the barrel or anything like that....
i find drawing out the diagrams to be difficult as you have to try to keep everything easy to read, and i dont remember much of my electronics.....
so on the Active side of my relay as a transistor, resistor, and a "flyback" diode on the other side?
as i dont have central locking in my car yet, ill leave out the second reader....and look at adding it in later to make it simpler....
ill upload a new design either tonight or tomorrow...will be great if i get this all done, ill have a great FAQ and instruction manual for anyone else who wants to follow the steps
**i dont see i2c ports on the diagram of the arduino i have?
@MarkGabb I'm just downloading fritzing and I'll see if I can knock out a small diagram before I get distracted.
Car sounds good, it'll still have a computer so you'll want to double check what goes active on the back of the ignition barrel when you go from OFF to ACC to ON.
I2C is basically GND, PWR, SCL, SDA - the important ones are SDA and SCL. You'll need to keep those ones free for your reader board.
@lokki i can upload my design if it makes it easier?
Lol, thanks mate. I'll have a look in a couple.
@MarkGabb, hokay, ave a look at that one. it's rough, the values aren't right, but it's the basics of what I've done for the starter side of things. it shows the way switching the relays works, and that should help. Check the 'schematic' version - the fritzing version is intolerably messy and horrendous.
I've just made a couple of changes to that schematic to show SDA/SCL and the relay connections and battery.
So basically what we have there is a power regulator circuit with filter caps, the arduino, two relays indirectly driven and the explanation of what each one will do (start and on are self explanatory I'm hoping).
You'd provide power to one side of each relays output contacts and the other side intercepts the appropriate ignition wire/s.
@lokki ok now im possibly even more confused but I think I follow it
basicly I just need to find out the correct sizes of the parts needed then follow from a to b
is there a program I can use to work out what sizes I should on the components? or a calculator of some sort...
the more I look at it the more I can follow it....
if I can ask what exactly are the transistors doing?
I think that's all I have to ask for now
your a scholar and a gentleman
@MarkGabb, it can be a little confuzzling but break it down into sections.
- You've got the power regulator which is just dropping voltage from the battery to appropriate voltage for the arduino and PN532 reader.
- You have transistors driving relays x2
- you have connections to the reader unit (5v/gnd/sda/scl)
The NPN transistors will open a path to GND from the relay coil when voltage (HIGH) is applied out of the arduino. Think of it as a tap or valve. The resistor is like a safety mechanism that keeps voltage (LOW) until it's actually triggered. The diode bleeds off residual power from the relay coil once power is no longer applied by the arduino/transistor chain - it stops the relay self-triggering in kind of a flapping motion.
So, appropriate voltage to one side of the relay, then an interrupted path to GND from the other side of the relay, with that triggered by the arduino via a transistor.
@lokki ok that makes a lot more sense....
so do I just take the +5v and gnd from the ardino on its same points?
Sorry, I don't follow that - GND points will be linked together in/on the board there - so link regulator/battery GND to everything else GND. Anything that needs 5v gets that from the 5v side of the regulator circuit there, so all linked together again
@lokki all good you answered my exact question if I did garble it upon trying to get it from my head to my fingers.....
ok so now I just need to find the correct sizes of components and go shopping :D YAY
Awesome! Will be interesting to see what you come up with there mate!
Yeah actually, it'd be easier to keep track of if you start a project thread, leave a reply here pointing to there.
calculator for pull down resistors
NPN transistors (I just used random ones from my parts bin)
10uF electrolytic capacitors for filtering
Diodes I used are 1N4001
breadboard type stuff to put board on
1 x arduino Nano
1 x elechouse PN532 v3 Reader (cant substitute from all ive read...not worth the trouble)
2 x flyback diodes
2 x resistor (???)
2 x bipolar transistors (???)
2 x capacitor (???)
computer IDE power leads will be sufficient for connecting external devices such as cabled to colum and cables to reader. probably main power in as well...clean and secure connection
@lokki would you like this thrown in a new thread to keep it clean and so others can follow if they desire to learn later?