Recommend me a microcontroller dev board

Discussion in 'Embedded Systems and Microcontrollers' started by Jonathan Wilson, Jun 9, 2019 at 3:42 AM.

  1. Jonathan Wilson

    Thread Starter New Member

    Sunday
    20
    0
    Ok I think I understand what I need for the circuitry now.
    As for the programming, I will see what the shop selling me the ATTiny85 can sell me as far as programmers go and if they can't help me I will go for a plan B or something. Only one guy on Amazon selling the Sparkfun thing and they can't gaurantee delivery in time for the show my model is being exhibited at so that doesn't work for me.
     
  2. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    4,781
    1,812
    Danadak has got a point regarding the resistor value. My initial calculations were for 6V. In actuality, with the diode drop, we’re running at about 5.3V. Using this value we end up with a resistor value of 120Ω.
     
  3. Jonathan Wilson

    Thread Starter New Member

    Sunday
    20
    0
    Not clear if the other post about GPIO total current means anything or if I am fine to drive all 4 strings at once with a 5V source...
     
  4. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    4,781
    1,812
    After reviewing Danadak’s post and the datasheet once again, I’ve changed my mind.

    Get 4 each 2N7000 MOSFETs and 10k resistors. My Internet is out, but I have an updated schematic for you. Sorry about the change, but it’s not dramatic.

    I’ll get back to you in a couple of hours.
     
  5. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    4,781
    1,812
    See my last post. I think it means something and with two additional parts per string, it will work fine.

    And you're using 5.3V (from 4 AA batteries and a diode); not 5V
     
  6. danadak

    Distinguished Member

    Mar 10, 2018
    2,884
    625
    Nano or UNO board is all you need to do the programming.

    Regards,. Dana.
     
    djsfantasi likes this.
  7. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    4,781
    1,812
    Here is the updated schematic!
    Jonathon_Wilson.JPG
     
  8. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    4,781
    1,812
    Here is the code to flash the LED strings in the last pattern you posted.

    Code (Text):
    1. const int flashPause 2500
    2. // 2.5 seconds between segments
    3. // The value is in ms, so adjust as needed
    4.  
    5. setup() {
    6. }
    7.  
    8. loop () {
    9.  
    10. for (int LEDpin=1; LEDpin <= 4; LEDpin++) {
    11.     digitalWrite(LEDpin, HIGH);
    12.     delay(flashPause);
    13.     }
    14.  
    15. for (int LEDpin=1; LEDpin <= 4; LEDpin++) digitalWrite(LEDpin, LOW);
    16. delay(flashPause);
    17.  
    18. }
    19.  
     
  9. Jonathan Wilson

    Thread Starter New Member

    Sunday
    20
    0
    Thankyou for all this, its exactly what I need I hope.
    Time to go buy some bits :)
     
  10. shteii01

    AAC Fanatic!

    Feb 19, 2010
    4,612
    729
    5V Uno
    9V-5V=4V
    4V/2V=2 led
    2 led << 4 led

    3.3V Uno
    9V-3.3V=5.7V
    5.7V/2V=2.85 led, round down to 2 led
    2 led << 4 led
     
  11. Jonathan Wilson

    Thread Starter New Member

    Sunday
    20
    0
    Just wanted to say thanks for all the help guys.
    I bought a bunch of parts today (2N7000 MOSFETs, 10KΩ resistors, 120Ω resistors, LEDs, 8-pin IC socket, breadboard, breadboard jumper leads, battery holder, batteries, 1N4004 diode, ATTiny85)
    Still investigating if there is someone in my area that can help with programming of the ATTiny85 (or if there is a supplier who can gaurantee delivery in time and sells something suitable for programming at a price I can afford) but I wired up one set of LED strings on the breadboard (including the diode and MOSFET and resistors) and when I connected the gate of the MOSFET to the positive 5.3v rail, the LEDs turned on. So at least I know the string design is good and the LEDs are nice and bright.
     
  12. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    4,781
    1,812
    Congratulations on your progress.

    There are Makerspaces in Australia. Perhaps you could find someone there to help you?
     
  13. danadak

    Distinguished Member

    Mar 10, 2018
    2,884
    625
    If you are a begginner in programming you can always use the
    block based languages, basically visual programming. Lots of
    videos, used extensivley in US by 6'th grade kids in US in class-
    rooms. Occasionally I will use it to bang out something quick.

    Block Languages Arduino -


    https://forum.allaboutcircuits.com/threads/mit-xod-visual-programming-language.159375/

    http://www.carobot.cc/how-to/ardublock/ Ardublock

    http://www.mblock.cc/software-1/mblock/mblock3/



    mBlock name of main tool - http://www.mblock.cc/
    https://maker.pro/arduino/tutorial/...the-scratch-programming-language-using-mblock

    Extentions to mBlock - http://www.mblock.cc/extensions/


    http://blog.ardublock.com/engetting-started-ardublockzhardublock/
    http://www.mblock.cc/


    Here is a simple short video to give you a taste - https://www.matrixtsl.com/flowcode_help/help-videos-v7.php?v=awbu6MyBYOY

    General website - https://www.matrixtsl.com/flowcode/

    Then there is this -

    https://forum.allaboutcircuits.com/threads/arduino-to-pc-bridge.159281/#post-1386521


    Regards, Dana.
     
  14. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    4,781
    1,812
    He has the code already. For this project, he can use that. He has a hard deadline. But he doesn’t have a programmer.

    However, these are excellent suggestions for anyone to try. I need to get more experience with these methods. Every time I try them, it’s so much easier to just code. My sketches are complicated enough that this method is frustrating. I’ve been unable to create a sketch that multi tasks several processes with block based tools. So, I’ve never developed the competency in these tools to recommend them. I’m glad that the TS has both of our skill set to draw on.
     
  15. danadak

    Distinguished Member

    Mar 10, 2018
    2,884
    625
  16. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    4,781
    1,812
    nsaspook likes this.
  17. Jonathan Wilson

    Thread Starter New Member

    Sunday
    20
    0
  18. Jonathan Wilson

    Thread Starter New Member

    Sunday
    20
    0
    I am having problems getting this to work properly.
    schematic.png
    is the schematic I have currently on my breadboard (I have hooked up just this much for testing)
    These are the parts I am using
    D1 https://www.altronics.com.au/p/z0109-1n4004-400v-1a-silicon-diode/
    V1 4xAA alkaline
    R1 https://www.jaycar.com.au/68-ohm-0-5-watt-metal-film-resistors-pack-of-8/p/RR0544
    L1 L2 https://www.jaycar.com.au/red-3mm-led-2800mcd-round-clear/p/ZD0104
    Q1 https://www.jaycar.com.au/2n7000-n-channel-fet/p/ZT2400
    R2 https://www.jaycar.com.au/10k-ohm-0-5-watt-metal-film-resistors-pack-of-8/p/RR0596
    U1 https://www.jaycar.com.au/attiny85-ic-8-pin-dip8/p/ZZ8721
    C1 https://www.jaycar.com.au/100nf-50vdc-monolithic-capacitor/p/RC5490 (for decoupling)

    This is the code I am using in the MCU
    Code (Text):
    1.  
    2. const int flashPause = 1500;
    3. // 1.5 seconds between segments
    4. // The value is in ms, so adjust as needed
    5. void setup()
    6. {
    7. }
    8. void loop ()
    9. {
    10.   for (int LEDpin=1; LEDpin <= 4; LEDpin++)
    11.   {
    12.   digitalWrite(LEDpin, HIGH);
    13.   delay(flashPause);
    14.   }
    15.   for (int LEDpin=1; LEDpin <= 4; LEDpin++) digitalWrite(LEDpin, LOW);
    16.   delay(flashPause);
    17.   for (int LEDpin=1; LEDpin <= 4; LEDpin++) digitalWrite(LEDpin, HIGH);
    18.   delay(flashPause);
    19.   for (int LEDpin=1; LEDpin <= 4; LEDpin++) digitalWrite(LEDpin, LOW);
    20.   delay(flashPause);
    21. }
    22.  
    Details of what I am using in the Arduino IDE are:
    Arduino IDE is version 1.8.9 on Windows with ATTinyCore 1.2.4 installed
    Board is set to ATTiny25/45/85
    Chip is set to ATTiny85
    Clock is set to 8 MHz (internal)
    B.O.D. level is set to B.O.D. Disabled
    Save EEPROM is set to EEPROM Retained
    Timer 1 Clock is set to CPU
    LTO is set to Disabled
    Port is not set

    When I connect everything up and run things, it cycles through all the LEDs just fine but I only get 1.something volts on the output PB2 pin of the ATTiny85 which means the MOSFET doesn't turn on fully and I get low brightness on the LEDs. If I connect the gate of the MOSFET to +ve the LEDs turn on just fine at full brightness.

    Anyone know why I might be getting only 1.something volts on the output pin (PB2) of my MCU?
     
  19. danadak

    Distinguished Member

    Mar 10, 2018
    2,884
    625
  20. Jonathan Wilson

    Thread Starter New Member

    Sunday
    20
    0
    Yeah I found out about setting the pin mode to output.
    I also now know that its possible to get an ATTiny85 (and a 1n4004 diode) hot enough to melt the plastic on a 400-hole breadboard (and for at least one component to release some "magic smoke") although I dont know for sure how it happened or 100% what is and isn't dead.

    The worst that can happen is that I am out $5 for an ATTiny85 (I now have 2 and the one that didn't melt the plastic should still be working even if the plastic-melting one is dead) and a buck or 2 in small bits that may possibly be dead. Chalk it up to beginner mistakes, learn from them and move on (and have spares of anything that can fry and that's cheap enough to have spares of).

    Not sure if I am going to buy more diodes and try again with AAs or just forget that and move to USB power via the wall-wart of a cheapie pre-paid phone I bought at one point while my main phone was out of action)
     
    Last edited: Jun 15, 2019 at 9:02 AM
Loading...