Netduino home hardware projects downloads community

Jump to content


Photo

Netduino for beginners - Gentle introduction with basic electronic project


  • Please log in to reply
46 replies to this topic

#1 georgejh

georgejh

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts
  • LocationGlasgow, UK

Posted 23 April 2011 - 01:36 PM

Hi guys,

I have attached an article for beginners that will include step by step introduction to Netduino with basic circuit design and programming examples.

I am expecting your comments and suggestions, thank you in advance.

Updates
23/04/2011 - v1.1 Initial draft.
28/04/2011 - v1.2 Updated file with quick code example and some future content outline.
02/05/2011 - v1.3 Transistor parameters table and few more explanatory text. Future content outline.
10/05/2011 - v1.4 Transistor operation modes explained. Typical logical switch modes illustrated. Edited and simplified calculation section.Programming example explanations added
17/05/2011 - v1.5 Added second project chapter. Schematics and diagrams has new style. Code highlighting. LED flash code examples attached.
29/05/2011 - v1.6 Fixed link to BC547 datasheet. Breadboard schematics and exercises. "Become ECO friendly" chapter and code examples. Minor other changes
25/06/2011 - v 1.7 Added long expected chapter "Solving problem with LED becoming ON when Netduino boots". New chapter "Better multithreading". Changed the name and format of the tutorial and included TOC. Started new chapter "Basic introduction to electronics principles and components" for absolute beginners (only outline for now).
20/08/2011 - v1.8 Fixed calculations and improved explanations for PNP switch. Tutorial was reviewed technically and language and style was Improved too. Outlined some more future content.
15/10/2011 - v1.9 Included second approach for "Solving problem with LED becoming ON when Netduino boots" using SCR thyristor instead of relay. Included some preliminary content of the "Introduction to electronic principles and components".

19/12/2011 v1.10 From now on, due to a 2MB file size limit on the forum I'll publish the tutorial on my blog here. You can download the file and code from the "box" section on the right side. Downloads are available also from Netduino wiki page.


27/02/2012 v1.11 Get it from my blog (download the file and code from the "box" section on the right side). Downloads are available also from Netduino wiki page and accessible for online reading here .


NOTE: Following files are from old v1.9 of the tutorial!

Attached Files



#2 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1961 posts
  • LocationBreda, the Netherlands

Posted 23 April 2011 - 02:07 PM

did a quick read but looks very nice! I'm the wrong person to judge about the contents since I'm a programmer and not that much known with electronics, but looks good.
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#3 georgejh

georgejh

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts
  • LocationGlasgow, UK

Posted 23 April 2011 - 02:13 PM

did a quick read but looks very nice! I'm the wrong person to judge about the contents since I'm a programmer and not that much known with electronics, but looks good.


Thanks for the positive comment Stefan.
I am a software developer myself and electronics is just a hobby, so cross fingers somebody with more deeper electronics knowledge will pass by here :)

#4 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1674 posts
  • LocationVenezia, Italia

Posted 23 April 2011 - 03:46 PM

George, that's a very good start, considering you are not an electronic (how to say it in english?) However I am. From the scholastic viewpoint, you have presented a typical high-school task, where the most important thing is to show to the professor that you have understand how to calculate a simple circuit. Good job: passed! From the practical viewpoint, none do that. None cares about hFE or Vbe, but overloads the base current of the transistor, because is much simpler and safer (and it takes no time to calculate). You have correctly pointed that "I do not own this value of resistance, so I'll take the closest". That's the typical approach of developers: try to use always a small set of values. This is the "industrial" approach, but could fit for "novices" also. I'd make this kind of tutorials shorter, just because I'd afraid the people don't read them otherwise. Anyway, I really want to encourage you and your helper (finally a woman involved in this forum!) I have promised to start writing something in the new sandbox, but at the moment I am still plenty of stuffs to sort out. Cheers
Biggest fault of Netduino? It runs by electricity.

#5 georgejh

georgejh

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts
  • LocationGlasgow, UK

Posted 23 April 2011 - 04:04 PM

George, that's a very good start ...


Thank you Mario!
I am so glad to hear positive feedback from somebody with electronics background.

As my excuse about too much details I will mention that my intention is to present to the beginner a bit more detail how he can approach the problem and be more precise in order to avoid danger to his Netduino. Of course after few projects behind no one will jump in so much detailed calculations :)

#6 Michel Trahan

Michel Trahan

    Advanced Member

  • Members
  • PipPipPip
  • 155 posts

Posted 23 April 2011 - 04:59 PM

Sorry but you lost my interest at page 2 ... many variable names and no reference to it ... not for me
Started with C in 1985, moved to Vb3 ... to vb6 and stopped. Now started with .Net and learning C# and VB.net and wishing VB.net was on MF !

#7 georgejh

georgejh

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts
  • LocationGlasgow, UK

Posted 23 April 2011 - 05:18 PM

Sorry but you lost my interest at page 2 ... many variable names and no reference to it ... not for me


All variables are referenced inside the specs file of the transistor but I will add them for better clarity into the next revision of the file.

#8 Corey Kosak

Corey Kosak

    Advanced Member

  • Members
  • PipPipPip
  • 276 posts
  • LocationHoboken, NJ

Posted 23 April 2011 - 10:51 PM

I'd like to ask a question about the premise of this article. Perhaps my question reveals how little I know about electronics. Is this (i.e. with a transistor) the proper way to hook up an LED to the Netduino? So far I've just been connecting them directly to the I/O pins (i.e. I/O pin to LED to resistor to ground)

#9 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1674 posts
  • LocationVenezia, Italia

Posted 24 April 2011 - 04:13 AM

Yep, Corey: the transistor (or mosfet) way is the better to drive a led, but also a lot of others loads that suck milliamps. Cheers
Biggest fault of Netduino? It runs by electricity.

#10 Chad

Chad

    Member

  • Members
  • PipPip
  • 16 posts

Posted 30 April 2011 - 12:29 AM

This is exactly what I was looking for. The "hello world" programs with the onboard led and button are great for non-programmers. But this is great for the non-electronics person! I agree with Michel, when you get to the first calculation, adding an explanation of the parameters that haven't been mentioned before and what they mean would be a great help. Also, any explanation around the formulas would also be great.

#11 Chad

Chad

    Member

  • Members
  • PipPip
  • 16 posts

Posted 30 April 2011 - 12:38 AM

Oh, and a quick question. Is there any reason this would not be a good circuit to use to drive a motor? I know there are advanced h-bridge circuits and motor drive ICs, but I just need a simple on/off for a DC motor and only want to use one pin. Thanks!

#12 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 877 posts
  • LocationNorth Yorkshire, UK

Posted 30 April 2011 - 06:06 AM

Oh, and a quick question. Is there any reason this would not be a good circuit to use to drive a motor? I know there are advanced h-bridge circuits and motor drive ICs, but I just need a simple on/off for a DC motor and only want to use one pin.


You need to add some protection in for when the motor stops. It can generate a current when it stops (back EMF) and this can be large enough to burn out the components connected to it (i.e. the transistor powering it).

As Chris said, they are noisy things.

Hope this helps,
Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life


#13 georgejh

georgejh

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts
  • LocationGlasgow, UK

Posted 30 April 2011 - 05:13 PM

This is exactly what I was looking for. The "hello world" programs with the onboard led and button are great for non-programmers. But this is great for the non-electronics person!

I agree with Michel, when you get to the first calculation, adding an explanation of the parameters that haven't been mentioned before and what they mean would be a great help. Also, any explanation around the formulas would also be great.


Thanks for the suggestions. I will improve the section.

#14 georgejh

georgejh

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts
  • LocationGlasgow, UK

Posted 30 April 2011 - 05:22 PM

Oh, and a quick question. Is there any reason this would not be a good circuit to use to drive a motor? I know there are advanced h-bridge circuits and motor drive ICs, but I just need a simple on/off for a DC motor and only want to use one pin.

Thanks!


I have plans to reach at some point driving a motor in the guide but unfortunately I cannot promise any date :(

Meanwhile have a look on those two materials:
http://digital-diy.c...-n-channel.html - useful if you want High level to switch on the motor
http://digital-diy.c...-p-channel.html - useful if you want Low level to switch on the motor

#15 GJN

GJN

    New Member

  • Members
  • Pip
  • 1 posts

Posted 13 June 2011 - 11:34 PM

Thanks for a very useful introduction to the Netduino. I'll be looking forward to your promised future installments.

#16 ItsDan

ItsDan

    Advanced Member

  • Members
  • PipPipPip
  • 101 posts

Posted 14 June 2011 - 03:23 PM

I've also been working on a lot tutorial conversions which are on the Wiki and they include driving simple DC motors.
Follow the adventures of the Box of Crappy Surplus

Total BOCS Traveled Distance: 9708 miles | States Visited: 5
Track the Box

#17 DanA

DanA

    Member

  • Members
  • PipPip
  • 26 posts

Posted 24 June 2011 - 07:19 PM

This is great! This is exactly where my 9 year old son and I are at with our "experiments". We've done the basic LED circuits and played with a 555, but we wanted something we could hook to our computer and program. This tutorial will be a good introduction to this for us I think. The motor stuff will be a cool next step too. Thanks for the tutorial! We will be following this next week when our Netduino arrives! Thanks Again Dan

#18 georgejh

georgejh

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts
  • LocationGlasgow, UK

Posted 27 June 2011 - 09:22 AM

This is great! This is exactly where my 9 year old son and I are at with our "experiments". We've done the basic LED circuits and played with a 555, but we wanted something we could hook to our computer and program. This tutorial will be a good introduction to this for us I think.

Thanks for good words Dan. I am glad you think this tutorial is good start up reading for you and your son.

The motor stuff will be a cool next step too.

Motor stuff is on the list but unfortunately I cannot promise date, especially in the middle of holiday season :)

#19 Bukage_oni

Bukage_oni

    New Member

  • Members
  • Pip
  • 1 posts

Posted 04 August 2011 - 11:58 PM

Nice job!!! Thank you for the tutorial and I can't wait to see something new from you... :D I highly recommended it people... It helps a lot!!! A friendly suggestion only, try to avoid the so much in depth detail. I am saying that because, it can look quite overwhelming in the eyes of a beginner...

#20 pater

pater

    Member

  • Members
  • PipPip
  • 11 posts
  • LocationWarsaw

Posted 05 August 2011 - 09:22 AM

i like it as well, can't wait to see project five :) thanks a lot for this book/tutorial




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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