dcsimg
Results 1 to 18 of 18

Thread: Getting Started

  1. #1

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    9,544

    Getting Started

    I'm interested in some of the things that y'all have done(I've been peeking around the threads) and I'd like to dip my toes in the water a bit.

    I'm thinking that I'll create a reaction time counter. My idea is that there will be a red light and that light will turn green. Whenever the light turns green you hit a button. It will then display the time measured in milliseconds how quickly you reacted to the light turning green.

    My questions are... how do I get started, how much money do I have to spend to get started, what language do I need to learn, etc.?

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,683

    Re: Getting Started

    Great question! You should look into microcontrollers.

    A microcontroller is a small electronic device that typically runs from 5 volts or 3.3 volts perhaps from a battery. You can consider it to be an extremely small computer into which you load some source code of your own design.

    Your source code lets you control the input-output pins of the chip to turn on LEDs or to measure the logic state of buttons.

    There are many manufacturers of microcontrollers available, some commonly used ones are made by:

    • "Microchip" -- PIC series
    • "Atmel" -- AVR series
    • "Parallax" -- Propeller series and Basic Stamp series
    • "TI" -- MSP430 and related family
    • ARM -- numerous manufacturers -- super powerful and very complex


    That list is in approximately ascending price order, but it's worth looking at all of them. Personally, if I have a small project like the one you described, I'll instantly grab an Atmel ATTiny85 chip from my parts shelf and build the circuit on a piece of "perfboard" which is cheap and easy to find at any online electronics vendor. You'd solder down a chip socket, the LEDs, some resistors and some kind of display to show your reaction times.

    To write the software that will run on the Atmel chip I would use the free "Atmel Studio" suite that is available (from atmel.com) at version 6.2 as I write this. It's a big download but it does support Atmel's ENTIRE chip collection (hundreds of parts!).

    The other manufacturers mentioned here have corresponding software suites that cater for their own product lines.

    So now you've got a chip and a compiler -- but you need to get that code into the chip somehow.
    In the case of the Atmel family, you'd probably use the AVRISP MKII programmer device. This lets you connect the chip directly to the programmer and download the compiled code into the chip from the Atmel Studio suite.

    The compiler will communicate with the chip and install the compiled binary file into the microcontroller's internal EEPROM storage. Then it's in there forever - you disconnect the programmer and hook up a battery and you can start using your device as a stand-alone system.

    I've simplified the process a lot in this description and I welcome others to fill int he blanks I've no doubt left.

    It's not expensive to get into electronics... you have already got access to the most expensive part -- a computer. The internet is your most powerful resource in electronics. The other expenses will be things like a soldering iron ($30 for an entry level one that everyone begins with). Also you'll want a programming device like the Atmel one I mentioned above, I got mine for about $40. Then there's the electronics parts themselves, generally pretty cheap.

    When I first started electronics I basically bought components as-and-when I needed them, to keep the costs down.

    Where do you get parts??? In no particular order (varies from country to country)...
    • Farnell
    • Premier
    • RS
    • Avnet
    • Digikey
    • Mouser


    Parting shot:

    If there is one all-important thing I can impart on you, it's this... Learn how to read datasheets.

    Pretty much every electronic part has it's own datasheet (some are better than others). Learn how to extract the important, salient information from your datasheet and you'll be streets ahead. Reading datasheets is a major skill and one that will serve you well. At first it will seem frustrating and difficult, I know this from painful experience. Keep at it, and develop a healthy distrust of the humble datasheet. Sometimes they tell you lies.

    Electronics is a tremendously rewarding occupation, and it's not all that expensive. Good luck
    I don't live here any more.

  3. #3
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,683

    Re: Getting Started

    I forgot to mention programming languages...

    Most common microcontrollers will let you write native code in assembly language and C code at least. Some of the exotic ones will let you code in javascript, C# or forth. Pascal, ruby, even python are not unheard of.

    To keep things simple I'd recommend C as a good place to start since every microcontroller under the sun has a C compiler available.
    I don't live here any more.

  4. #4

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    9,544

    Re: Getting Started

    Wow. Thanks for the detailed reply. Hopefully on my next paycheck I'll get started.

  5. #5
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,683

    Re: Getting Started

    PS...
    I'd recommend watching some reputable basic soldering tutorials on youtube. It's wise to develop good soldering habits from the get-go. And always use lead-free solder.

    "Adafruit", "MAKE:Magazine" and "Sparkfun" have some good tutorials.

    Get some flux too
    I don't live here any more.

  6. #6
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,529

    Re: Getting Started

    Woss didnt mention Arduino at all. Arduino is my favorite platform and makes it EXTREMELY easy to get into electronics. Actually, at lot easier than what woss described because the microcontroller circuit is already created, you just need to create the circuit for the LED and button (in your case). Plus it comes with the free IDE for Arduino...

    I strongly recommend you try out Arduino first. I wrote an article on getting started with Arduino... I have yet to see it posted anywhere (Brad?)

  7. #7
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,683

    Re: Getting Started

    Arduino makes it extremely easy to make something. But in doing so you won't have learned much about electronics. Grabbing off-the-shelf libraries that make all the magic happen isn't the same as understanding what is going on in the chip.

    Try Arduino for a while but move on to building the full circuit yourself as soon as you can.
    I don't live here any more.

  8. #8
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,529

    Re: Getting Started

    I have been hesitant to move on from Arduino in fear that my circuits wont work... Perhaps it is time that I take that step?

    Arduino can still be really useful and it is a good introductory to electronics if you have never done anything before. I personally like how easy it is to work with Arduino, especially when it comes to home automation devices. The types of projects I work on are network intensive, so it would take a lot of knowledge for me to create my own networking circuit from scratch.

  9. #9
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,346

    Re: Getting Started

    Quote Originally Posted by dclamp View Post
    I have been hesitant to move on from Arduino in fear that my circuits wont work... Perhaps it is time that I take that step?
    Why would they no longer work?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  10. #10
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,529

    Re: Getting Started

    I am saying if I designed my own microcontroller circuit. Arduino takes care of the power and microcontroller circuitry, I just design the circuits for the paraphernalia attached. I also dont have to worry about programming with FDTI chip over USB because Arduino has that all built in.

  11. #11
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,683

    Re: Getting Started

    Any 5V or 3.3V regulator will work fine for powering up the AVR chip, such as the LM7805 or the LM7833.

    Just use Atmel's programmer tool: http://www.atmel.com/tools/AVRISPMKII.aspx.

    The bare minimum for getting an AVR running is as follows:

    • the AVR chip itself
    • voltage regulator + 2 caps (typically)
    • a 10K pull-up resistor for the reset pin
    • 6 pin ISP connector (wires straight into the AVR)
    • an LED so you can see your code is working
    • a 10nF decoupling cap for the AVR


    You don't even need a crystal, as the AVR can run from it's internal oscillator.

    Also the AVRISP MKII can be modified to provide the 5V power so you can run your circuit straight off the 6 pin header if you want. Saves having to use a battery or a wall wart.
    I don't live here any more.

  12. #12
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,529

    Re: Getting Started

    How do those compare to the Arduino ATMega328 chips in terms of memory (code space and processing memory?)

    I am going to look into this. Do you suggest any tutorials?

  13. #13
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,683

    Re: Getting Started

    Sorry, I wasn't very clear with my wording. "AVR" is the name of the chip family made by Atmel. The ATMega328 is an AVR.

    The AVR family is pretty large and has a wide range of memory and flash options. If you want a fast way to choose a chip for your project then you can use Atmel's "Microcontroller selector" link on their main page... http://www.atmel.com/products/microc...s/default.aspx

    Handy tip... get the datasheet for any chip (or other electronic part) you are interested in. The one for the ATMega328 is here http://www.atmel.com/Images/doc8161.pdf

    You will notice that it is a seriously large document. It covers several very similar chips in that sub-family of AVR chips.

    Every electronic component has a datasheet. Get that and you will know everything about that particular component, from it's physical size, to it's "silicon errata"!!!

    Before looking for a tutorial, just get yourself a copy of the Atmel Studio (v6.2) and begin a new project and choose the ATMega328 as the "target device". That will set you up with a "hello world" project that you can compile and load into the chip with the programming device.

    Atmel Studio is based on the Visual Studio IDE, so it will be familiar to you already no doubt.
    Last edited by wossname; Jul 2nd, 2014 at 02:28 PM.
    I don't live here any more.

  14. #14
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,346

    Re: Getting Started

    Quote Originally Posted by wossname View Post
    Some of the exotic ones will let you code in javascript, C# or forth.
    Such as? I have been looking in to Arduino but that is using C or C++ which, I do not know how to code. I know C# but as we all know C and C++ are not C#.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  15. #15
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,529

    Re: Getting Started

    Arduino C is really easy to learn. If you know C#, Javascript, PHP or any other language based on C, then you are good to go.

  16. #16
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,346

    Re: Getting Started

    Quote Originally Posted by dclamp View Post
    Arduino C is really easy to learn. If you know C#, Javascript, PHP or any other language based on C, then you are good to go.
    Well, I have .Net and an old version of Visual C++ (Visual Studios 6.0) but no C.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  17. #17
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,683

    Re: Getting Started

    C++ is a super-set of C. C code will compile correctly in a C++ compiler.

    Alternatively, get yourself a linux box (or a virtual) and just use the standard C compiler you get with it (GCC).
    Last edited by wossname; Jul 7th, 2014 at 01:58 AM.
    I don't live here any more.

  18. #18
    ex-Administrator brad jones's Avatar
    Join Date
    Nov 2002
    Location
    Indianapolis
    Posts
    6,565

    Re: Getting Started

    Getting Started with Arduino / Blink LED
    By Dylan Sweaza -


    Are you ready to jump into the Maker or IoT world? Do you want to dabble with building electronic solutions? Discover the Arduino and what it takes to get started today!


    http://www.codeguru.com/cpp/misc/get...-blink-led.htm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width