Link to Eagle files on GitHub: https://github.com/ForceTronics/Bipolar_Stepper_Driver_Circuit/tree/master
The ForceTronics blog provides tutorials on creating fun and unique electronic projects. The goal of each project will be to create a foundation or jumping off point for amateur, hobbyist, and professional engineers to build on and innovate. Please use the comments section for questions and go to forcetronics.com for information on forcetronics consulting services.
Showing posts with label Eagle. Show all posts
Showing posts with label Eagle. Show all posts
Wednesday, January 31, 2018
Designing a Driver Circuit for a Bipolar Stepper Motor Part 2
In this video we design a low cost driver circuit for a four wire bipolar stepper motor using two H bridges.
Link to Eagle files on GitHub: https://github.com/ForceTronics/Bipolar_Stepper_Driver_Circuit/tree/master
Link to Eagle files on GitHub: https://github.com/ForceTronics/Bipolar_Stepper_Driver_Circuit/tree/master
Sunday, January 7, 2018
Getting Your First PCB Design Manufactured
In this video we go over how to take your PCB design from software and get it manufactured. We cover everything from PCB CAD software packages, to generating your Gerber files, and finish with understanding the different options PCB manufacturers offer.
Sunday, March 5, 2017
Reduce Noise in Your Sensor Measurements with an Active Low Pass Filter Part 2
In this three part series we look at how to design a signal conditioning circuit to increase the accuracy and resolution of your ADC measurements. The signal conditioning circuit consists of a double pole active Sallen Key Low Pass Filter and a non-inverting op amp. The filter portion is meant to attenuate high frequency noise from your sensor signal to increase measurement accuracy. The amplifier portion scales the signal up to the full range of the ADC to ensure you are getting max resolution. In part 2 we do the PCB layout of our circuit using Eagle CAD software.
You can access the Eagle files on Github at: https://github.com/ForceTronics/Sallen-Key-Low-Pass-Filter-Design/tree/master
You can access the Eagle files on Github at: https://github.com/ForceTronics/Sallen-Key-Low-Pass-Filter-Design/tree/master
Labels:
active,
ADC,
amplifier,
double pole,
Eagle,
Filter,
low pass filter,
LPF,
op amp,
parasitics,
PCB,
Sallen-Key,
schematic,
sensor,
TLV314,
Tutorial
Tuesday, March 15, 2016
Building a Wireless Sensor Network with the nRF24L01 Part 5
In Part 5 of building a wireless sensor network with Arduino and the nRF24L01+ transceiver we take a look at our brand new PCB boards and look at the code for adding the DS18S20 and the STTS751 temperature sensors to the design. You can access the PCB Eagle files and the Arduino code from GitHub: https://github.com/ForceTronics/nRF24L01_Wireless_Sensor_Dev_Board
Wednesday, January 20, 2016
Building a Wireless Sensor Network with the nRF24L01 Part 4
In part 4 of Building a Wireless Sensor Network with the nRF24L01 we take a look at the design's PCB layout in Eagle software as well as cover some software and hardware updates to the design.
You can access the updated code and PCB files from GitHub: https://github.com/ForceTronics/nRF24L01_Wireless_Sensor_Dev_Board
You can access the updated code and PCB files from GitHub: https://github.com/ForceTronics/nRF24L01_Wireless_Sensor_Dev_Board
Tuesday, October 20, 2015
Building an Arduino Shield and Proto Board for the nRF24L01 Transceiver
The nRF24L01+ Transceiver is a great low cost way to add wireless capability to any project. But the down side of the nRF24L01+ is it can be a hassle to prototype with. In this video we look at how to build an Arduino shield and a mini proto board for the nRF24L01+. You can also purchase the shield and mini proto board covered in the video at forcetronics.com.
To Access the Eagle PCB files:
To Access the Eagle PCB files:
- Shield: https://github.com/ForceTronics/nRF24L01-Shield
- Mini Proto Board:https://github.com/ForceTronics/nRF24L01-Proto-Board
//*****************************Arduino Code for Transmitter***********************
//This sketch is from a tutorial video on the ForceTronics YouTube Channel. The tutorial discusses how to build a
//shield and a prototyping board for the nRF24L01 Transceiver Module.
//the code was leverage from Ping pair example at http://tmrh20.github.io/RF24/pingpair_ack_8ino-example.html
//This sketch is free to the public to use and modify at your own risk
#include <SPI.h> //Call SPI library so you can communicate with the nRF24L01+
#include <nRF24L01.h> //nRF2401 libarary found at https://github.com/tmrh20/RF24/
#include <RF24.h> //nRF2401 libarary found at https://github.com/tmrh20/RF24/
const int pinCE = 9; //This pin is used to set the nRF24 to standby (0) or active mode (1)
const int pinCSN = 10; //This pin is used to tell the nRF24 whether the SPI communication is a command or message to send out
RF24 wirelessSPI(pinCE, pinCSN); // Create your nRF24 object or wireless SPI connection
const uint64_t pAddress = 0xB00B1E5000LL; // Radio pipe addresses for the 2 nodes to communicate.
void setup()
{
Serial.begin(57600); //start serial to communicate process
wirelessSPI.begin(); //Start the nRF24 module
wirelessSPI.setAutoAck(1); // Ensure autoACK is enabled so rec sends ack packet to let you know it got the transmit packet payload
wirelessSPI.setRetries(5,15); // Sets up retries and timing for packets that were not ack'd, current settings: smallest time between retries, max no. of retries
wirelessSPI.openWritingPipe(pAddress); // pipe address that we will communicate over, must be the same for each nRF24 module
wirelessSPI.stopListening();
}
void loop()
{
byte t = analogRead(0);//note that we can cast the ADC value to a byte because we know the temp sensor is not going to return a value higher than 255
if (!wirelessSPI.write(&t, 1 )){ //if the send fails let the user know over serial monitor
Serial.println("packet delivery failed");
}
delay(1000);
}
//*****************************Arduino Code for Receiver***********************
//This sketch is from a tutorial video on the ForceTronics YouTube Channel. The tutorial discusses how to build a
//shield and a prototyping board for the nRF24L01 Transceiver Module.
//the code was leverage from Ping pair example at http://tmrh20.github.io/RF24/pingpair_ack_8ino-example.html
//This sketch is free to the public to use and modify at your own risk
#include <SPI.h> //Call SPI library so you can communicate with the nRF24L01+
#include <nRF24L01.h> //nRF2401 libarary found at https://github.com/tmrh20/RF24/
#include <RF24.h> //nRF2401 libarary found at https://github.com/tmrh20/RF24/
const int pinCE = 9; //This pin is used to set the nRF24 to standby (0) or active mode (1)
const int pinCSN = 10; //This pin is used to tell the nRF24 whether the SPI communication is a command or message to send out
byte bVal; //used to store ADC value payload from transmit module, the ADC value will be < 256 so it will fit in a byte
RF24 wirelessSPI(pinCE, pinCSN); // Declare object from nRF24 library (Create your wireless SPI)
const uint64_t pAddress = 0xB00B1E5000LL; //Create a pipe addresses for the 2 nodes to communicate over, the "LL" is for LongLong type
void setup()
{
Serial.begin(57600); //start serial to communicate process
wirelessSPI.begin(); //Start the nRF24 module
wirelessSPI.setAutoAck(1); // Ensure autoACK is enabled, this means rec send acknowledge packet to tell xmit that it got the packet with no problems
wirelessSPI.openReadingPipe(1,pAddress); //open pipe o for recieving meassages with pipe address
wirelessSPI.startListening(); // Start listening for messages
}
void loop()
{
//loop until all of the payload data is recieved, for this example loop should only run once
while(wirelessSPI.available()){
wirelessSPI.read( &bVal, 1 ); //read one byte of data and store it in bVal variable
Serial.print("Temperature at transmitter is ");
Serial.print(calculateTempF(calculateArduinoVolt(bVal))); //convert the ADC value to a voltage value and than to a temperature value in F
Serial.println(" F");
}
delay(200);
}
//this function calculates temp in F from TMP36 temp sensor
float calculateTempF(float v1) {
float temp = 0;
//calculate temp in C, .75 volts is 25 C. 10mV per degree
if (v1 < .75) { temp = 25 - ((.75-v1)/.01); } //if below 25 C
else if (v1 == .75) {temp = 25; }
else { temp = 25 + ((v1 -.75)/.01); } //if above 25
//convert to F
temp =((temp*9)/5) + 32;
return temp;
}
//This function takes an Arduino analog pin reading and converts it to a voltage value
float calculateArduinoVolt(int val) {
float volt = (float)val * (5.0 / 1023.0); //convert ADC value to voltage
return volt;
}
Labels:
arduino,
Eagle,
electronics,
ISM band,
network,
nRF24,
nRF24L01,
PCB,
prototyping,
receiver,
shield,
transceiver,
transmitter,
Tutorial,
wireless
Tuesday, August 11, 2015
Building Your Own AVR / Arduino Internet of Things (IoT) Development Board Part 5
Welcome to the final installment of building your own AVR / Arduino compatible internet of things (IoT) development board. In part 5 we open up our new PCBs and build them up. We then do some testing to make sure everything is working correctly. Spoiler alert, this video has a happy ending with a working Arduino compatible board with Bluetooth 4.0 built-in. Below you will find a link to the Eagle files and the Arduino code for the test sketch.
Link to download Eagle files including: library file, project files, and Gerber files:
https://dl.dropboxusercontent.com/u/26591541/AVR_IoT_Board_Eagle_Files_8_8_15.zip
*******************Arduino Test Sketch************************************
//This sketch is to test a DIY Arduino compatiable board with Bluetooth 4.0 on it
//the board is targeted IoT applications. Details can be found of the ForceTronics
//YouTube channel. This code is open for anybody to use and modify
int wValue = 1; //variable to hold write value (high or low)
void setup() {
Serial.begin(115200); //start serial
}
void loop() {
delay(1000);
setPinMode(OUTPUT, INPUT); //set D2 to D7 as outputs, and D8 to D13 to inputs
setDigWrite(false, wValue); //set group of pins to write and write high or low
Serial.print("D2 thru D7 writing ");
Serial.println(wValue);
Serial.println("D8 thru D13 reading the following values....");
printDigPins(true); //print what dig pins read
delay(1000);
setPinMode(INPUT, OUTPUT); //set D2 to D7 as intputs, and D8 to D13 to outputs
setDigWrite(true, wValue); //set group of pins to write and write high or low
Serial.print("D8 thru D13 writing ");
Serial.println(wValue);
Serial.println("D2 thru D7 reading the following values....");
printDigPins(false); //print what dig pins read
delay(1000);
adcReads(); //read each ADC pin and print result
if(wValue) wValue = 0; //toggle digital write value
else wValue = 1;
delay(1000);
}
//function sets D2 thru D7 to input / output and D8 thru D13 to input / output
void setPinMode(int smallMode, int bigMode) {
for(int i=0;i<6;i++) {
pinMode((i+2), smallMode);
pinMode((i+8), bigMode);
}
}
//Writes high or low to group of digital pins
void setDigWrite(bool big, int state) {
if(big) {
for(int i=0;i<6;i++) {
digitalWrite((i+8), state);
}
}
else {
for(int i=0;i<6;i++) {
digitalWrite((i+2), state);
}
}
}
//does digital read on group of digital pins and prints results
void printDigPins(bool big) {
if(big) {
for(int i=0;i<6;i++) {
Serial.print("Value at pin D");
Serial.print((i+8));
Serial.print(" --> ");
Serial.println(digitalRead((i+8)));
}
}
else {
for(int i=0;i<6;i++) {
Serial.print("Value at pin D");
Serial.print((i+2));
Serial.print(" --> ");
Serial.println(digitalRead((i+2)));
}
}
}
//Reads each ADC pin and prints result
void adcReads() {
for(int i=0; i<6; i++) {
Serial.print("ADC value at Pin A");
Serial.print(i);
Serial.print(" --> ");
Serial.println(analogRead(i));
}
}
Link to download Eagle files including: library file, project files, and Gerber files:
https://dl.dropboxusercontent.com/u/26591541/AVR_IoT_Board_Eagle_Files_8_8_15.zip
*******************Arduino Test Sketch************************************
//This sketch is to test a DIY Arduino compatiable board with Bluetooth 4.0 on it
//the board is targeted IoT applications. Details can be found of the ForceTronics
//YouTube channel. This code is open for anybody to use and modify
int wValue = 1; //variable to hold write value (high or low)
void setup() {
Serial.begin(115200); //start serial
}
void loop() {
delay(1000);
setPinMode(OUTPUT, INPUT); //set D2 to D7 as outputs, and D8 to D13 to inputs
setDigWrite(false, wValue); //set group of pins to write and write high or low
Serial.print("D2 thru D7 writing ");
Serial.println(wValue);
Serial.println("D8 thru D13 reading the following values....");
printDigPins(true); //print what dig pins read
delay(1000);
setPinMode(INPUT, OUTPUT); //set D2 to D7 as intputs, and D8 to D13 to outputs
setDigWrite(true, wValue); //set group of pins to write and write high or low
Serial.print("D8 thru D13 writing ");
Serial.println(wValue);
Serial.println("D2 thru D7 reading the following values....");
printDigPins(false); //print what dig pins read
delay(1000);
adcReads(); //read each ADC pin and print result
if(wValue) wValue = 0; //toggle digital write value
else wValue = 1;
delay(1000);
}
//function sets D2 thru D7 to input / output and D8 thru D13 to input / output
void setPinMode(int smallMode, int bigMode) {
for(int i=0;i<6;i++) {
pinMode((i+2), smallMode);
pinMode((i+8), bigMode);
}
}
//Writes high or low to group of digital pins
void setDigWrite(bool big, int state) {
if(big) {
for(int i=0;i<6;i++) {
digitalWrite((i+8), state);
}
}
else {
for(int i=0;i<6;i++) {
digitalWrite((i+2), state);
}
}
}
//does digital read on group of digital pins and prints results
void printDigPins(bool big) {
if(big) {
for(int i=0;i<6;i++) {
Serial.print("Value at pin D");
Serial.print((i+8));
Serial.print(" --> ");
Serial.println(digitalRead((i+8)));
}
}
else {
for(int i=0;i<6;i++) {
Serial.print("Value at pin D");
Serial.print((i+2));
Serial.print(" --> ");
Serial.println(digitalRead((i+2)));
}
}
}
//Reads each ADC pin and prints result
void adcReads() {
for(int i=0; i<6; i++) {
Serial.print("ADC value at Pin A");
Serial.print(i);
Serial.print(" --> ");
Serial.println(analogRead(i));
}
}
Labels:
4.0,
arduino,
Atmega 328,
Atmel,
avr,
BLE,
BLE Micro,
Bluetooth,
Eagle,
internet of things,
IoT,
PCB,
Tutorial
Friday, July 10, 2015
Building Your Own AVR / Arduino Internet of Things (IoT) Development Board Part 4
This is part 4 in a 5 part series where we build our own AVR / Arduino Internet of Things (IoT) development board, yay! In this part we will do the PCB layout and discuss how to get our PCB manufactured.
Download Eagle Files
Libraries Used:
•Atmega 328P --> Library: SparkFun-DigitalIC Device: ATMEGA328P_PDIP
•LM317 --> Library: linear>*317 Device:317T
•Resonator ZTT16.0MHz --> Library: Adafruit Device: CERMOSCILL-THM (CERMOSCILL)
•Ceramic Cap --> Library: rcl > C-EU Device: C-EU050-030X075
•Electrolytic cap --> Library: rcl > CPOL-EU Device: CPOL-EUE2.5-6
•Resistor --> Library: resistor Device: R-EU_0207/10 (R-EU_) Package: 0207/10
•Reset switch --> Library: switch-omron Device: 10-XX
•LED --> Library: led Device: LED5MM (LED)
•Potentiometer --> Library: rcl > R-TRIMM Device: R-TRIMMT93YA
Note: Sparkfun and Adafruit libraries did not come with Eagle, but you can find them on their websites
Parts I made (included in files linked to my blog):
•ForceTronic.lbr --> All header and pin holes and 2.1mm DC Jack
•BLE_Micro_Module.lbr --> BLE Micro
Subscribe to:
Posts (Atom)

