Arduino for Beginners

ZeroPlusWe rarely cover projects for beginners in the blog and I guess that’s because most of the people I know who are into technology have been there for a while.  But as I found out when I first started getting into Linux a couple of years ago, it is awfully useful if you have a helping hand!

Only this morning we discussed a power supply which required some soldering – and that, when you think about it is not something a beginner is likely to have.  In this blog entry we’ll assume a brain, a computer and a little money to buy this kit – looks like a great Christmas present to me!  Read on…

I’m also not too old to remember my dad, keen to get me to start messing with electronics about which I knew nothing as a kid, buying me a Philips Electronics kit –which was indeed the start of a life-long hobby and career for me.

So here is something for complete beginners… the “ZeroPlus Arduino Starter Kit with Logic Analyzer”.

ZeroPlus

I’ll be honest, until a few weeks ago I’d never heard of ZeroPlus, which is a bit embarrassing because on doing some background checking they are all over the world. Oh, well!

If you’re going to make a start in modern electronics, it may as well be the Arduino because the web is littered with cheap clones and even cheaper add-ons so this can be an extremely cheap hobby. But first, you have to learn.

The ZeroPlus Kit is extremely well put together and comprises an Arduino Uno, an 8-channel logic analyser  (I’ll use British spelling from now on), a breadboard and a host of peripherals including an LCD, an RGB LED, a USB bridge, sound sensor, test hooks battery holder, leads and several component.

ZeroPlus

All of this would be of little use for the beginner without instructions. The manual is excellent and assumes NOTHING – it even explains what a breadboard is!

Someone coming into electronics after a long gap will LOVE this chance to catch up and someone who is looking at the Arduino for the first time ever will also love this. The manual is really well done, there is no tiny print and it comprises 120 laminates sides of thin shiny card, in full colour and well spaced, simple to read. It explains the parts, the connectors and what the Arduino and signal measurement is all about.

ZeroPlus

Zeroplus analyserThe centre Piece is a simple and very pleasant looking logic analyser. I’m sure it has a nice specification but for the life of me I could not find it – the manual, the box, everything is designed for beginners who at this point might not know I2c from SPI – so no point in ranting on about the subject!

The manual explained that the first thing to do was to grab the software from their site (300+ Meg) – that went well but took quite a long time despite my having high speed broadband. The downloaded ZP Studio ZIP file had a simple folder which I copied to my desktop before running setup.exe (Important, in the manual you will be expected to see “Arduino sketches” – I missed these the first time around – there is a link in the downloads section of the web for these).

I plugged the ZeroPlus unit into a microUSB lead and a nice blue light came up on the top with a reassuring sound from Windows, indicating the unit was accepted. I fired the software up and could not resist pressing the start indicator. Well, you have to, don’t you.

tmp5CE4

Clearly with nothing connected, I was going to get a lot of rubbish but I was rather pleased that I didn’t have to go setting up the serial port or any of the other stuff that requires prior knowledge. It just seemed to “work”. NOW however I could find out some more information. The display may look simply but a quick fiddle with the “Protocol decoders” dropdown revealed:

UART, I2C, SPI, CAN 2.08, LIN 2.1, FLEXRAY 2.1A, MVB, WTB, DSI BUS, USB 1.1, PS/2, PECI, YK-5…

Hang on, I’m just getting started – and no, of COURSE I don’t know what all of them mean…

DDC EDID, Serial GPIO IBPI, AMD_SVI2, USB PD3.0, MICROWIRE, SSI Interface, JTAG 2.0, ST7669, SLE4443, BDM, 1-WIRE, 3-WIRE, 1-Wire (advanced), MDDI, HIDOverI2C, I2S, S/PDIF, STBUS, PCM, AC97, HDMI-CEC, MIDI, PSB Interface, SP AUD Channel 1.1, MHL-CBUS…

Ok, that’s enough  - I’ve probably confused any beginners already – and that is no-where NEAR the full list of protocols (but for techies – there is a protocols plugins directory – which means – add-ons – I love it). There’s a search and the program apparently has 84 protocols built in!

The Analyser has 8-channels with detection of rising edge, falling edge, levels etc. At no point when looking that the screen did I feel the need to go off to find instructions – but then it’s not the first time I’ve seen a logic analyser (and as you’ll see in a later blog, it won’t be the last).

Enough of the technical stuff!!! There is a page which describes in very clear and simple terms what a logic analyser is and does.

So I have this pretty white box with a pretty blue light. The next thing would be to DO something.

Reading through the glossy manual, the reader is encouraged to try to understand what the signals coming out of various projects are about and using the logic analyser to visualise them.

I decided to try the simplest example I could think of (rather than following the manual) and put this little number together.

void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
}

void loop() {
// put your main code here, to run repeatedly:
Serial.println("Hello world");
delay(200);
}

Yes, you don’t get much simpler (well, apart from flashing a LED). I set the Arduino up for 115,200 baud serial communication and had it repeat “Hello world” ad infinitum.

I figured I’d see if I could use the analyser without ever referring to the manual.

Sure enough I selected the protocol, set the baud rate (there is an auto detect), pressed the start button and – 0x48, 0x65,0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72,0x6c, 0x64, 0x0d,0x0a

In other words, “Hello world” with a CRLF on the end.

tmpE9C2

Ok, so you can’t actually read the above, here’s a segment.

tmp86DE

The data and the length of the pulses. I did notice that the program will happily work stretched across my two screens.

By now I was itching to check out the options – and there are many, thankfully hidden away until needed so as not to confuse the beginner… but the program is no slouch!

The setup for all of this could not be simpler – I didn’t need a power supply because the USB connection to the Arduino and the ZeroPlus analyser handled that, all I actually needed was two handy leads.

tmpE836

Taken apart, you could likely buy all the bits yourself – if you knew what you were doing – and save money – but for someone with no experience and wanting to get started without having to have an expert at hand, this is the kind of kit I would have wanted if microcontrollers were around when I was a kid (they were not).

tmp51DF

The next stage might be to try one of the projects as shown here, The Arduino talking to a 2-line LCD, 4 bits at a time – I remember struggling with this one years ago – but then, I didn’t have a handy analyser and manual at the time!

So- what you need – the software described above, the free Arduino environment and the hardware in this kit – along with a PC or laptop. That’s it. No extras, no soldering.

 

If I were to be critical it would not be with the product but the suppliers in the UK – in the USA and other places, merely clicking on supplier links produced products and prices. I tried the UK suppliers and the first one I came to had “enquire for pricing” -  really – do people still do that? No thanks.

I2C Experiment

tmpA575

Toward the end of the manual is an experiment  with 4 buttons and the I2c-based serial LEDS. They provide a board with I2c encoder and 4 RGB LEDS for this purpose.  I hooked up everything as per their example with the minor change that I used some wire I had handy as the lengths they provide are rather long for short links such as the ones above, top left.  Incidentally when experimenting I always find it handy to have obscene amounts of jumper wires. The connectors don’t last forever, they are dirt cheap from Ebay and, well, just an essential for experimenting.

In the image above, to keep things neat I’ve not shown the data connectors for the analyser or the Arduino.

So the idea of the experiment is to change the colours of the LEDs. Now, granted this was the last experiment in the book and clearly they didn’t want to complicate matters by adding libraries, personally I found the code which included interrupt handling for keys, was made to look more complicated and I spent more time understanding the key codes than doing what I was supposed to do – analyse the I2c.   If you look elsewhere in a recent blog I covered using a debounce library for Arduino that is just excellent.

ANYWAY, once I got rid of my duff joints – the experiment worked by toggling the colour of the LEDs.  The idea was to set up the analyser, press a button (LEDS=RED), save that as a file, press the button again (LEDS=GREEN) and then compare the two readings.

I have to say, very nice.

tmp1D80

The resulting image above clearly shows the two I2c streams – one sending out 0x05 to address 0x20, the other sending 0x06 … sure enough – in the code – they use 0x05 for one colour, 0x06 for the other.  The software is nice – and easy to use. I could not find as zoom button but it took only a minute to realise that moving the data with the mouse while holding control – zooms in and out.  Right now I’m trying to figure out how to make the DATA (A0) a brighter colour – it hardly shows up on this image.

I have some other stuff from ZeroPlus. Keep looking in.  I hope this is useful.

Anyway, this was a great opportunity for me to make a simplified version of their demo program using that new button library. Here’s the video.

Facebooktwittergoogle_pluspinterestlinkedin

25 thoughts on “Arduino for Beginners

  1. Here in Indonesia they have a really good book for beginners with Arduino, called Arduino, From Zero To Pro and it's contents are very good indeed. Along with a separate kit of parts there is a ton of stuff for them to learn.
    I am no fan of the Arduino IDE but as a way to get people into programming and hardware it's a good platform for this with no knowledge of either subject. Assuming of course the willingness to learn. 🙂

    1. Willingness to learn is number one - but then I'm assuming that people who are not willing to learn - would not be reading blogs like this 🙂 Funnily enough, I just noticed on Facebook that Banggood have one of those packs of peripherals, dozens of them for something like $12 - that would be a good thing for a beginner to get as well, might spark the imagination.

        1. I did look at those sets from AliExpress and Banggood - indeed I have one of them somewhere - what I did find was the odd useful piece in there, the rest being an utter waste of time - like a microswitch on a board! A bit like buying assorted sweets - there are usually a few winners and the rest you just eat rather than throw them away. Still, difficult for me to say what would be great for a beginner as I'm not one.

  2. I checked the set and found on Amazon for 150USD. The main component is the Logic Analizer plus 5-6 simple limited tools. The kit is nice but by my opinion is quite expensive.

    I tried to spark the interest of the classmates of my son (16 years) and started an Arduino course.

    I used the referred Ardino kit with a lot of tools (20-30, in different topics:light, sound, motors, switches, RFID, IR, screens...). The price is 25USD.

    I bought a Saleae clone 8 channels analyzer for them. The price is 6-8 USD.

    So practically they had a much better kit for ~30 USD. The cource was fun for all of us.

    The data:

    The Logic Analyzer:
    https://www.aliexpress.com/item/New-USB-Logic-SCM-24MHz-8-Channel-Logic-Analyzer-Debugger-for-ARM-FPGA-High-Quality/32802668198.html?spm=2114.search0104.3.1.G6zGIY&ws_ab_test=searchweb0_0,searchweb201602_2_10152_10151_10065_10344_10068_10345_10342_10343_10340_10341_10541_10084_10083_10304_10307_10302_5060020_10539_5130020_10312_10313_10059_10314_10534_5000020_100031_10604_10603_10103_10605_10596_10107_10142_5080020,searchweb201603_14,ppcSwitch_3&algo_expid=45cfd9fc-4b16-44f8-91a9-d6d6aedf43e3-0&algo_pvid=45cfd9fc-4b16-44f8-91a9-d6d6aedf43e3&rmStoreLevelAB=1

    The Arduino kit:
    https://www.aliexpress.com/item/UNO-KIT-Upgraded-version-of-the-For-Starter-Kit-the-RFID-learn-Suite-Stepper-Motor-ULN2003/1207142899.html?spm=a2g0s.9042311.0.0.pRUhjV
    Package Included:
    1 X UNO Board
    1 X USB Cable
    1 X Jump Cable
    1 X Breadboard
    5 X LED Light
    1 Pack Resistor
    1 X Female to male dupond line
    1 X Potentiometer
    1 X Buzzer
    1 X 74HC595
    1 X Infrared receiver
    1 X LM35
    1 X Flame Sensor
    1 X Ball Switch
    1 X Photoresistor
    1 X Key button
    1 X Remote control
    1 X 4-digit display tube
    1 X 8*8 Dot matrix module
    1 X 1-digit display tube
    1 X Stepper motor driver board
    1 X Stepper motor
    1 X 9g Servo
    1 X IIC 1602 LCD
    1 X XY joystick module
    1 X Temperature module
    1 X Water test module
    1 X RFID Module
    1 X RFID keychain
    1 X RFID White card
    1 X Sound Module
    1 X Relay Module
    1 X Clock Module
    1 X 4*4 Key board
    1 X RGB 3 color module
    1 X 9V battery Snap

      1. I did look at that, George - as you know however with any PC based by far the most important part - is the actual software. What will run for sure with that hardware... even assuming it does have some decent oscilloscope software, the maximum analog bandwidth appears to be 3Mhz -a little limiting... more info?

          1. I had no luck AT ALL with that SIGROK stuff - I had a working SALEAE Logic program with the little cheap analyser box - I put Sigrok in - not only did that not work but it stopped Saleae working with the little box. I had to take Windows 10 64 bit back to the last saved version. Shame as it looks good.

            1. Great Article Pete, Will have some fun trying this out on my SALEAE clone.

              N.B. Both SIGROK and SALEA (Logik) installed fine on my Win 10 64 bit PC (latest version).
              Initially, there was a bit of trouble with the USB driver (the SALEAE clone wasn't recognised on some USB ports) , but "Device Manager - driver update" sorted it.

              The main benefit of using SALEA for me is that you can hover over part of the digital waveform and it shows the pulse length/frequency for that part (very handy).
              SIGROK is very nice too and somehow feels easier to use (Thanks DrFraggle for the heads up).

              Max (digital) Sampling rate of the SALEA Clone is 2Mz, which is ample for most communication uses (e.g. if you keep the I2C speed down).

              1. The software I've been looking at shows pulse length/frequency on the actual output - and there is an option to show a lot more. Erm, yes, 2Mhz is JUST ok, my ESP stuff runs at the higher speed - I've no idea why anyone still sticks to the original 100Khz. If I understand correctly, I2c runs at 100Khz 400Khz (full speed), 1Mbits and 3.2Mbits. I think most of my stuff runs around 1Mhz so the Saleae unit would be no good for that - and of course we're assuming I2c which is only one of many protocols - I must check to see what speed you need for SPI... apparently speeds can exceed 10Mhz.

                1. - "The software I've been looking at shows pulse length/frequency on the actual output - and there is an option to show a lot more"
                  Pete, all 3 software bundles perform the main functions about the same with some slight differences e.g. You might like clicking a button and dragging 2 cursors to a position to show the waveform metrics, However, I prefer hovering a mouse over the same place and the metrics automatically appear - save a lot of time for me 🙂

                  - "Erm, yes, 2Mhz is JUST ok, my ESP stuff runs at the higher speed"
                  Er, Not sure what communication protocols you are measuring, but everything from an ESP8266 is perfectly within range of a cheap clone. ?!? If not, you should be using balanced probes with a proper oscilloscope ? (e.g. Rigol DS1054Z)

                  - "I've no idea why anyone still sticks to the original 100Khz"
                  I covered SPI and I2C in uni 35 years ago and there are many good reasons, TBH, Don't worry about it, just use it. "You canna change the laws of (High Frequency) Physics" springs to mind 🙂

                  " I must check to see what speed you need for SPI... apparently speeds can exceed 10Mhz."
                  Pete, you don't need to use this high frequency - there will be too many problems/extra cost if you do 🙂

                  1. I2c - I use the ESP8266 and partly re-wrote the I2c as it had no pulse stretching and was slow - I ended up a 1MB speed and that has worked reliably with all the peripherals I've used so far.

                    Top speed I believe is 4Meg. If you did I2c 35 years ago I'm assuming that at that time, 100K would have been fine. As for SPI, the clock for that can reach 80Mhz though I've never used that personally but I do run it so as to get the absolute maximum out of displays etc.. and of course that's when you end up in trouble and need an analyser... I understand your point but trust me - when you're trying to squeeze the last bit of speed out of a display, SPI speed is one area to tackle - and if you don't know why you'd want to do that - one phrase... landscape scrolling 🙂

                    So it would be my assumption that the rip-off Saleae is possibly a tad slow. The NEXT analyser I'm covering WILL use balanced probes... and I don't have a Rigol so that's out. Actually I would like nothing more than a decent scope with logic analyser built in - maybe Christmas (or maybe not).

      2. a kit without a book with working examples and clearly indicated libraries and version is quite always worthless... the time spent going to find an example suited to your sensors and the correct lib will just piss off people, i see this maaaany times on arduino and raspberry groups on facebook...

    1. The Saleae clones.... I've never thought to ask anyone - I wonder what their bandwidth is. The Saleae Logic is indeed a nice piece of software but with just over half of the protocols the ZeroPlus software offers and distinctly less colourful.

      However I do use that as well...

          1. As above, it worked OK for me on WIN 10 "Falls Creator update" 64 bit.

            One problem I had after update, is that you may have to install some drivers for the ESP32 (look for "CH341SER.EXE" and "CP210xVCPInstaller_x64.exe" )

            1. Well, I had the problem when I tried it that the Saleae stopped working on the LOGIC program... I don't fancy messing up existing working stuff for ESP32 etc... still, nothing to stop me trying it out on a PI..

              Anyone tried Sigrok on a Pi2 or 3 ?? How is it? Fast, sluggish, working, not working?

  3. The feedback is of course welcome. Two things come to mind in defence of this kit - buying bits does assume a little prior knowledge and a little time to select. Here is one kit - you buy it knowing nothing - you spend time on it - and come away having an idea about the Arduino - and how to use a logic analyser.

    This will suit some, not others.

    And yes, of COURSE I have a cheap rip-off £3 logic analyser (I also have an obscenely expensive one). Having a box is one thing, having decent software to go with it another. The Saleae logic rip-off unit is ok and works with the actual Saleae software. Having spent the morning with this ZP-Studio software, already I prefer it - granted I've only tried a few protocols such as I2c and serial - but, well, it just FEELS comfortable.

    I am of course immediately now going to check out all the links everyone has provided - you can never have too much!

    1. I agree: we have to separate the 2 totally different topics:
      1. A set fot BEGINNERS.
      2. Having a funfction-rich Logic Analyzer for intermidiate users.

      I had the feeling that the 2 topics are somehow mixed in the ZeroPlus offer (I suggest that they try to sell the expensive LA for people who don't know exactly what is needed on beginning level with the name of Arduno.)

      Too few tools for hacking, programing, experimenting with Arduino and too complex and expensive Logic Analizer for a beginner at the same time. I don't know half of the mentioned protocols. I wouldn't think that is needed on the starting point.

      Anyway I would like to have this Logic Analyzer.

      1. I THINK (I don't speak for the company) that they wanted to give the complete beginner a package that does the lot - absolutely nothing (other than a PC or laptop) needed outside of the box. I've had great fun with it all day. Just done a short video.

  4. I did look at stocking these in my store as well for the lead up to xmas.
    the price is a bit steep, but the one saving grace I believe is the pack having such a detailed book provided.

    if you are entry level into electronics this really is a decent starting guide.

    in the end the MOQ and price put me off buying (I'm not a huge online retailer) but the company did seem pretty responsive to my queries and did try to tailor a bit of a deal for me.

  5. We were discussing speed... ESP8266 can run SPI up to full clock speed - i.e. 40Mhz, double that when running at 160Mhz - I've just been looking at some guys arguing about speed for driving RGB LEDs - which funnily enough was one of my issues when developing my own code for driving the LEDs (I didn't use SPI and hence had to use exceedingly tight assembly language to get the updates anywhere near fast enough for my own purposes. It seems that the ILI9341 for example can handle 80Mhz SPI speed - resulting in up to 60FPS refresh.

    It seems we need to consider maximum speed of test kit more than might be immediately obvious. Seems like only yesterday the IBM PC clocked in at 4.7Mhz 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *