12 volt switching, pin output

Hello,

Me again, sorry, but i still dont got a good solution to switch with 5 volt to 12 volt. All actions that i tyed didnt work ore are to slow.

If i use a digital pin i get 5 volt as maximum output. I'm working with pulses in the microSeconds and i need around the 12 volt as output. Without changing my puls.

This is what i tryed:

Using a coil to get a higher voltage got it up to 50 volts but as output i got jaws teeth, i totaly lose my pulses... Not a good option!

Using 2 transistors to for switching with 5 volt a 12 volt input, results is getting in a negative output and the switch transistor is changing my pulse at the end of the puls, its making a curve.... Not a good option...

Using a SMD relay, works but tooooooo slow.... Very poor option... :frowning:

Im out of options!!!!

HELP!!! :cry:

Oh and if i tryed to switch with the 5v to 12v with transistors i also burned almost my 5 regular!!!! (Getting Verry HOT!!!)

Other Options?!?!?!?!

This is what i need:

minimum of 10v ouput and pulsed with an digital output pin. The pulses need to be as they are at 5 volt if you use:

LOOP:

microSeconds(40)
HIGH
microSeconds(40)
LOW

If someone can help me please help!!!

Thanks,

Christian

Try using a ULN2803A ?

With that you should be able to trigger anything up to 50v if it does not use too much current that is.

Using 2 transistors to for switching with 5 volt a 12 volt input, results is getting in a negative output and the switch transistor is changing my pulse at the end of the puls, its making a curve

Can you post a diagram of this please as this should be your solution.

I am not sure what you mean by negative output (do you mean inverted?), but the point about making a curve out of your pulses is probably due to too much base current or too little collector current. Try increasing the base resistor and / or reducing the collector resistor.

I am not sure what you mean by negative output (do you mean inverted?), but the point about making a curve out of your pulses is probably due to too much base current or too little collector current. Try increasing the base resistor and / or reducing the collector resistor.

I mean a inverted output, im getting a curve but it should be straigth down on = on / off = off / 0v, 12v, 0v, 12v etc...

How can it be that my 5v regular gets super hot if i use the 12 volt regular with transistor switch?!

I used the scheme from the last post.

Thanks,

Christian

I used the scheme from the last post.

Sorry can't see what link you mean. If it is from Peter's post then that is just a data sheet.

Yes it will be inverted that's how transistors work. Just turn round the logic in the Arduino end.

How can it be that my 5v regular gets super hot

Only one way you are drawing too much current out of it. Now why? Well the schematic might tell me or you might not have implemented it correctly. I can tell more when I see it.

Hello,

I used this scheme:

And this as my regulator:

Yes it will be inverted that's how transistors work. Just turn round the logic in the Arduino end.

Explane some more (Still dont know much about elektronics, still lerning!!!)

Thanks,

Christian

Spend a few minutes and study how a transistor is doing work for you.

An NPN transistor, if given positive voltage at the base lead from the arduino will cause it to conduct, IE current will begin to flow between emitter and collector, often supplying GND to a device on the "high side". You supplied a positive going signal but the transistor supplied a gnd connection... therefore... logic inversion.

Has the 7812 always been part if the circuit? Believe it or not, the 12V Source from the first regulator is asking the 7805 to shed a lot of volts... what it can't use... it turns to heat. Either use a bigger heatsink or feed it a lower voltage.

At first sight this circuit looks OK. However I was confused as to where the 9V was coming from, should that have been 12V?
For how a transistor works look at this page:-

http://www.kpsec.freeuk.com/trancirc.htm

What load are you switching with the 9V / 12V?
Do you get the same slow edges on the collector of the 2n222 as you do on the collector f the 2n2907?

As to the regulator getting hot what else is it driving? see:-
http://www.thebox.myzen.co.uk/Tutorial/Power.html
and
http://www.thebox.myzen.co.uk/Tutorial/Power_Examples.html

What load are you switching with the 9V / 12V?
Do you get the same slow edges on the collector of the 2n222 as you do on the collector f the 2n2907?

I used the 12volt becouse i didnt have a 7809, if i messure the first transistor with my oscilloscope, then it worked fine! But when i check the second transistor with my oscilloscope it gives curves at the end of each pulse.

The 7805 was only getting hot if i switched the 7812 and i didnt connect anything, only my oscilloscope.

Should it possible to use a 7912 for direct invertion and then getting it back positif?! If this is all working myby it would be cool to make a simple tut for arduino.cc.

Im now making a magnettic field with the 5 volt output from the arduino, pulsed with a HexFet and it reaches now to +/- 30 cm (+/- 11.5 inch) and i want to get the magnettic field larger to around 70 or 100 cm.

Thanks,

Christian

PS I looked at the urls but its getting for me a real study becouse its all in englisch :slight_smile: And me as a dutch man!!! ::slight_smile:

Hi Christian,
I am sure your English is better than my Dutch but I didn't understand the words:-

Should it possible to use a 7912 for direct invertion and then getting it back positif?

The 7912 is (I think) a negative voltage regulator, it is not at all simple to turn a negative supply into a positive supply so I am not sure what you mean.

But when i check the second transistor with my oscilloscope it gives curves at the end of each pulse.

To improve this take the 1K from the collector of the first transistor into the base of the second and make this a larger value, like 10K or 33K. Also don't just measure the output from the collector of the second transistor but have a resistive load of say 1K from the emitter to ground and measure across that.

I am not sure how you are measuring the size of your magnetic field but be aware that magnetic fields are subject to the inverse cube rule (as opposed to most things obeying the inverse square rule). Therefore to double the distance you have to increase the power eight fold.

Hello Mike,

Im totaly confused, so you say in your last post for doubleing the size of the magnetic field it would be 5v*8= 40 volts? Shouldnt it be better to get my situation working by a small coil and to get rit of the yaws teeth?! shouldnt this be easyer!?

As you see the image, i receive that if i check my oscilloscope, can i get it to a straigth line? It would be much easyer than al the transistor sh*t :slight_smile:

Thanks,

Christian

PS Coils inaf for test ::slight_smile:

Ah you didn't say that the waveform was across an inductor. Yes that is to be expected.

When you put power into an inductor you in effect charge it up rather like a capacitor. When you disconnect it (turn off the power) it will give up it's power, what you are seeing here is the discharge of the inductor caused by the field collapsing. Basically you can't get a square wave through an inductor. You will be getting into all sorts of resonance effects as well depending on the values of the other components and the values of stray capacitances you have.

I think it might be better if you explain what you are trying to achieve.

it would be 5v*8= 40 volts

Yes you have to put in 8 time the power, this is only voltage so it assumes the current is the same as the 5V situation.

That was my first test, it would be cool if it is possible to get it a straigth line.

This is what i get with the transistors, please note that the image i drawed should also be inverted... :frowning:

Im making a metal detector, pulse induction with the help of the arduino, i got it already working only the magnettic field that i have is max 30 cm on a 11 cm coil. (12 windings). I want to get a larger magnettic field to get greather dehpts.

This is what i need (Simple as that):

Thanks,

Christian

You need a complementary pair not a single transistor or FET. That is a push pull output circuit. This is sometimes called a class B output.
This is one that pulls up (connect) to +ve and then to -ve.
You can do this with a pair of PNP or NPN transistors or P type and N type FETs.
You can also get these in the same package:-
A TC4426 is a typical one, look at the data sheet here:-

Hello Mike,

I have seen the datasheet but its a litle dizzy yet for me :slight_smile: So if im rigth then it should be working if i use the "Supply Input" for my 12 volt and the "Input A" for the arduino and the "Output A" for the power mosfet that im using?! If this is the case i will directly order a bunge of these ic's :-*

http://www.farnell.com/datasheets/64616.pdf

Im i correct?!

Thanks,

Christian

Don't order a bunch until you see they are what you need. These chips are FET drivers and are meant to drive other bigger FETs. However they will give up to 0.5A output by them selves. However, having a closer look at the data sheet I see that they quite a high on resistance (10R).
You can use a push pull arrangement in two ways.

  1. ground one end of the coil and connect the other alternately to ground and +ve with the FETs.
  2. connect each end of the coil to it's own push pull output and put one high and the other low and then swap them about. This drives the current through the coil first in one direction and then in the other.
    see this link:-
    Push–pull converter - Wikipedia

I think what you are trying to do here is more than simply drive a coil (as your original question) rather you are trying to design a metal detector. The coil drive is only one aspect of this and to get maximum sensing distance you have to consider the receive side. If you are receiving using the main coil this has implications on the coil design and driving circuit.
Design of a good metal detector is not simple so I would look at the overall picture before embarking on implementing any one part of it.

I think what you are trying to do here is more than simply drive a coil (as your original question) rather you are trying to design a metal detector. The coil drive is only one aspect of this and to get maximum sensing distance you have to consider the receive side. If you are receiving using the main coil this has implications on the coil design and driving circuit.
Design of a good metal detector is not simple so I would look at the overall picture before embarking on implementing any one part of it.

I already have the metal detector working only im not happy with the results. Im driving the coil now by using a mosfet (IRF1010NS) and im listening with a LF358N (i also should protect my opamp using diodes but i didnt have one untill now, got a new roll of LL4148 and i also got my SM4004).

The first thing i thougth about is to use a higher voltage to get the detector deeper.

For me is this the only thing to start with electronics and i dont know a good other way to start with electronics. I tryed to read books and docs and it is all difficult to read. So i bougth a bunch of electronics, buyed up to 2500 euro's on components. And i just started to try.

I dont know what to do. Myby i should just stop :cry:

buyed up to 2500 euro's on components

That is a lot of money especially when you only need a few of the components. The photos showed reels of components, you only buy in that sort of quantity when you are in production. When you are designing you tend to buy only one or two. It is more expensive per component but cheaper overall.

As you increase the power in the transmit side you also make it harder to receive so the answer to a greater depth is not always to increase the power. Also the way the excitation signal sits with the natural resonant frequency of the transmitter is also a factor. As well as the amplitude of the returned signal you also might like to look at the phase as this also tells you something about the sort of material giving you the reading. Then there is the coil design to consider. Basically the deeper you detect the narrower is the area of the beam.

However, I do recommend that you look more on the net for metal detector specific circuits.

It was back in 1967 when I last worked with metal detectors and these were for industrial processes detecting contamination in products on a production line. This is a different topology to your system as we had one exciter coil and two pick up coils either side. We ran that at 44KHz and ran the material through the coils on a conveyor belt.

As well as the amplitude of the returned signal you also might like to look at the phase as this also tells you something about the sort of material giving you the reading.

It is not possible to say what metal it is. Not with pulse induction, you can with vlf systems.

The photos showed reels of components, you only buy in that sort of quantity when you are in production. When you are designing you tend to buy only one or two. It is more expensive per component but cheaper overall.

I know, but i dont buy for each reel, i only buy in greath quantity's i just want to have a lot of different components. I bougth yesterday also some new components and i receiven also some components that i needed!! Like the SM4004. I'm just collecting a lot so that i do not have to walk to the components shop to buy 50 cents just for 1 capacitor of 220uF/35v in this way i'm paying 50 cents or less for 2000 capacitors in this range.

This is what i buyed for 100 euro's (+/- 130 reels) and that is dilivered today:

The 4 you see at the left corner that are all melf resistors, i almost have now all types of resistors and all in minimelf. I first used normal metalfilm resistors but it is to expensive to buy from all 100 pieces just to grap a resistor you need.

Everything i got to much, i sell again ore how i should say it in english, im not shure :slight_smile:

As you increase the power in the transmit side you also make it harder to receive so the answer to a greater depth is not always to increase the power.

I dont know, as pulse induction its reacting on the pulse so it should always been seen on the oscilloscope.

Mayby i want to much at once (programmers instinkt?) but i hope to continue and i just want to try and if i blow up somethings i dont care i just do it the next time a bit differend. I hope so to lern from my mustakes becouse i dont have anyone who helpes me here in the serounding. I didnt have any study in electronics ore else so i need to lern all by myself... and i must say that it is hard!!!!

Thanks,

Christian

PS:

Oscilloscope Tektronix: 400 UK Pounds (second hand)
Soldiring Station: 100 euro's
Soldiring 27 euro's (200 meter)
Test PCB's 20 Pieces: 40 euro's
Cupper ?string?: 40 euro's
Books: 100 euro's
2 sorting boxes: 50 euro's
2 Test kits: 50 euro's
3x Arduino's 75 euro's
2x Arduino Lilypad 50 euro's
1x Arduino Pro 20 euro's
2x Arduino Mini 40 euro's
2x Xbee 75 euro's
Other Arduino Add-ons 300 euro's
Some batteries 15 euro's
AVR Programmer: 25 euro's
Other Tools: 100 euro's

And im already at 1500 euro's only to get the basics, the 5 other arduinos didnt be needed... Ill sell the 5 other arduino's again.

So i think its around 1000 euro's for components. Atleast 500 euro's for standaard needed components (that i buyed at the components shop and new via internet. Like 10 pieces of atmega chips, standard leds so on so on.) The other 1000 euro's is used to get some big lots.

Hello,

Ill try again with a SMD relay, it should work, the pulses being send is lower than normal but it should give me a good closure of the pulse, ill will try, if its going to work it would give me atleest 100 pulses a second instead normaly 1000 pulses. It would give me the uppertunity to test upon several voltages, i also will try high voltages up to 400 volts mayby it will work, we shall see. (Mayby a bit of stunner effect).
We shall see, i got the parts and why not just simply test and we see whats happening.

Thanks,

Christian