Posts with «australia» label

Meet Core Electronics: a new Genuino reseller in Australia

We’re happy to introduce you to our new Genuino Reseller in Australia: welcome Graham Mitchell of Core Electronics holding a brand new Genuino Uno R3!

- Tell us a bit more about Core Electronics.

Core Electronics is based in Newcastle, Australia. Since 2007, we have brought together creative products from around the world (now including Genuino!) to empower innovative Makers in Australia. The Arduino team and community have been an integral part of the Maker Movement, and we’re honestly excited to support Genuino here in Australia.

- What’s your company’s super power? 

It would have to be that Core Electronics is powered by a staff of Makers and DIYers. This means we’re passionate about what we do and “we get it” when it comes to product support.

- What’s your favourite Arduino or Genuino project?

Robotanic” from VIVID Sydney 2015. VIVID Sydney is a very popular annual event where art, technology and commerce intersect. The “Robotanic” installation was a digital garden of organically shaped nodes with plant-like characteristics. Each node varied in shape and height. When touched, the nodes would put on a show of erratic light and would respond to motion-sensors, which triggered sounds associated with nature as if the environment was coming to life. At the heart of each node was an Arduino Mega.

It was a sensational project and we helped with a couple of product selections to get the team on track. I’ve showcased this project as it’s an example where creativity meets technology; enabled by Arduino and the broader community.

Contacts

Core Electronics Store Website   – FacebookTwitter – G+

Experimenting with Arduino and IKEA DIODER LED Strips

Introduction

A few weeks ago I found a DIODER LED strip set from a long-ago trek to IKEA, and considered that something could be done with it.  So in this article you can see how easy it is to control the LEDs using an Arduino or compatible board with ease… opening it up to all sorts of possibilities.

This is not the most original project – however things have been pretty quiet around here, so I thought it was time to share something new with you. Furthermore the DIODER control PCB has changed, so this will be relevant to new purchases. Nevertheless, let’s get on with it.

So what is DIODER anyhow? 

As you can see in the image below, the DIODER pack includes four RGB LED units each with nine RGB LEDs per unit. A controller box allows power and colour choice, a distribution box connects between the controller box and the LED strips, and the whole thing is powered by a 12V DC plugpack:

The following is a quick video showing the DIODER in action as devised by IKEA:

 

Thankfully the plugpack keeps us away from mains voltages, and includes a long detachable cable which connects to the LED strip distribution box. The first thought was to investigate the controller, and you can open it with a standard screwdriver. Carefully pry away the long-side, as two clips on each side hold it together…


… which reveals the PCB. Nothing too exciting here – you can see the potentiometer used for changing the lighting effects, power and range buttons and so on:

Our DIODER has the updated PCB with the Chinese market microcontroller. If you have an older DIODER with a Microchip PIC – you can reprogram it yourself.

The following three MOSFETs are used to control the current to each of the red, green and blue LED circuits. These will be the key to controlling the DIODER’s strips – but are way too small for me to solder to. The original plan was to have an Arduino’s PWM outputs tap into the MOSFET’s gates – but instead I will use external MOSFETs.

So what’s a MOSFET?

In the past you may have used a transistor to switch higher current from an Arduino, however a MOSFET is a better solution for this function. The can control large voltages and high currents without any effort. We will use N-channel MOSFETs, which have three pins – Source, Drain and Gate. When the Gate is HIGH, current will flow into the Drain and out of the Source:

A simplistic explanation is that it can be used like a button – and when wiring your own N-MOSFET a 10k resistor should be used between Gate and Drain to keep the Gate low when the Arduino output is set to LOW (just like de-bouncing a button). To learn more about MOSFETS – get yourself a copy of “The Art of Electronics“. It is worth every cent.

However being somewhat time poor (lazy?), I have instead used a Freetronics NDrive Shield for Arduino – which contains six N-MOSFETs all on one convenient shield  – with each MOSFET’s Gate pin connected to an Arduino PWM output.

So let’s head back to the LED strips for a moment, in order to determine how the LEDs are wired in the strip. Thanks to the manufacturer – the PCB has the markings as shown below:

They’re 12V LEDs in a common-anode configuration. How much current do they draw? Depends on how many strips you have connected together…

For the curious I measured each colour at each length, with the results in the following table:

So all four strips turned on, with all colours on – the strips will draw around 165 mA of current at 12V. Those blue LEDs are certainly thirsty.

Moving on, the next step is to connect the strips to the MOSFET shield. This is easy thanks to the cable included in the DIODER pack, just chop the white connector off as shown below:

By connecting an LED strip to the other end of the cable you can then determine which wire is common, and which are the cathodes for red, green and blue.

The plugpack included with the DIODER pack can be used to power the entire project, so you will need cut the DC plug (the plug that connects into the DIODER’s distribution box) off the lead, and use a multimeter to determine which wire is negative, and which is positive.

Connect the negative wire to the GND terminal on the shield, and the positive wire to the Vin terminal.  Then…

  • the red LED wire to the D3 terminal,
  • the green LED wire to the D9 terminal,
  • and the blue LED wire to the D10 terminal.

Finally, connect the 12V LED wire (anode) into the Vin terminal. Now double-check your wiring. Then check it again.

Testing

Now to run a test sketch to show the LED strip can easily be controlled. We’ll turn each colour on and off using PWM (Pulse-Width Modulation) – a neat way to control the brightness of each colour. The following sketch will pulse each colour in turn, and there’s also a blink function you can use.

// Controlling IKEA DIODER LED strips with Arduino and Freetronics NDRIVE N-MOSFET shield
// CC by-sa-nc John Boxall 2015 - tronixstuff.com 
// Components from tronixlabs.com

#define red 3
#define green 9
#define blue 10
#define delaya 2

void setup() 
{
  pinMode(red, OUTPUT);
  pinMode(green, OUTPUT);
  pinMode(blue, OUTPUT);
}

void blinkRGB()
{
  digitalWrite(red, HIGH);
  delay(1000);
  digitalWrite(red, LOW);
  digitalWrite(green, HIGH);
  delay(1000);
  digitalWrite(green, LOW);
  digitalWrite(blue, HIGH);
  delay(1000);
  digitalWrite(blue, LOW);
}

void pulseRed()
{
  for (int i=0; i<256; i++)
  {
    analogWrite(red,i);
    delay(delaya);
  }
  for (int i=255; i>=0; --i)
  {
    analogWrite(red,i);
    delay(delaya);
  }
}

void pulseGreen()
{
  for (int i=0; i<256; i++)
  {
    analogWrite(green,i);
    delay(delaya);
  }
  for (int i=255; i>=0; --i)
  {
    analogWrite(green,i);
    delay(delaya);
  }
}

void pulseBlue()
{
  for (int i=0; i<256; i++)
  {
    analogWrite(blue,i);
    delay(delaya);
  }
  for (int i=255; i>=0; --i)
  {
    analogWrite(blue,i);
    delay(delaya);
  }
}

void loop()
{
  pulseRed();
  pulseGreen();
  pulseBlue();
}

Success. And for the non-believers, watch the following video:

Better LED control

As always, there’s a better way of doing things and one example of LED control is the awesome FASTLED library by Daniel Garcia and others. Go and download it now – https://github.com/FastLED/FastLED. Apart from our simple LEDS, the FASTLED library is also great with WS2812B/Adafruit NeoPixels and others.

One excellent demonstration included with the library is the AnalogOutput sketch, which I have supplied below to work with our example hardware:

#include <FastLED.h>

// Example showing how to use FastLED color functions
// even when you're NOT using a "pixel-addressible" smart LED strip.
//
// This example is designed to control an "analog" RGB LED strip
// (or a single RGB LED) being driven by Arduino PWM output pins.
// So this code never calls FastLED.addLEDs() or FastLED.show().
//
// This example illustrates one way you can use just the portions 
// of FastLED that you need.  In this case, this code uses just the
// fast HSV color conversion code.
// 
// In this example, the RGB values are output on three separate
// 'analog' PWM pins, one for red, one for green, and one for blue.
 
#define REDPIN   3
#define GREENPIN 9
#define BLUEPIN  10

// showAnalogRGB: this is like FastLED.show(), but outputs on 
// analog PWM output pins instead of sending data to an intelligent,
// pixel-addressable LED strip.
// 
// This function takes the incoming RGB values and outputs the values
// on three analog PWM output pins to the r, g, and b values respectively.
void showAnalogRGB( const CRGB& rgb)
{
  analogWrite(REDPIN,   rgb.r );
  analogWrite(GREENPIN, rgb.g );
  analogWrite(BLUEPIN,  rgb.b );
}



// colorBars: flashes Red, then Green, then Blue, then Black.
// Helpful for diagnosing if you've mis-wired which is which.
void colorBars()
{
  showAnalogRGB( CRGB::Red );   delay(500);
  showAnalogRGB( CRGB::Green ); delay(500);
  showAnalogRGB( CRGB::Blue );  delay(500);
  showAnalogRGB( CRGB::Black ); delay(500);
}

void loop() 
{
  static uint8_t hue;
  hue = hue + 1;
  // Use FastLED automatic HSV->RGB conversion
  showAnalogRGB( CHSV( hue, 255, 255) );
  
  delay(20);
}


void setup() {
  pinMode(REDPIN,   OUTPUT);
  pinMode(GREENPIN, OUTPUT);
  pinMode(BLUEPIN,  OUTPUT);

  // Flash the "hello" color sequence: R, G, B, black.
  colorBars();
}

You can see this in action through the following video:

Control using a mobile phone?

Yes – click here to learn how.

Conclusion

So if you have some IKEA LED strips, or anything else that requires more current than an Arduino’s output pin can offer – you can use MOSFETs to take over the current control and have fun. And finally a plug for my own store – tronixlabs.com – offering a growing range and Australia’s best value for supported hobbyist electronics from adafruit, DFRobot, Freetronics, Seeed Studio and much much more.

As always, have fun and keep checking into tronixstuff.com. Why not follow things on twitterGoogle+, subscribe  for email updates or RSS using the links on the right-hand column, or join our forum – dedicated to the projects and related items on this website.

Experimenting with Arduino and IKEA DIODER LED Strips

Introduction

A few weeks ago I found a DIODER LED strip set from a long-ago trek to IKEA, and considered that something could be done with it.  So in this article you can see how easy it is to control the LEDs using an Arduino or compatible board with ease… opening it up to all sorts of possibilities.

This is not the most original project – however things have been pretty quiet around here, so I thought it was time to share something new with you. Furthermore the DIODER control PCB has changed, so this will be relevant to new purchases. Nevertheless, let’s get on with it.

So what is DIODER anyhow? 

As you can see in the image below, the DIODER pack includes four RGB LED units each with nine RGB LEDs per unit. A controller box allows power and colour choice, a distribution box connects between the controller box and the LED strips, and the whole thing is powered by a 12V DC plugpack:

The following is a quick video showing the DIODER in action as devised by IKEA:

 

Thankfully the plugpack keeps us away from mains voltages, and includes a long detachable cable which connects to the LED strip distribution box. The first thought was to investigate the controller, and you can open it with a standard screwdriver. Carefully pry away the long-side, as two clips on each side hold it together…


… which reveals the PCB. Nothing too exciting here – you can see the potentiometer used for changing the lighting effects, power and range buttons and so on:

Our DIODER has the updated PCB with the Chinese market microcontroller. If you have an older DIODER with a Microchip PIC – you can reprogram it yourself.

The following three MOSFETs are used to control the current to each of the red, green and blue LED circuits. These will be the key to controlling the DIODER’s strips – but are way too small for me to solder to. The original plan was to have an Arduino’s PWM outputs tap into the MOSFET’s gates – but instead I will use external MOSFETs.

So what’s a MOSFET?

In the past you may have used a transistor to switch higher current from an Arduino, however a MOSFET is a better solution for this function. The can control large voltages and high currents without any effort. We will use N-channel MOSFETs, which have three pins – Source, Drain and Gate. When the Gate is HIGH, current will flow into the Drain and out of the Gate:

A simplistic explanation is that it can be used like a button – and when wiring your own N-MOSFET a 10k resistor should be used between Gate and Drain to keep the Gate low when the Arduino output is set to LOW (just like de-bouncing a button). To learn more about MOSFETS – get yourself a copy of “The Art of Electronics“. It is worth every cent.

However being somewhat time poor (lazy?), I have instead used a Freetronics NDrive Shield for Arduino – which contains six N-MOSFETs all on one convenient shield  – with each MOSFET’s Gate pin connected to an Arduino PWM output.

So let’s head back to the LED strips for a moment, in order to determine how the LEDs are wired in the strip. Thanks to the manufacturer – the PCB has the markings as shown below:

They’re 12V LEDs in a common-anode configuration. How much current do they draw? Depends on how many strips you have connected together…

For the curious I measured each colour at each length, with the results in the following table:

So all four strips turned on, with all colours on – the strips will draw around 165 mA of current at 12V. Those blue LEDs are certainly thirsty.

Moving on, the next step is to connect the strips to the MOSFET shield. This is easy thanks to the cable included in the DIODER pack, just chop the white connector off as shown below:

By connecting an LED strip to the other end of the cable you can then determine which wire is common, and which are the cathodes for red, green and blue.

The plugpack included with the DIODER pack can be used to power the entire project, so you will need cut the DC plug (the plug that connects into the DIODER’s distribution box) off the lead, and use a multimeter to determine which wire is negative, and which is positive.

Connect the negative wire to the GND terminal on the shield, and the positive wire to the Vin terminal.  Then…

  • the red LED wire to the D3 terminal,
  • the green LED wire to the D9 terminal,
  • and the blue LED wire to the D10 terminal.

Finally, connect the 12V LED wire (anode) into the Vin terminal. Now double-check your wiring. Then check it again.

Testing

Now to run a test sketch to show the LED strip can easily be controlled. We’ll turn each colour on and off using PWM (Pulse-Width Modulation) – a neat way to control the brightness of each colour. The following sketch will pulse each colour in turn, and there’s also a blink function you can use.

// Controlling IKEA DIODER LED strips with Arduino and Freetronics NDRIVE N-MOSFET shield
// CC by-sa-nc John Boxall 2015 - tronixstuff.com 
// Components from tronixlabs.com

#define red 3
#define green 9
#define blue 10
#define delaya 2

void setup() 
{
  pinMode(red, OUTPUT);
  pinMode(green, OUTPUT);
  pinMode(blue, OUTPUT);
}

void blinkRGB()
{
  digitalWrite(red, HIGH);
  delay(1000);
  digitalWrite(red, LOW);
  digitalWrite(green, HIGH);
  delay(1000);
  digitalWrite(green, LOW);
  digitalWrite(blue, HIGH);
  delay(1000);
  digitalWrite(blue, LOW);
}

void pulseRed()
{
  for (int i=0; i<256; i++)
  {
    analogWrite(red,i);
    delay(delaya);
  }
  for (int i=255; i>=0; --i)
  {
    analogWrite(red,i);
    delay(delaya);
  }
}

void pulseGreen()
{
  for (int i=0; i<256; i++)
  {
    analogWrite(green,i);
    delay(delaya);
  }
  for (int i=255; i>=0; --i)
  {
    analogWrite(green,i);
    delay(delaya);
  }
}

void pulseBlue()
{
  for (int i=0; i<256; i++)
  {
    analogWrite(blue,i);
    delay(delaya);
  }
  for (int i=255; i>=0; --i)
  {
    analogWrite(blue,i);
    delay(delaya);
  }
}

void loop()
{
  pulseRed();
  pulseGreen();
  pulseBlue();
}

Success. And for the non-believers, watch the following video:

Better LED control

As always, there’s a better way of doing things and one example of LED control is the awesome FASTLED library by Daniel Garcia and others. Go and download it now – https://github.com/FastLED/FastLED. Apart from our simple LEDS, the FASTLED library is also great with WS2812B/Adafruit NeoPixels and others.

One excellent demonstration included with the library is the AnalogOutput sketch, which I have supplied below to work with our example hardware:

#include <FastLED.h>

// Example showing how to use FastLED color functions
// even when you're NOT using a "pixel-addressible" smart LED strip.
//
// This example is designed to control an "analog" RGB LED strip
// (or a single RGB LED) being driven by Arduino PWM output pins.
// So this code never calls FastLED.addLEDs() or FastLED.show().
//
// This example illustrates one way you can use just the portions 
// of FastLED that you need.  In this case, this code uses just the
// fast HSV color conversion code.
// 
// In this example, the RGB values are output on three separate
// 'analog' PWM pins, one for red, one for green, and one for blue.
 
#define REDPIN   3
#define GREENPIN 9
#define BLUEPIN  10

// showAnalogRGB: this is like FastLED.show(), but outputs on 
// analog PWM output pins instead of sending data to an intelligent,
// pixel-addressable LED strip.
// 
// This function takes the incoming RGB values and outputs the values
// on three analog PWM output pins to the r, g, and b values respectively.
void showAnalogRGB( const CRGB& rgb)
{
  analogWrite(REDPIN,   rgb.r );
  analogWrite(GREENPIN, rgb.g );
  analogWrite(BLUEPIN,  rgb.b );
}



// colorBars: flashes Red, then Green, then Blue, then Black.
// Helpful for diagnosing if you've mis-wired which is which.
void colorBars()
{
  showAnalogRGB( CRGB::Red );   delay(500);
  showAnalogRGB( CRGB::Green ); delay(500);
  showAnalogRGB( CRGB::Blue );  delay(500);
  showAnalogRGB( CRGB::Black ); delay(500);
}

void loop() 
{
  static uint8_t hue;
  hue = hue + 1;
  // Use FastLED automatic HSV->RGB conversion
  showAnalogRGB( CHSV( hue, 255, 255) );
  
  delay(20);
}


void setup() {
  pinMode(REDPIN,   OUTPUT);
  pinMode(GREENPIN, OUTPUT);
  pinMode(BLUEPIN,  OUTPUT);

  // Flash the "hello" color sequence: R, G, B, black.
  colorBars();
}

You can see this in action through the following video:

Conclusion

So if you have some IKEA LED strips, or anything else that requires more current than an Arduino’s output pin can offer – you can use MOSFETs to take over the current control and have fun. And finally a plug for my own store – tronixlabs.com – offering a growing range and Australia’s best value for supported hobbyist electronics from adafruit, DFRobot, Freetronics, Seeed Studio and much much more.

As always, have fun and keep checking into tronixstuff.com. Why not follow things on twitterGoogle+, subscribe  for email updates or RSS using the links on the right-hand column, or join our forum – dedicated to the projects and related items on this website.

The post Experimenting with Arduino and IKEA DIODER LED Strips appeared first on tronixstuff.

Australian Electronics Nostalgia – Talking Electronics Kits

Introduction

From 1981, Australian electrical engineer Colin Mitchell started publishing his home-grown electronics magazine “Talking Electronics”. His goal was to get people interested and learning about electronics, and more so with a focus on digital electronics. It was (and still is) a lofty goal – in which he succeeded. From a couple of rooms in his home the magazine flourished, and many projects described within were sold as kits. At one stage there were over 150 Talking Electronics kits on the market. You could find the books and kits in retail outlets such as Dick Smith Electronics, and for a short while there was a TE store in Moorabbin (Victoria). Colin and the team’s style of writing was easy to read and very understandable – but don’t take my word for it, you can download the magazines from his website (they’re near the bottom of the left column). Dave Jones recently interviewed Colin, and you can watch those for much more background information.

Over fifteen issues you could learn about blinking LEDs all the way to making your own expandable Z80 board computer, and some of the kits may still be available. Colin also published a series of tutorial books on electronics, and also single-magazine projects. And thus the subjects of our review … we came across the first of these single-issue projects from 1981 – the Mini Frequency Counter (then afterwards we have another kit):

How great is that? The PCB comes with the magazine. This is what set TE apart from the rest, and helped people learn by actually making it easy to build what was described in the magazine instead of just reading about it. For 1981 the PCB was quite good – they were silk-screened which was quite rare at the time:

And if you weren’t quite ready, the magazine also included details of a square-wave oscillator to make and a 52-page short course in digital electronics. However back to the kit…

Assembly

The kit uses common parts and I hoard CMOS ICs so building wasn’t a problem. This (original) version of the kit used LEDs instead of 7-segment displays (which were expensive at the time) so there was plenty of  careful soldering to do:

And after a while the counter started to come together. I used IC sockets just in case:

The rest was straight-forward, and before long 9 V was supplied, and we found success:

To be honest progress floundered for about an hour at this point – the display wouldn’t budge off zero. After checking the multi-vibrator output, calibrating the RC circuits and finally tracing out the circuit with a continuity tester, it turned out one of the links just wasn’t soldered in far enough – and the IC socket for the 4047 was broken So a new link and directly fitting the 4047 fixed it. You live and learn.

Operation

So – we now have a frequency counter that’s good for 100 Hz to the megahertz range, with a minimum of parts. Younger, non-microcontroller people may wonder how that is possible – so here’s the schematic:

The counter works by using a multi-vibrator using a CD4047 to generate a square-wave at 50, 500 and 5 kHz, and the three trimpots are adjusted to calibrate the output. The incoming pulses to measure are fed to the 4026 decade counter/divider ICs. Three of these operate in tandem and each divide the incoming count by ten – and display or reset by the alternating signal from the 4047. However for larger frequencies (above 900 Hz) you need to change the frequency fed to the display circuit in order to display the higher (left-most) digits of the result. A jumper wire is used to select the required level (however if you mounted the kit in a case, a knob or switch could be used).

For example, if you’re measuring 3.456 MHz you start with the jumper on H and the display reads 345 – then you switch to M to read 456 – then you switch to the L jumper and read 560, giving you 3456000 Hz. If desired, you can extend the kit with another PCB to create a 5-digit display. The counter won’t be winning any precision contests – however it has two purposes, which are fulfilled very well. It gives the reader an inexpensive piece of test equipment that works reasonably well, and a fully-documented project so the reader can understand how it works (and more).

And for the curious –  here it is in action:

[Update 20/07/2013] Siren Kit

Found another kit last week, the Talking Electronics “DIY Kit #31 – 9V siren”. It’s an effective and loud siren with true rise and fall, unlike other kits of the era that alternated between two fixed tones. The packaging was quite strong and idea for mail-order at the time:

The label sells the product (and shows the age):

The kit included every part required to work, apart from a PP3 battery, and a single instruction sheet with a good explanation of how the circuit works, and some data about the LM358:

… and as usual the PCB was ahead of its’ time with full silk-screen and solder mask:

Assembly was quite straight-forward. The design is quite compact, so a lot of vertical resistor mounting was necessary due to the lack of space. However it was refreshing to not have any links to fit. After around twenty minutes of relaxed construction, it was ready to test:

It’s a 1/2 watt speaker, however much louder than originally anticipated:

Once again, another complete and well-produced kit.

Conclusion

That was a lot of fun, and I’m off to make the matching square-wave oscillator for the frequency counter. Kudos to Colin for all those years of publication and helping people learn. Lots of companies bang on about offering tutorials and information on the Internet for free, but Colin has been doing it for over ten years. Check out his Talking Electronics website for a huge variety of knowledge, an excellent electronics course you can get on CD – and go easy on him if you have any questions.

Full-sized images available on flickr. This kit was purchased without notifying the supplier.

And if you made it this far – check out my new book “Arduino Workshop” from No Starch Press.

In the meanwhile have fun and keep checking into tronixstuff.com. Why not follow things on twitterGoogle+, subscribe  for email updates or RSS using the links on the right-hand column? And join our friendly Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other –  and we can all learn something.

The post Australian Electronics Nostalgia – Talking Electronics Kits appeared first on tronixstuff.