Introduction: Getting Started With Dexter
Dexter board is an educational trainer kit that makes learning
electronics fun and easy. The board brings together all the necessary parts a beginner requires to change an idea to a successful prototype. With Arduino at its heart, a huge number of open source projects can be easily implemented directly on this board. Interactive features like on board LCD display, switches, motor drivers and LED's' help make development faster and debugging easier. Together with I2C and SPI pin outs, we have also integrated wireless protocols like Bluetooth on the board itself. This opens a whole spectrum of ideas to build creative IoT projects. Most importantly all these features are implemented on a single board thus all your projects are now portable, mobile and wireless. Dexter Board can be used in wide variety of applications for training and development in domains such as embedded systems, robotics, practical electronics education, electronic hardware development and more...
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Install Programming Environment in Your PC
We use Arduino IDE to program our Dexter Board. You can download Arduino IDE from the following link for your operating system https://www.arduino.cc/en/main/software
Step 2: Install Serial Driver CH340g
Now we need to install a serial driver in order to program your Dexter Board with Arduino. If you already have this CH340G driver then no need to install the driver. No need to install this driver if you use windows 10 operating system else please visit https://www.arduined.eu/tag/ch340g and follow the instructions.
Step 3: LED Blink
Now we have everything to start your exciting journey in the world of electronics
We will start with a Blink program
Now start your Arduino application
Go to File-->Examples-->Basics-->Blink
Now your program will open, in that you can see two functions setup () and loop ()
In setup function we initialize our parameters
loop is a function which will run continuously that is every time your code ends it will start from the beginning.
So here in setup pin mode is defined. A digital pin can either be used as an output or an input. Here it is output. LED_BUILTIN is pin 13, here led is connected in the board itself. Here we use that LED. You can use any other pin, connect a LED to that pin with a 330 ohm resistor. Then you have to use that pin here. Suppose if you are using pin 6 then it is like,
In the loop as we said we write the program to be repeated. Here we need to first turn on and then off the led.
So first we set the digital pin to HIGH using
Then we put one second delay, after that write LOW
Then put a delay of one second again
Now we can compile and run our first program.
Step 4: Compiling and Running
Here compile and upload buttons are marked.
First we compile our program, you can see your progress in
the task bar below after compilation is done we have to then upload the program to your Dexter.
Before uploading the program you have to select the board and port which you have to upload the program.
First to select the board, we use Atmega 328p so we can select Arduino/Genuino UNO as our board since both uses Atmega 328p. To select the board
Go to Tools-->Board-->Arduino/Genuino UNO
which is showed in the picture above
Now we have to select the port. For that go to Tools-->Port-->Select your port
Here in my case it is COM6
we are ready to upload the program. Press the upload button and you can see the progress in the task bar below. After uploading you could see the Led 13 in Dexter board is blinking.
Contrasts!!!! You have completed your first Dexter program.
Let’s do another program
Step 5: Multiple LED on Board
We have four more LED in our Dexter board, let’s turn them on consecutively with a one second delay.
First we need to identify which all digital pins are connected to the led, So let’s take a look at the pinout given above.
Here LED connected to a switch so we have to use the switch pins that is
These are the digital output pins
Now let’s write the program
As said earlier configure the pins as outputs using pinMode. Then let’s turn led’s with a delay of one second in between. After that turn off all the leds.
You have now completed your program now let’s compile and upload the program. After uploading the program you can observe the output. Please make sure that s1-s4 switches are in the ON state.
Try to write the program yourself and if you need then refer the given program. Always try to write your own
Now you have finished two exercises.
Now you can try this yourself. Try turning ON L1 and L3 together L2 and L4 off for one second then L2 and L4 on and L1 and L3 in the off state.
Step 6: Switch
Now we can try to use the switches given in the Dexter board.
There are three switches given in Dexter SW1, SW2, and SW3 you can check the pin out to find which pins are connected to these switches.
Here I will use SW2 to turn on the L1.
Here the switches are push button switches so when you press the switch the pin connected to switch will read Zero since the switch is connected to ground.
So we have to read for LOW from the digital pin.
Another important thing to remember here is when you define the pin as an input pin you have to do an internal pull up on the pin. The reason we do this is the pin is in a floating state so and we press its goes to a LOW state. So we put HIGH on the internally. You want to know more search about it.
So now you can go through the program and try to understand it. Hints are given as comments
Now compile and upload the code and check the output.
Try yourself to write a program that switches off the LED when the switch is pressed.
Step 7: Serial Monitor
We can write to and also read from Serial monitor.
First we can try writing “Hello World” to serial monitor.
For that we have to initialize the Serial monitor using
Here 9600 is baud rate different baud rates are 4800, 9600, 15200 etc. Here we use 9600, you can use any baud rates but have to make sure you use the same in the serial monitor also.
We have 3 methods to write to serial monitor. That are
Write and print are the same that will just print whatever in the braces, where println will print a newline character in the end. That is whatever we print after that will be in a new line.
Now we can also enter values from serial monitor to Dexter. We can read that using Serial.read() command.
Serial.available() gives the number of bytes that are available to read. Serial.read() only reads one bit at a time so we have to use a loop if more than one byte is available. In this example program we read from the serial monitor and then print it to the serial monitor.
Step 8: Liquid Crystal Display
Now let’s explore the possibilities of LCD on the dexter
Let’s use examples given in Arduino IDE to explore the dexter board
Now go to File-->Examples-->Liquidcrystal-->HelloWorld
So now you have to replace the program with the correct pin numbers. So check the pin out and put the correct pin numbers in the program.
Now in the program we have to import the Liquidcrystal library. In this case it is already with the Arduino ide, in some other cases we need to download/create our library and add that to our program. We will see that later in our examples. Now in setup and we initialized the lcd with lcd.begin(16,2) since it is an 16 X 2 type lcd. Now we print hello world. In loop we print how many seconds after reset.
Two classes that we use here is setCursor() and millis(). setCursor() is used to set the cursor in where we wants to print. Here it is (0, 1) means 1st column and 2nd row. Column number is given first.
Millis is function that returns time in milliseconds from the start.
Now use your knowledge in serial monitor communication read data from the serial monitor and print it to the LCD.
Step 9: Buzzer
Dexter comes with an on board buzzer. Look into the pin diagram and identify the pin which is connected to the buzzer. Like above here also the buzzer is an output, so we configure it as an output. Then we will turn the buzzer on for one second then one second off just like the led blink program.
Now compile and upload your program and observe the result. Now write a program to buzzer only when the switch is pressed. If you find any problems check the LED with switch program and try again.
Step 10: Motor Drive L293D
The L293D is a 16-pin Motor Driver IC which can control a set of two DC motors simultaneously in any direction. The L293D is designed to provide bidirectional drive currents of up to 600 mA (per channel) at voltages from 4.5 V to 36 V (at pin 8!). You can use it to control small dc motors - toy motors. Sometimes it can be extremely hot.
Step 11: Concept
It works on the concept of H-bridge. H-bridge is a circuit which allows the voltage to be flown in either direction. As you know voltage need to change its direction for being able to rotate the motor in clockwise or anticlockwise direction, hence H-bridge IC are ideal for driving a DC motor.
In a single L293D chip there are two h-Bridge circuit inside the IC which can rotate two dc motor independently. Due its size it is very much used in robotic application for controlling DC motors. Given below is the pin diagram of a L293D motor controller.
There are two Enable pins on l293d. Pin 1 and pin 9, for being able to drive the motor, the pin 1 and 9 need to be high. For driving the motor with left H-bridge you need to enable pin 1 to high. And for right H-Bridge you need to make the pin 9 to high. If anyone of the either pin1 or pin9 goes low then the motor in the corresponding section will suspend working. It’s like a switch.
Step 12: H-Bridges – the Basics
In general an H-bridge is a rather simple circuit, containing four switching element, with the load at the center, in an H-like configuration:
The top-end of the bridge is connected
to a power supply (battery for example) and the bottom-end is grounded.
In general all four switching elements can be turned on and off independently, though there are some obvious restrictions.
Though the load can in theory be anything you want, by far the most pervasive application if H-bridges is with a brushed DC or bipolar stepper motor (steppers need two H-bridges per motor) load. In the following I will concentrate on applications as a brushed DC motor driver
The basic operating mode of an H-bridge is fairly simple: if Q1 and Q4 are turned on, the left lead of the motor will be connected to the power supply, while the right lead is connected to ground. Current starts flowing through the motor which energizes the motor in (let’s say) the forward direction and the motor shaft starts spinning.
If Q2 and Q3 are turned on, the reverse will happen, the motor gets energized in the reverse direction, and the shaft will start spinning backwards.
In a bridge, you should never ever close both Q1 and Q2 (or
Q3 and Q4) at the same time. If you did that, you just have created a really low-resistance path between power and GND, effectively short-circuiting your power supply. This condition is called ‘shoot-through’ and is an almost guaranteed way to quickly destroy your bridge, or something else in your circuit.
Working of L293D
There are 4 input pins for l293d, pin 2, 7 on the left and pin 15, 10 on the right as shown on the pin diagram. Left input pins will regulate the rotation of motor connected across left side and right input for motor on the right hand side. The motors are rotated on the basis of the inputs provided across the input pins as LOGIC 0 or LOGIC 1.
In simple you need to provide Logic 0 or 1 across the input pins for rotating the motor.
L293D Logic Table.
Let’s consider a Motor connected on left side output pins (pin 3, 6). For rotating the motor in clockwise direction the input pins has to be provided with Logic 1 and Logic 0.
• Pin 2 = Logic 1 and Pin 7 = Logic 0 | Clockwise Direction
• Pin 2 = Logic 0 and Pin 7 = Logic 1 | Anticlockwise Direction
• Pin 2 = Logic 0 and Pin 7 = Logic 0 | Idle [No rotation] [Hi-Impedance state]
• Pin 2 = Logic 1 and Pin 7 = Logic 1 | Idle [No rotation]
Step 13: Go Get Your Dexter!!!