Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Netduino Plus, DIS(Direct Ignition System) and transistor help


  • Please log in to reply
27 replies to this topic

#1 Frankie

Frankie

    Member

  • Members
  • PipPip
  • 16 posts
  • LocationArnhem, Netherlands

Posted 21 October 2012 - 07:37 PM

Hello peeps, I have a problem getting a DIS to fire with a transistor and my lack of electrical knowledge has me bogged down so i was hoping for some help. The DIS im using is powered by 12v battery and fires with a controlwire that takes 5v and about 14mA. In getting this to work im using the BC547B transistor. The transistor works fine from the neduino, i check with a led and it powers on and off just fine. ive used this as a reference: http://www.danielsol...heets/BC547.pdf At first i used the 5v of the netduino on the transistor but after that didnt worked i added an additional power supply at 5v but that didnt work either. When i put the 5v directly on the trigger of the DIS it works fine so everything works except for the firering with the transistor. Plan B was to use the netduino relay shield and that works fine. What am i doing wrong? I also have a IRF520 MOSFET lying around, should i use that one? ps. ive added a youtube video with the sparl:

#2 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 21 October 2012 - 08:01 PM

you might want to use an pnp instead of a npn transistor, and invert the input signal (write false = on, true = off) bc557 you could also set it up different with the npn. like: collector -> resistor for 14ma -> positive base -> 1-10k to netduino pin emitter -> to your dis input and also-> emitter -> resistor -> gnd

#3 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 21 October 2012 - 08:09 PM

Hi Frankie, Can you show us how you wired everything up? Paul

#4 MicroEmb

MicroEmb

    Member

  • Members
  • PipPip
  • 12 posts

Posted 21 October 2012 - 08:18 PM

Hello peeps,

I have a problem getting a DIS to fire with a transistor and my lack of electrical knowledge has me bogged down so i was hoping for some help.

The DIS im using is powered by 12v battery and fires with a controlwire that takes 5v and about 14mA.

In getting this to work im using the BC547B transistor. The transistor works fine from the neduino, i check with a led and it powers on and off just fine. ive used this as a reference: http://www.danielsol...heets/BC547.pdf

At first i used the 5v of the netduino on the transistor but after that didnt worked i added an additional power supply at 5v but that didnt work either. When i put the 5v directly on the trigger of the DIS it works fine so everything works except for the firering with the transistor.

Plan B was to use the netduino relay shield and that works fine.

What am i doing wrong?

I also have a IRF520 MOSFET lying around, should i use that one?

ps. ive added a youtube video with the sparl:



Hi Frankie

The DIS is firing on 5V 14 mA , so you need to make this voltage in a controlled way, that is not the easiest with a BC547
so i have a better solution for you. In most cases when controlling hardware from a micro controller board you should isolate the hardware in this case the DIS, and that is what you have done when you control it with the relay, fine. Now you can control the relay instead from the Arduino, and for that you can easily use the IRF520 you had.

On the IRF520 you have 3 leds, D = drain, G = gate and S = source.
Connect the Source to ground, and connect the Gate to the Arduino pin you use for controlling. then connect the Drain to the relay, the side that is connected to ground, so the relay is in serie with the power supply.

Se simple schema

+12V or what you have
|
|
Relay
|
|
Drain
|
|-----------|-Gate to Arduino
|
Source
|
|
Ground

#5 MicroEmb

MicroEmb

    Member

  • Members
  • PipPip
  • 12 posts

Posted 21 October 2012 - 08:28 PM

Hello peeps,

I have a problem getting a DIS to fire with a transistor and my lack of electrical knowledge has me bogged down so i was hoping for some help.

The DIS im using is powered by 12v battery and fires with a controlwire that takes 5v and about 14mA.

In getting this to work im using the BC547B transistor. The transistor works fine from the neduino, i check with a led and it powers on and off just fine. ive used this as a reference: http://www.danielsol...heets/BC547.pdf

At first i used the 5v of the netduino on the transistor but after that didnt worked i added an additional power supply at 5v but that didnt work either. When i put the 5v directly on the trigger of the DIS it works fine so everything works except for the firering with the transistor.

Plan B was to use the netduino relay shield and that works fine.

What am i doing wrong?

I also have a IRF520 MOSFET lying around, should i use that one?

ps. ive added a youtube video with the sparl:



Hi Frankie

The DIS is firing on 5V 14 mA , so you need to make this voltage in a controlled way, that is not the easiest with a BC547
so i have a better solution for you. In most cases when controlling hardware from a micro controller board you should isolate the hardware in this case the DIS, and that is what you have done when you control it with the relay, fine. Now you can control the relay instead from the Arduino, and for that you can easily use the IRF520 you had.

On the IRF520 you have 3 leds, D = drain, G = gate and S = source.
Connect the Source to ground, and connect the Gate to the Netduino pin you use for controlling. then connect the Drain to the relay, the side that is connected to ground, so the relay is in serie with the power supply, also add a 100K from Gate to ground.

Se simple schema

+12V or what you have to drive the relay with
|
|
Relay
|
|
Drain
|
|----------------Gate to Arduino
|
| Add 100K to ground here
|
|
Source
|
Ground
Now you can control the relay from Netduino and the DIS will fire off.

//

#6 Frankie

Frankie

    Member

  • Members
  • PipPip
  • 16 posts
  • LocationArnhem, Netherlands

Posted 21 October 2012 - 08:34 PM

Hi Frankie,

Can you show us how you wired everything up?

Paul


Hi Paul,

ive made a quick schematic with SmartDraw, not the prettiest but i hope it helps.

In de schematic i have left the netduino out and just uses a 5v line to open and close the transistor

#7 Frankie

Frankie

    Member

  • Members
  • PipPip
  • 16 posts
  • LocationArnhem, Netherlands

Posted 21 October 2012 - 08:35 PM

Hi Paul,

ive made a quick schematic with SmartDraw, not the prettiest but i hope it helps.

In de schematic i have left the netduino out and just uses a 5v line to open and close the transistor


now with attachment

Attached Files



#8 Frankie

Frankie

    Member

  • Members
  • PipPip
  • 16 posts
  • LocationArnhem, Netherlands

Posted 21 October 2012 - 09:40 PM

Thanks for the pointers guys, itssssss SOLVED, connected the emitter directly to the control wire and it goes awesome now. Used my Netduino basic for a small program, changed the resistor to the base, connected to D0 and connected the ground and here is the result: ps. Are there things to worry about, like frying the transistor or netduino anytime soon

#9 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 21 October 2012 - 09:41 PM

Hi Frankie, You have not got it wired up quite right yet. When the transistor is ON in the circuit you drew, it will short out the 5V rail to ground. That's not really a good idea. Sorry I can't draw this right now... Disconnect the 5V & 12V grounds from each other. Leaving the 12V ground connected to the DIS. Connect the emitter to the 5V ground. Connect 5V positive directly to the DIS control wire input (as already shown). Disconnect the collector from the control wire and join it instead to the DIS ground (which is also the 12V ground). Now when the transistor base is pulled up to 5V (as shown), the transistor will Turn ON and allow current to flow from the 5V positive, into the DIS control wire, then out of the DIS ground into the transistor and down to the 5V ground. Hope you get the idea - Paul Edit: glad its fixed, you beat me to it.

#10 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 21 October 2012 - 09:51 PM

If you've connected the emitter to the control wire, you will not be getting the full 5V, you will actually be getting the Netduino's 3.3V minus the base-emitter drop of about 0.7V. So I think the voltage on the control wire will only be about 2.4V.

#11 Frankie

Frankie

    Member

  • Members
  • PipPip
  • 16 posts
  • LocationArnhem, Netherlands

Posted 21 October 2012 - 10:05 PM

If you've connected the emitter to the control wire, you will not be getting the full 5V, you will actually be getting the Netduino's 3.3V minus the base-emitter drop of about 0.7V. So I think the voltage on the control wire will only be about 2.4V.


I have it now like in the schematic attached. And what you see in that little movie. Ill draw up what you said earlier and see how that goes. Thanks so far for all the help ;)

Attached Files



#12 Frankie

Frankie

    Member

  • Members
  • PipPip
  • 16 posts
  • LocationArnhem, Netherlands

Posted 21 October 2012 - 10:24 PM

I have it now like in the schematic attached. And what you see in that little movie. Ill draw up what you said earlier and see how that goes. Thanks so far for all the help ;)


Hi Paul,
I've made you're schematic in smartdraw and I makes a lot more sense ;) and it definitely works so im sticking with youre suggestion ;)

thanks a lot for helping me out here, very much appreciated

#13 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 21 October 2012 - 10:32 PM

add 2 more resistors. you can choose between one from +5v to collector and one from emitter to gnd. (as i said in first post) or one from emitter to your device and one from emitter to gnd. //edit: you shorten your device to +5v (or whatever you put in)

#14 Frankie

Frankie

    Member

  • Members
  • PipPip
  • 16 posts
  • LocationArnhem, Netherlands

Posted 21 October 2012 - 10:41 PM

latest schematic

Attached Files



#15 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 22 October 2012 - 07:20 PM

Hi Frankie, I'm not sure why, but I seem to have missed several updates on this post so I've got a bit out of step with all the updates and suggestions! That last diagram looks right. Before I saw your diagram, I drew the attached this evening to show you what I meant. 1/ The circuit from the example you started with. The transistor is fully ON, so it has a voltage drop of about 0.3V and most of the 5V supply is available to the load. The base of the transistor is about 0.7V above the emitter. In this circuit the base voltage does not really matter. 2/ Using this to drive the DIS. Note that the negative on the 12V battery is NOT the same as the Gnd of the Netduino. The transistor bridges these signals when it turns ON. 3/ I think this is what you had initially. In this circuit the base emitter voltage matters. The emitter must be about 0.7V less than the base, and the base can only be 3.3V at the very most. Hence the emitter can only be 2.6V. (3.3V - 0.7V = 2.6V) So the load only gets 2.6V not 5V! The rest of the volts are lost across the transistor which acts as a resistor because it is not fully ON. 4/ Using a second (pnp) transistor. Now one npn transistor turns on a pnp transistor. In this case the 0.7V base voltage drops are both next to the rails, hence both transistors can turn on fully and the load gets the full voltage. 5/ How it would be applied to the DIS. Now all the circuit uses the same ground. I hope this sheds light on the issues - Paul PS, should I ask why you are making big sparks?

Attached Files



#16 Frankie

Frankie

    Member

  • Members
  • PipPip
  • 16 posts
  • LocationArnhem, Netherlands

Posted 23 October 2012 - 11:59 AM

Hi Frankie,

I'm not sure why, but I seem to have missed several updates on this post so I've got a bit out of step with all the updates and suggestions!

That last diagram looks right. Before I saw your diagram, I drew the attached this evening to show you what I meant.

1/ The circuit from the example you started with. The transistor is fully ON, so it has a voltage drop of about 0.3V and most of the 5V supply is available to the load. The base of the transistor is about 0.7V above the emitter. In this circuit the base voltage does not really matter.

2/ Using this to drive the DIS. Note that the negative on the 12V battery is NOT the same as the Gnd of the Netduino. The transistor bridges these signals when it turns ON.

3/ I think this is what you had initially. In this circuit the base emitter voltage matters. The emitter must be about 0.7V less than the base, and the base can only be 3.3V at the very most. Hence the emitter can only be 2.6V. (3.3V - 0.7V = 2.6V) So the load only gets 2.6V not 5V! The rest of the volts are lost across the transistor which acts as a resistor because it is not fully ON.

4/ Using a second (pnp) transistor. Now one npn transistor turns on a pnp transistor. In this case the 0.7V base voltage drops are both next to the rails, hence both transistors can turn on fully and the load gets the full voltage.

5/ How it would be applied to the DIS. Now all the circuit uses the same ground.

I hope this sheds light on the issues - Paul

PS, should I ask why you are making big sparks?


Thanks Paul, im now using schema 2.

On what I'm going to do with the spark, well that's a long story but ill try to keep it short.

INTRO:
Im from the eastern part of Holland and we have a tradition at the end of the year, we shoot with old milk canisters or other contraption. We use calcium carbide gas to do that.
heres a small video of what it is:

and some build like this:



Last year we made a gun on a trailer with a recoil system, modified a car jack and added a windscreen motor to it to make it go up and down etc.. etc. To get the accetelyne gas from the carbid you have to poor water over it and it starts to gass, because its a very messy and inefficient job we've build a gasifier that hold clean gas
The gassifier has 3 savety valves and never goes over 3 bar of pressure, its rated for 10bar pressure.

We build everything ourselves with scrap metal, using a angle grinders and welding equipment!

Anyway this year im going to automate it with the netduino, ive already programmed a platform on the netduino to handle Ajax requests and response in Json, created a whole interface layer for the hardware and services to manage it all. I created a request mapping class to map commands like ~ipaddres\firecontrol\armIgnition or ~ipaddres\jackcontrol\0 where 0 is the enum down. etc etc.

To control it all I have build a mobile webapp with JQuery mobile and loads of javascript: http://heuveltje.net/boom/
Because the netduino isn't capable to host the mobile web-app(found out the hard way) I have bought a Raspberry Pi to host the web-app. Raspberry was pretty easy, put Debian on the sd card, get all the packages in with aptitude, set permissions and presto. All you have to do to make it work is modify the header in the apache config to allow cross domain call. Oh and set the Jquery setting ;)

So what's left to do now is make a power stabilizer to get the 12v car battery to 5v, for the transistor, ada fruits RGB led strip and to power the raspberry Pi. Then I have to make something to stabilize the car battery to 12v. The car jack and DIS igniter get their own private car battery cause they will be on the trailer and pull loads of amps. Im almost done coding, have to add some buttons and update the screen for the settings.
The devices are connected through a small Wifi AP

When I have it all done, its going to be in a lexaan box, with buttons etc. looking pretty in the field with all the LED's.

The team of idiots :) consist of a netwerk expert from Thales, Lotus dealer/race driver/shop manager, technical drawer/teamleader and me the software engineer/welder.

As you can read, the weakest part of the team is the fine electronics ;)

ps. we've been add this for many years and for example the gassifier is at version 2.5 already. The cannon and trailer are getting an overhaul too but all less drastic than last year because we don't have that much spare time left.

If it wasnt for this forum and all the wonderful tutorials wouldend have gotten so far in such a small amount of time, really great this community. When its all done ill post the code for others that need inspiration

Attached Files



#17 Frankie

Frankie

    Member

  • Members
  • PipPip
  • 16 posts
  • LocationArnhem, Netherlands

Posted 23 October 2012 - 11:59 AM

Car Jack: Led strip:

#18 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 23 October 2012 - 06:27 PM

Oh dear, what have I done?

Holland now have weapons of mass destruction.
What happened to growing tulips - I thought that was fun :)

On a serious note, don't use any of the transistor circuits above to trigger the DIS.

If you have not come across it yet on the forums, there is a design feature with most of the digital IO pins. When the Netduino resets or powers up, the IO pins are pulled high by internal resistors. These resistors will give enough current to turn on the transistors above.
If your Netduino were to be switched on, or if it was reset unexpectedly, you could start a war with Belgium or worse - burn your eyebrows off.

A simple fix but still not very safe is to use one of the IO pins that does not get pulled high (A4 or A5).

However, what I would recommend is that you use a low current opto-isolator and drive it from two Netduino pins. One to be taken high and one low. This will prevent war with Belgium due to a reset, and make it less likely a software glitch could accidentally fire the DIS. Ideally have two tasks one controlling each pin. I mention this idea in the following Wiki page

Have fun but do it safely - Paul

#19 Frankie

Frankie

    Member

  • Members
  • PipPip
  • 16 posts
  • LocationArnhem, Netherlands

Posted 23 October 2012 - 11:32 PM

Oh dear, what have I done?

Holland now have weapons of mass destruction.
What happened to growing tulips - I thought that was fun :)

On a serious note, don't use any of the transistor circuits above to trigger the DIS.

If you have not come across it yet on the forums, there is a design feature with most of the digital IO pins. When the Netduino resets or powers up, the IO pins are pulled high by internal resistors. These resistors will give enough current to turn on the transistors above.
If your Netduino were to be switched on, or if it was reset unexpectedly, you could start a war with Belgium or worse - burn your eyebrows off.

A simple fix but still not very safe is to use one of the IO pins that does not get pulled high (A4 or A5).

However, what I would recommend is that you use a low current opto-isolator and drive it from two Netduino pins. One to be taken high and one low. This will prevent war with Belgium due to a reset, and make it less likely a software glitch could accidentally fire the DIS. Ideally have two tasks one controlling each pin. I mention this idea in the following Wiki page

Have fun but do it safely - Paul


Safety first is our credo ;)
a war with Belgium isnt really the problem, no challenge in that lol :D

I've read about the the problem that the pins get pulled high but i havent seen a spark yet while the netduino was powering up, ive used my netduino basic for small testing.
I will have a look at incorporating an opto-isolator. At this time i used one of the unused relays on my relay shield as an extra precaution.

ps. We've been doing this stuff for almost 10 years without an incident, we'll be fine ;)

#20 Frankie

Frankie

    Member

  • Members
  • PipPip
  • 16 posts
  • LocationArnhem, Netherlands

Posted 06 January 2013 - 03:25 PM

Hi guys,

 

I just wanted to show you what we made with the netduino.

The netduino runs a small webserver accepting commands and produces JSON output. Im using an EventHandler factory and different mappers for the functions and hardware commonication.

 

Special thanks to Paul for helping with the transistor solution, NeoMika who's webserver project became the base for the Webservice, Wouter Huysentruit for the JSON parser and everybody on this forum for contributing.. The wiki was great help for getting the RGB leds working. thanks to Adam S from financecoding for sharing the code for the relayshield.

 

Near the end the code didnt got any nicer and had some resource locking issues, at a point the netduino would stall in debug mode while trigerring the DIS. I solved it by removing the webservers event handler and locking the trigger method.. not very nice but very functional when youre out of time.

 

anyway.. thanks a million for the support guys!

 

The controlunit for the canon, elevation adjustment, trigger and manual control

Posted Image

 

more detail:

Posted Image

 

 

Conrol unit:

Posted Image

 

wifi accespoint(emergency solution as we couldend get the wifi running on the PI

Posted Image

 

 

buttons/switches on the lid as wel as some gages and the touchscreen

Posted Image

 

 

Posted Image

 

 

And here the webapp(loaded from the raspberry PI) that controlled it all.

http://heuveltje.net/boom/

 

Heppy new year and on to the next project






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.