Archive | compatible

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.

It’s a solid fact that there are quite a few variations on the typical Arduino Uno-compatible board. You can get them with onboard wireless, GSM, Zigbee and more – however all with their own issues and specific purposes. But what if you wanted a board that was physically and electrically compatible with an Arduino Uno – but with much more SRAM, more EEPROM, more flash, more speed – and then some? Well that (hopefully) will be a possibility with the introduction of the “Goldilocks” board on Pozible by Phillip Stevens.

What’s Pozible?

Pozible is the Australian version of Kickstarter. However just like KS anyone with a credit card or PayPal can pledge and support projects.

What’s a Goldilocks board?

It’s a board based around the Atmel ATmega1284p microcontroller in an Arduino Uno-compatible physical board with a microSD card socket and a few extras. The use of the ‘1284p gives us the following advantages over the Arduino Uno, including:

16 kByte SRAM = 8x Uno SRAM – so that’s much more space for variables used in sketches – great for applications that use larger frame buffers such as Ethernet and image work;

Two programmable USARTS – in other words, two hardware serial ports – no mucking about with SoftwareSerial and GSM or GPS shields;

Timer 3 – the ‘1284p microcontroller has an extra 16-bit timer – timer 3, that is not present on any other ATmega microcontroller. Timer 3 does not have PWM outputs (unlike Timer 0, Timer 1, and Timer 2), and therefore is free to use as a powerful internal Tick counter, for example in a RTOS. freeRTOS has already been modified to utilise this Timer 3;

better PWM access – the 1284p brings additional 8-bit Timer 2 PWM outputs onto PD, which creates the option for 2 additional PWM options on this port. It also removes the sharing of the important 16-bit PWM pins with the SPI interface, by moving them to PD4 & PD5, thus simplifying interface assignments;

clock the board at 20 MHz – that’s an extra 4 MHz over a Uno. And the use of a through hole precision crystal (not a SMD resonator) allows the use of after market timing choices, eg 22.1184 MHz for more accurate UART timings.

What does it look like?

At the moment the board mock-up looks like this:

If funding is successful (and we hope it will be) the Goldilocks will be manufactured by the team at Freetronics. Apart from being a world-leader in Arduino-compatible hardware and systems, they’re the people behind the hardware for Ardusat and more – so we know the Goldilocks will be in good hands.

Will it really be compatible?

Yes – the Goldilocks will be shipped pre-programmed with an Arduino compatible boot-loader, and the necessary Board description files will be available to provide a 100% compatible Arduino IDE experience.

Conclusion

If you think this kind of board would be useful in your projects, you want to support a good project – or both, head over to Pozible and make your pledge. And for the record – I’ve put my money where my mouth is 🙂

Please note that I’m not involved in nor responsible for the Goldilocks project, however I’m happy to promote it as a worthwhile endeavour. 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.