Week 7 – Circuits 101

This week we went onto something a little different – circuits!! The exercises we followed were from SIK Guide.  The projects we did were and things I learnt were;

  • Circuit #8 : A Single Servo – In this circuit I learnt to use a PWM (pulse width modulation) to control and rotate a servomotor. Servos are able to move to a position accurately which spinning motors as they use feedback circuitry. Using a library to help drive the servo we are able to add on functions commands to the sketch.  Servos can only turn between 0 and 180 degrees.


  • Circuit #12 : Spinning a Motor – Time to tackle spinning a motor. This requires the use of a transistor, which can switch a larger amount of current than the Arduino can. There are 4 different examples within this sketch;
    •  serial speed – where you could input an speed from 0-255
    • motor on then off – where you can alter the on and off time
    • motor on and off with speed – similar to above but instead of using just full speed and motor off you can change between two speeds
    • motor acceleration – accelerating the motor from 0 to full speed and then back down to zero


  • Circuit #13: Relays – Adding onto circuit #12 we’ll use the transistor to turn on a relay which can be used to power things like garage doors. I’m still working on this one as I have a little troubleshooting to do to make both Leds flash.



  • Circuit #9: Flex Sensor – In this circuit a flex sensor is used to measure the amount of bend to control the position of a servo. The more bend the higher the resistance with a range of 10K ohm to 35K ohm.  Sensor values of the original sketch had the Flex Sensor range at 752 – 905 therefore once I found this out I was able to replace these values into the sketch and upload again to more accurately match the Flex Sensor range to the Servo’s range.

IMG_2363 IMG_2364 IMG_2365