Introducing the XLR8 FPGA-based Arduino Uno Clone

Introducing the XLR8 FPGA-based Arduino Uno Clone

XLR8(Accelerate)

that has the same footprint as an Arduino Uno,
but that runs like an Arduino Uno on steroids

Regular Arduino Uno

By default, the XLR8 behaves just like an Arduino, right down to its timing and 16 MHz clock. However, the XLR8’s clock frequency can be changed, and various functions — like the PWMs — can be implemented using XBs (“acceleration blocks”) inside the FPGA.

For example, the Arduino Uno doesn’t have a floating-point unit, which means it has to clunk along implementing floating-point operations using lots and lots of simple instructions. In turn, this means it executes floating-point operations verrryyy sslllooowwwlllyyy. By comparison, the XLR8 has dedicated floating-point hardware programmed directly into the FPGA’s fabric. Check out this video comparing an Arduino Uno and an XLR8 using floating-point math to generate Mandelbrot fractal images.

Using a Washer To Steady Joints While Soldering

Using a Washer To Steady Joints While Soldering

If you have “helping hands,” clamping wire leads against a washer, as shown, stabilizes the whole setup dramatically by connecting the two arms with a rigid member, so you can bear down a bit more with the iron without pushing things out of alignment. But the hole in the middle of the washer still allows all-round access to the junction.

If you don’t have helping hands, you can just use a washer, as shown, with a pair of alligator clips (or even small binder clips) as a pretty effective improvised workholding jig for this kind of soldering.

using-a-washer-to-stabilize-soldering

Joining wires, The NASA way

Joining wires, The NASA way

Joining wires

Some commenters on my post about using a washer as a soldering aid noticed my sloppy splicing technique and were kind enough to educate me about the so-called “Western Union splice,” aka the “Lineman’s splice,” which is the preferred method for twisting solid-core wire leads together for inline electrical connections.

Developed during the heydey of the telegraph, the Lineman’s splice is designed for joining wires that will be under tension. It is commonly claimed that, properly made, a Lineman’s splice is stronger than the wires of which it is composed. In any case, it is a time-proven method, and, coolest of all, one of NASA’s Required Workmanship Standards. To wit, in a NASA-approved Lineman’s splice:

  1. The conductors shall be pre-tinned.
  2. There shall be at least 3 turns around each conductor and the wraps shall be tight with no gaps between adjacent turns.
  3. The wraps shall not overlap and the ends of the wrap shall be trimmed flush prior to soldering to prevent protruding ends.
  4. Conductors shall not overlap the insulation of the other wire.

Though the Lineman’s splice was originally used without solder, today soldering is common. And NASA insists on it:

  1. Solder shall wet all elements of the connection.
  2. The solder shall fillet between connection elements over the complete periphery
    of the connection.

This material comes from page 84 of NASA-STD 8739.4 (PDF), which is a great reference if you’re interested in best practices for interconnecting cables and wires.

Pulling Larger Loads with Arduino Mosfet

Pulling Larger Loads with Arduino Mosfet

Arduino Mosfet layout

If you are anything like me, this simply is not enough!

No, you want to use this on your next Arduino project, but these LED’s need lots of power.

The Arduino only supplies 5V and even if it’s a large 5V device the maximum current per I/O pin is 40mA, a normal red LED is already 20mA, so you can see that the Arduino can’t power much larger devices without cause trouble to some extent, but there is a solution to this problem, that doesn’t put unnecessary strain on the Arduino. No, it’s not a relay, because a relay is either on or off and we might want to dim our power LEDs. And then there’s the clicking noise produced from relays as well. I’m talking about Mosfets. Arduino Mosfet circuits are easy and quite cheap to build.

I used the IRL520N N-channel logic Mosfet which is suitable for PWM’s as well. If it isn’t a logic Mosfet the Arduino will not be able to open it fully because a normal Mosfet requires more than 5V to open fully and you will not be able to supply the full 12V to the LED.

A logic Mosfet will supply the full input voltage to the device or component you want to drive from your Arduino. An Arduino Mosfet circuit can be created with nonlogic Mosfets but an additional transistor will be required to drive the gate.

The IRL520N can handle up to a 100V and 10A. It is DC device and will be able to drive most high load devices with ease.

 

The Multi-function shield for Arduino

The Multi-function shield for Arduino

Arduino Multi-function shield

This Arduino Uno and Leonardo compatible multifunction experimenter shield (HCARDU0085) has a large range of features which makes it ideal for beginners who just want to experiment and learn, or just as a general purpose shield for more advanced uses. Besides the feature rich range of components fitted to the shield, there are also a range of expansion headers for convenient interfacing of external modules and components. The shield includes R3 type headers for easy connection to your Arduino board. If you have a pre R3 design board please check for compatibility before purchase.

Please note: Before applying power to your Arduino board check that other than the header pins, no part of the underside of this shield is in contact with the host board. This shield includes a header for attaching an IR reciver (U4-IR-2). The pinout order is not suitable for direcly connecting a SFH506-38. However the order is compatible with our 1838B Infrared IR receiver (HCSENS0014). Please always check the attached schematic before connecting external components.

The Multi-function shield is a compact experimenting shield packed with features.

Some of Arduino Multi-function shield features include:

4 digit 7-segment LED display module driven by two serial 74HC595’s
4 x surface mount LED’s in a parallel configuration
10K adjustable precision potentiometer
3 x Independent push buttons
Piezo buzzer
DS18B20 temperature sensor interface
LM35 temperature sensor interface
Infrared receiver interface
Serial interface header for convenient connection to serial modules such as Bluetooth, wireless interface

We found this on Youtube

Clock Sketch

#include
#include
#include

/*
button 1 : hold to set time or alarm
button 2 : press to view alarm time or cancel alarm if in progress
button 3 : increment hour / minute when setting (alarm) time. Hold to toggle alarm setting.

LED1 : on = alarm enabled
*/

volatile unsigned int clockMilliSeconds = 0;
volatile byte clockSeconds = 0;
volatile byte clockMinutes = 0;
volatile byte clockHours = 12;
volatile byte clockEnabled = 1;

byte alarmMinutes = 30;
byte alarmHours = 6;
volatile byte alarmEnabled = false;

byte alarmTogglePressed = false;

enum displayModeValues
{
MODE_CLOCK_TIME,
MODE_CLOCK_TIME_SET_HOUR,
MODE_CLOCK_TIME_SET_MINUTE,
MODE_ALARM_TIME,
MODE_ALARM_TIME_SET_HOUR,
MODE_ALARM_TIME_SET_MINUTE
};

byte displayMode = MODE_CLOCK_TIME;

//——————————————————————————-
void setup()
{
Timer1.initialize();
MFS.userInterrupt = clockISR;
MFS.initialize(&Timer1);

MFS.blinkDisplay(DIGIT_ALL);
//MFS.beep(500);
}

void loop()
{
// put your main code here, to run repeatedly:

byte btn = MFS.getButton();

switch (displayMode)
{
case MODE_CLOCK_TIME:
displayTime(clockHours, clockMinutes);

if (btn == BUTTON_2_PRESSED)
{
MFS.beep(0); // cancel the alarm.
displayMode = MODE_ALARM_TIME;
}
else if (btn == BUTTON_1_LONG_PRESSED)
{
MFS.blinkDisplay(DIGIT_ALL, OFF);
MFS.blinkDisplay(DIGIT_1 | DIGIT_2);
displayMode = MODE_CLOCK_TIME_SET_HOUR;
clockEnabled = false;
clockMilliSeconds = 0;
clockSeconds = 0;
}
else if (btn == BUTTON_3_LONG_PRESSED && !alarmTogglePressed)
{
alarmTogglePressed = true;
alarmEnabled = !alarmEnabled;
MFS.writeLeds(LED_1, alarmEnabled);
}
else if (btn == BUTTON_3_LONG_RELEASE)
{
alarmTogglePressed = false;
}
break;

case MODE_CLOCK_TIME_SET_HOUR:
if (btn == BUTTON_1_PRESSED)
{
MFS.blinkDisplay(DIGIT_1 | DIGIT_2, OFF);
MFS.blinkDisplay(DIGIT_3 | DIGIT_4);
displayMode = MODE_CLOCK_TIME_SET_MINUTE;
}
else if (btn == BUTTON_3_PRESSED || btn == BUTTON_3_LONG_PRESSED)
{
clockHours++;
if (clockHours >= 24)
{
clockHours = 0;
}
displayTime(clockHours, clockMinutes);
}
break;

case MODE_CLOCK_TIME_SET_MINUTE:
if (btn == BUTTON_1_PRESSED)
{
MFS.blinkDisplay(DIGIT_3 | DIGIT_4, OFF);
displayMode = MODE_CLOCK_TIME;
clockEnabled = true;
}
else if (btn == BUTTON_3_PRESSED || btn == BUTTON_3_LONG_PRESSED)
{
clockMinutes++;
if (clockMinutes >= 60)
{
clockMinutes = 0;
}
displayTime(clockHours, clockMinutes);
}
break;

case MODE_ALARM_TIME:
displayTime(alarmHours, alarmMinutes);

if (btn == BUTTON_2_SHORT_RELEASE || btn == BUTTON_2_LONG_RELEASE)
{
displayMode = MODE_CLOCK_TIME;
}
else if (btn == BUTTON_1_LONG_PRESSED)
{
MFS.blinkDisplay(DIGIT_ALL, OFF);
MFS.blinkDisplay(DIGIT_1 | DIGIT_2);
displayMode = MODE_ALARM_TIME_SET_HOUR;
alarmEnabled = false;
}
break;

case MODE_ALARM_TIME_SET_HOUR:
if (btn == BUTTON_1_PRESSED)
{
MFS.blinkDisplay(DIGIT_1 | DIGIT_2, OFF);
MFS.blinkDisplay(DIGIT_3 | DIGIT_4);
displayMode = MODE_ALARM_TIME_SET_MINUTE;
}
else if (btn == BUTTON_3_PRESSED || btn == BUTTON_3_LONG_PRESSED)
{
alarmHours++;
if (alarmHours >= 24)
{
alarmHours = 0;
}
displayTime(alarmHours, alarmMinutes);
}
break;

case MODE_ALARM_TIME_SET_MINUTE:
if (btn == BUTTON_1_PRESSED)
{
MFS.blinkDisplay(DIGIT_3 | DIGIT_4, OFF);
displayMode = MODE_CLOCK_TIME;
alarmEnabled = true;
MFS.writeLeds(LED_1, ON);
}
else if (btn == BUTTON_3_PRESSED || btn == BUTTON_3_LONG_PRESSED)
{
alarmMinutes++;
if (alarmMinutes >= 60)
{
alarmMinutes = 0;
}
displayTime(alarmHours, alarmMinutes);
}
break;
}
}

void displayTime (byte hours, byte minutes)
{
char time[5];

sprintf(time, “%03d”, (hours * 100) + minutes);
MFS.write(time, 1);
}

//——————————————————————————–
void clockISR ()
{
// Perform ripple count for all time components.
if (clockEnabled)
{
clockMilliSeconds++;
if (clockMilliSeconds >= 1000)
{
clockMilliSeconds = 0;

clockSeconds++;
if (clockSeconds >= 60)
{
clockSeconds = 0;

clockMinutes++;
if (clockMinutes >= 60)
{
clockMinutes = 0;

clockHours++;
if (clockHours >= 24)
{
clockHours = 0;
}
}

// If current time coincides with alarm time, and alarm is enabled, engage the alarm.
if (alarmEnabled && (clockMinutes == alarmMinutes) && (clockHours == alarmHours))
{
MFS.beep(
10, // on period
5, // off period
4, // number of cycles
100, // number of loop cycles
50 // delay between loop cycles
);
}
}
}
}
}