element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Blog Arduino beginner
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Former Member
  • Date Created: 3 Nov 2013 8:48 PM Date Created
  • Views 1995 views
  • Likes 0 likes
  • Comments 11 comments
  • Math
  • help
  • arduino
  • advice
Related
Recommended

Arduino beginner

Former Member
Former Member
3 Nov 2013

I'm a complete beginner when it comes to electronics and programming, so I decided to help educate myself I would buy an Arduino starter kit. This kit arrived yesterday and came with an Arduino Project book which is jam packed with information and tutorials (great for learning and inspiration!!).

 

So far I have read the first few pages of the book and followed along with the first few examples. It's a lot of fun but I'm concerned about the mathematical aspect of electronics and programming (I skipped a few chapters to see what i would be doing and saw a few daunting parts that i could not get my head around). If any one has any advice for the Mathematical side I would be glad to hear from you in the comments section (i did not do very well at maths in school image but I don't want to give up) 

  • Sign in to reply

Top Comments

  • mcb1
    mcb1 over 12 years ago in reply to kjhart0133 +1
    Erny Don't get too hung up on the maths. It wasn't my strong subject, but hasn't stopped me. There is certainly a time when you need to roll your sleeves up and get stuck in, but I sense you aren't there…
Parents
  • ntewinkel
    ntewinkel over 12 years ago

    Hi Erny,

     

    When it comes to the math, there are plenty of examples that have already solved what you'll need to do most starter projects. Of course, there are levels of difficulty like with everything else. So if you want to figure out how to put your Arduino into orbit then you may need to brush up on your skills more image

     

    Even for things like figuring out values of resistors and such, I find that I tend to use circuits that others have already put together and made available to the public.

     

    And if you do have the odd time when you run into a situation requiring extra math, forums like this are full of people who love math and don't mind helping out here and there.

     

    Of course, it never hurts to brush up on your skills, and for that there are some really nice websites out there that offer free courses you can do in your spare time. Try https://www.coursera.org and Khan Academy - I noticed Khan Academy offers math right from grade 3 (basic addition and subtraction) and up, as well as computer science courses. If you want something at college level, I've noticed that MIT has a lot of great stuff available fro free online as well.

     

    Cheers,

    -Nico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to ntewinkel

    Hi Nico

     

    Thanks very much for the advice and the websites, I will definitely try to brush up my skills as I feel not only will it help me learn but one I build a project alone I will feel happier knowing that I built it without help(hopefully this feeling will keep me motivated to learn!).

     

    Thanks

     

    Erny  

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • kjhart0133
    kjhart0133 over 12 years ago in reply to Former Member

    Erny,

     

    I suspect you are getting hung up on the 'math' related to binary and hexadecimal numbers and boolean logic.  If this is so, take heart, lots of Arduino beginners have the same problem.  Most learn as they go, but as a first step you should post a couple of specific examples that you don't understand.  Once you get one or two examples cleared up, that usually leads to further understanding.  Also, once the community on this forum gets a better idea of what your questions are, they can better guide you to suitable resources.  Feel free to PM (private message) me with some questions if you want some basic help.

     

    Kevin H.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mcb1
    mcb1 over 12 years ago in reply to kjhart0133

    Erny

    Don't get too hung up on the maths. It wasn't my strong subject, but hasn't stopped me.

    There is certainly a time when you need to roll your sleeves up and get stuck in, but I sense you aren't there yet.

     

    I would suggest more 'doing', and less reading.

    There are plenty of tutorials and examples, and I have suggested to the students I took to try the following.

    • LED's and blink example
    • LED's and the BlinkWithDelay example to be able to use something other than Delay.
    • Inputs with a switch, and then two switches, making one turn on and the other off.

    Play with the values and try to understand how the sketch works.

     

    Once you get your head around how the above bits work, you may want to look into temperature, and LCD Display, and I suggest the I2C displays (4 wires) and the DS18B20 temp chips.

     

    One thing to watch out for is USE A RESISTOR in series with the LED's.

    There are examples that don't and they rely on the internals of the chip.

    Use a 220 or 330 ohm resistor .... its a lot easier when you change to something without limiting.

     

    There are some basics we ran in 'The Shed' magazine that you can download (click on the picture) with the sketches here

     

    Mark

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to mcb1

    Hi Mark

     

    I understand the code and I know what it is doing if I were to read it, my concern came when looking at project 2 / 3 (love -o- meter) in the arduino uno starter kit's project book where by the reply signal from the temperature sensor was converted to volts and then Celsius. I cannot understand why it was worked out like that, I tried to work it out on paper and the result didn't seem correct. Unfortunately I don't have the book in front of me otherwise I would post the section I mean.

     

    Thanks

     

    Erny

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mcb1
    mcb1 over 12 years ago in reply to Former Member

    Erny

     

    Looking at this link Math for Project 3 Love-o-Meter - Arduino Forum

    They have the following code.

    void loop(){
      int sensorVal = analogRead(sensorPin);
      Serial.print("Sensor Value: ");
      Serial.print(sensorVal);
      //convert the ADC reading to voltage
      float voltage = (sensorVal/1024.0) * 5.0;
      Serial.print(" , Volts: ");
      Serial.print(voltage);
      Serial.print(", degrees C: ");
      //convert the voltage to temp in degrees
      float temperature = (voltage - .5) * 100;
      Serial.println(temperature);

     

    The ADC value is 1024 steps, with 1024 being 5v and 0 being 0 v.

     

    So at line 06 they are dividing the reading to work out the voltage

    They have swapped the figures but essentially its 5/1024 * SensorVal/1

    (I never was good with that .... but with 5v as the reference you have 4.88758 mV/step)

     

    The datasheet for a tmp36 says it is 10mV/degreeC.

    Hence once you know the voltage you should have the temperature.

     

    I cannot understand why they do line 11, as the datasheet doesn't mention any offset voltage

    It states that it is 10mV/degC and is 250mV at 25 degC.

     

    There are lots of reasons why I don't use the analogue temp sensors and prefer the Dallas One wire devices.

    The comments here  https://www.sparkfun.com/products/10988 support my decision.

     

    Hope this helps.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • mcb1
    mcb1 over 12 years ago in reply to Former Member

    Erny

     

    Looking at this link Math for Project 3 Love-o-Meter - Arduino Forum

    They have the following code.

    void loop(){
      int sensorVal = analogRead(sensorPin);
      Serial.print("Sensor Value: ");
      Serial.print(sensorVal);
      //convert the ADC reading to voltage
      float voltage = (sensorVal/1024.0) * 5.0;
      Serial.print(" , Volts: ");
      Serial.print(voltage);
      Serial.print(", degrees C: ");
      //convert the voltage to temp in degrees
      float temperature = (voltage - .5) * 100;
      Serial.println(temperature);

     

    The ADC value is 1024 steps, with 1024 being 5v and 0 being 0 v.

     

    So at line 06 they are dividing the reading to work out the voltage

    They have swapped the figures but essentially its 5/1024 * SensorVal/1

    (I never was good with that .... but with 5v as the reference you have 4.88758 mV/step)

     

    The datasheet for a tmp36 says it is 10mV/degreeC.

    Hence once you know the voltage you should have the temperature.

     

    I cannot understand why they do line 11, as the datasheet doesn't mention any offset voltage

    It states that it is 10mV/degC and is 250mV at 25 degC.

     

    There are lots of reasons why I don't use the analogue temp sensors and prefer the Dallas One wire devices.

    The comments here  https://www.sparkfun.com/products/10988 support my decision.

     

    Hope this helps.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
  • Former Member
    Former Member over 12 years ago in reply to mcb1

    that kind of helps, but this is what confused me even more, when i tried to work it out on a calculator line 6 seems fine i get a figure that looks correct then as soon as you do line 11 which is supposedly turning the voltage you have got from line 6 to degC  you get a very odd number which seems too high for degC

     

    for example if sensorVal = 900 then its (900/1024.0) * 5.0 = 4.39453125

     

    then line 11 says (4.39453125 - .5) * 100 = 389.453125

     

    that seems wrong to me :/ but like i said not good with math so i could be being stupid

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mcb1
    mcb1 over 12 years ago in reply to Former Member

    Erny

    Okay after some more searching I found the explanation here on page 115

    Arduino - Free Download eBook - pdf

     

    Ladada also confirms it

    http://learn.adafruit.com/tmp36-temperature-sensor

     

    The datasheet here also confirms it.

    image

    const float get_temperature(){
    - const int sensor_voltage = analogRead(TEMP_SENSOR_PIN);
    - const float voltage = sensor_voltage * SUPPLY_VOLTAGE / 1024;
    - return (voltage * 1000 - 500) / 10;

     

    Hence their example gets a reading of 154 which works out to be 25.19

     

    The issue with yours is that a reading of 900 seems very high.

    I would suggest checking your connections, in particular the earth/ground to ensure its making it all the way to the tmp36.

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube