Tag Archive | "bird"

In this article we review the “Magpie” Arduino Uno-compatible board from Little Bird Electronics.

Introduction

We have a new board to review – the “Magpie” board from Little Bird Electronics in Australia. It seems that a new Arduino-compatible board enters the market every week, thanks to the open-source nature of the platform and the availability of rapid manufacturing. However the Magpie isn’t just any old Arduino Uno knock-off, it has something which helps it stand out from the crowd – status LEDs on every digital and analogue I/O pin. You can see them between the stacking header sockets and the silk-screen labels. For example:

and for the curious, the bottom of the Magpie:

At first glance you might think “why’d they bother doing that? I could just wire up some LEDs myself”. True. However having them on the board speeds up the debugging process as you can see when an output is HIGH or LOW – and in the case of an input pin, whether a current is present or not. For the curious the LEDs are each controlled by a 2N7002 MOSFET with the gate connected to the I/O pin, for example:

An LED will illuminate as long as the gate voltage is higher than the threshold voltage – no matter the status of the particular I/O pin. And if an I/O pin is left floating it may trigger the LED if the threshold voltage is exceeded at the gate. Therefore when using the Magpie it would be a good idea to set all the pins to LOW that aren’t required for your particular sketch. Even if you remove and reapply power the floating will still be prevalent, and indicated visually – for example:

Nevertheless you can sort that out in void setup(), and then the benefits of the LEDs become apparent. Consider the following quick demonstration sketch:

Arduino

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

// LBE Magpie board LED demo - John Boxall 18 March 2013

// usual blink delay period

intd=100;

voidsetup()

{

// digital pins to outputs

for(inta=0;a<14;a++)

{

pinMode(a,OUTPUT);

}

pinMode(A0,OUTPUT);

pinMode(A1,OUTPUT);

pinMode(A2,OUTPUT);

pinMode(A3,OUTPUT);

pinMode(A4,OUTPUT);

pinMode(A5,OUTPUT);

}

voidallOn()

// all LEDs on

{

for(inta=0;a<14;a++)

{

digitalWrite(a,HIGH);

}

digitalWrite(A0,HIGH);

digitalWrite(A1,HIGH);

digitalWrite(A2,HIGH);

digitalWrite(A3,HIGH);

digitalWrite(A4,HIGH);

digitalWrite(A5,HIGH);

}

voidallOff()

// all LEDs on

{

for(inta=0;a<14;a++)

{

digitalWrite(a,LOW);

}

digitalWrite(A0,LOW);

digitalWrite(A1,LOW);

digitalWrite(A2,LOW);

digitalWrite(A3,LOW);

digitalWrite(A4,LOW);

digitalWrite(A5,LOW);

}

voidclockWise(intr,ints)

// blinks on and off each LED clockwise

// r - # rotations, s - blink delay

{

allOff();

for(inta=0;a<r;a++)

{

for(intb=13;b>=0;--b)

{

digitalWrite(b,HIGH);

delay(s);

digitalWrite(b,LOW);

}

digitalWrite(A5,HIGH);

delay(s);

digitalWrite(A5,LOW);

digitalWrite(A4,HIGH);

delay(s);

digitalWrite(A4,LOW);

digitalWrite(A3,HIGH);

delay(s);

digitalWrite(A3,LOW);

digitalWrite(A2,HIGH);

delay(s);

digitalWrite(A2,LOW);

digitalWrite(A1,HIGH);

delay(s);

digitalWrite(A1,LOW);

digitalWrite(A0,HIGH);

delay(s);

digitalWrite(A0,LOW);

delay(s);

}

}

voidanticlockWise(intr,ints)

// blinks on and off each LED anticlockwise

// r - # rotations, s - blink delay

{

allOff();

for(inta=0;a<r;a++)

{

for(intb=0;b<14;b++)

{

digitalWrite(b,HIGH);

delay(s);

digitalWrite(b,LOW);

}

digitalWrite(A0,HIGH);

delay(s);

digitalWrite(A0,LOW);

digitalWrite(A1,HIGH);

delay(s);

digitalWrite(A1,LOW);

digitalWrite(A2,HIGH);

delay(s);

digitalWrite(A2,LOW);

digitalWrite(A3,HIGH);

delay(s);

digitalWrite(A3,LOW);

digitalWrite(A4,HIGH);

delay(s);

digitalWrite(A4,LOW);

digitalWrite(A5,HIGH);

delay(s);

digitalWrite(A5,LOW);

delay(s);

}

}

voidloop()

{

anticlockWise(3,50);

clockWise(3,50);

for(intz=0;z<4;z++)

{

allOn();

delay(100);

allOff();

delay(100);

}

}

… and the results are demonstrated in the following video:

Apart from the LEDs the Magpie offers identical function to that of an Arduino Uno R2 – except the USB microcontroller is an Atmel 16U2 instead of an 8U2, and the USB socket is a mini-USB and not the full-size type. For the curious you can download the Magpie design files from the product page.

Conclusion

Another Arduino-compatible board. Having those LEDs on the board really does save you if in a hurry to test or check something.

In the meanwhile have fun and keep checking into tronixstuff.com. Why not follow things on twitter, Google+, 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.

Time again for another kit review. In the spirit of promoting all things electronic and Australian, we’re going to look at a kit that was published in our electronics magazine Silicon Chip (March 2010) – their Low-capacitance meter adaptor for DMMs. Simply put, it converts capacitance (from a theoretical 1 picofarad) to millivolts, which you can then read with almost any digital multimeter. This is useful as even more expensive multimeters (such as my Fluke 233) only measure down to 1 nanofarad (1000 picofarads). Although this kit is available on the Australian market, the retailers will export to those abroad. If you are outside Australia and having trouble sourcing one, send me an email. Moving on…

Here is our unassuming finished product:

Please note that this is not an open-source product, so you need to either purchase the kit of parts, or a back-issue of Silicon Chipmagazine, March 2010 for the schematic and instructions. Now it is time to get started. But before that, how does it work?

Without giving too much away, a very rough explanation would be that a square wave signal is formed, then cleaned up through a Schmitt trigger-inverter. This square wave is then split into two, one signal passing through the capacitor under test and some resistors, and the other signal passing through a calibration variable capacitor and the same value resistors – thereby both signals pass through two different RC circuits. Finally the two signals are fed through a XOR gate, which creates a series of positive pulses that are a function of the capacitor under test.

Kit assembly was not that difficult, like anything just take your time, read the instructions carefully, and don’t rush things. If you are happy with your through-hole soldering skills, and have a power drill, this kit will be easy for you to work with. Unusually for some kits, this one comes with almost everything you need:

The quality of the included housing is very good, there are metal threaded inserts for the screws; and even through the ICs are simple 74xx-series, sockets have been included. Resistors are metal film, the trimpots are enclosed multiturns – all very nice. I am a little disappointed with the housing/adhesive label combination however, in the past various kits from Jaycar would have a box with a nice silk-screened, hole-punched front panel. Such is life. The PCB is solder-masked and silk-screened, however a little less denser than PCBs from other kit suppliers:

And thus brings a slight issue with the housing and the PCB – either the PCB is too wide, or the box is too narrow. A quick clip of the PCB with some cutters will fix that:

The instructions are quite good – they are a reprint of the magazine article, and slightly modified by the kit production company. Furthermore, the silk-screening on the PCB makes things a breeze. The simple passives were easy to install, however take care not to overheat the variable capacitor, their casings can melt rather quickly:

Following that, the ICs were inserted, and the rotary switch. From experience, one should trim the shaft down to about a 25mm length before soldering it into the board. Take very good care when placing the rotary switch, there is a lump on the switch which matches the small circle at 8 o’clock on the PCB diagram. Finally, don’t forget to alter the switch so it only has four selections. Soldering it in can look difficult, but is not. Just push it into the PCB, checking it is flush, even and all the way in. Then bend a couple of the pins over, invert the PCB and solder away – as such:

Now it is time to start on the enclosure. Each end has two banana-type sockets, the left are the full binding-post, and the right are just sockets. Carefully mark where you want to start the holes – the positions are vertically half-way, and horizontally 15mm in from the edge, however double-check yourself. Always check the fit of the socket while drilling, as it is easy to go too far and make the holes too large – at which point you’ll have to buy another enclosure. Once you have the sockets fitted – on the left:

and on the right:

… you will need to solder the socket rear to the PCB pins (left) and a small link to the PCB pins (right). It is important to get a good, solid connection – as these sockets may come under a lot of use later on. Next it is time to start on the housing. If you can, photocopy the label so you have a drilling template:

You will notice in the above photo one of my favourite tools, a tapered reamer. Using that, you can carefully turn a small hole into a larger hole, without risking making a mess with a drill. Again, cut the rotary switch’s shaft before soldering:

And as punishment for using twitter at the same time, I had ended up drilling the back instead of the front. D’oh. However cosmetic appearance is secondary to functionality, so all is well. Next was to install the PP3 battery snap. The battery will be a tight fit, so a length of heatshrink has been supplied in order to avoid the battery case shorting with the PCB pin:

And finally we have finished soldering:

Now it is time for calibration. And for me to get a little cranky, which is quite rare as I am somewhat easygoing. Calibration requires three 1% tolerance capacitors, 100 pF, 1000 pF and 10000 pF. And they are not included with the kit. And can not be purchased from any of the kit retailers. So they had to be ordered from Farn… element-14 at a reasonable expense. Considering the kit production company also imports, wholesales and retails electronic components, they could have bought a volume of these special capacitors and added a few dollars to the price of the kit. Such is life. So here are the little buggers:

However it is worth the effort to chase them down. There is no point using this kit if you calibrate with normal capacitors; their tolerance can be as much as 20 percent either way. Thankfully the calibration process is quite simple. You will need a small, plastic flat-blade screwdriver to make the adjustments, as your body has stray energy which can alter the capacitance measurements.

Before starting, connect your multimeter to the output sockets and set the range to millivolts – then adjust the variable capacitor until you have the meter display as close to zero as possible. This is used to ‘null out’ stray capacitance. Next, set the dial to A, connect the 100 pF capacitor to the input posts, and adjust VR3 until the meter displays one volt DC – this represents 100.0 picofarads:

I could not for the life of me get this to 1 volt. After fitting the case at the end, I tried again with the case on with the same result. It is very important to get the capacitor as close as possible to the binding posts, with such small values stray capacitance can affect the result. However in my line of work, one-tenth of a picofarad is not relevant. For now. Next, set the dial to B, connect the 1000 pF capacitor, and adjust VR2 until the meter displays 1 volt – this represents 1000 picofarads:

Excellent – spot on. Unfortunately the leads on my 10000 pF capacitor were not long enough to attach into the binding posts, so that step had to be passed. I will have to re-order the correct part next week and calibrate then. However the other two setting are basically working perfectly, which is a good indication for the general performance of the kit. Kudos to Jim Rowe from Silicon Chip magazine for this design. Before closing up the enclosure, I decided to wrap the battery with some paper, as having it rub up against other parts is not a good idea:

Now for a test run – time to measure the smallest capacitors I have in stock, first a 4.7 picofarad ceramic:

and next, a 12 picofarad ceramic:

Excellent, we can call these readings a success. I was also quite amazed that the tolerance of the cheap ceramic capacitors was so low. Note that in real-life, you may not be able to have the capacitor under test directly connected to the binding posts. In these cases you will need a short set of heavy-gauge leads to the test capacitor. If you do this, you will need to adjust the variable capacitor to reset the display to account for stray capacitance in the leads.

In conclusion, this kit has proved very successful, with regards to assembly, the quality of components and instructions, and of course the final result. I made a few errrors with regards to the housing, but that didn’t affect the final result. And for less than fifty Australian dollars, I have a very low value capacitance meter. However in due course I would consider the purchase of a full LCR meter for greater accuracy and ease of frequent use (some can measure down to 0.1 picofarad). But for the time being, this has been an excellent, educational and affordable solution. You can purchase the kit directly from Jaycar. High resolution images are available on flickr.

So have fun and keep checking into tronixstuff.com. Why not follow things on twitter, Google+, subscribe for email updates or RSS using the links on the right-hand column, or join our 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.

[Note – The kit was purchased by myself personally and reviewed without notifying the manufacturer or retailer]