It is very kind that this new IDE (1.6.0) detects my system language and uses it as editing and interface language. It is more comfortable for me to use English since the most resource I am using for Arduino is in English. This new IDE has the option to change the possibility to customize the interface.
About Here
This web blog is established for collecting useful information about building prototype with arduino or other applications. This page shuld help a designer with very basical technical cognition to build a working model or a prototyp for his design concept. We find prototyp or working model an excellent tool to test concept and understand it's usage in real condition (not only fantasy in mind). It's ofter very hard to realize every functions of a design concept. However it's our goal here to make this task easier.
What should be always keeped in mind is that we are not engineers and it's not our goal to design a perfect electron programme control. We are designers who are more willing to understand the users through prototype testing.
This web-site is still under construction and more information shall be collected. :)
What should be always keeped in mind is that we are not engineers and it's not our goal to design a perfect electron programme control. We are designers who are more willing to understand the users through prototype testing.
This web-site is still under construction and more information shall be collected. :)
Mar 3, 2015
Arduino ATtiny Project
This project is running again. I'm glad to see their recent update. Very useful! Recommended!
see http://highlowtech.org/
see http://highlowtech.org/
Nov 4, 2014
arduino autoreset, watchdog timer
I found this excellent video for using arduino watchdog timer created by Make Course. highly suggestive!
Apr 7, 2014
Software Reset of Arduino
The term "software reset" reffers to reset the arduino by internal codes. Generally there are three ways to reset arduino automatically:
1. use watchdog: an external hardware that activate the arduino reset function. The safest and most reliable way to do an automatic arduino reset.
2. use output pins with relay: when the pin is written to HIGH, it's attached relay connects the reset pin to Gnd, and that activates the reset function.
3. use software reset code: this only reset the running programm. This reset will command arduino to run the programm code from the beggining. (Bootloader, for example, will not be reset.)
It is useful to run automatic reset when using arduino for prototype of long-term usage.
Sofware reset can be done by some means:
1. void(* resetFunc) (void) = 0;
Declare this function in the code and when calling resetFunc(); the programm wil be reset.
2. void resetFunc() { asm volatile (" jmp 0"); }
This is the other way to declare the reset function.
Reference:
http://forum.arduino.cc/index.php?topic=49581.0
http://www.xappsoftware.com/wordpress/2013/06/24/three-ways-to-reset-an-arduino-board-by-code/
http://www.instructables.com/id/two-ways-to-reset-arduino-in-software/step2/using-just-software/
1. use watchdog: an external hardware that activate the arduino reset function. The safest and most reliable way to do an automatic arduino reset.
2. use output pins with relay: when the pin is written to HIGH, it's attached relay connects the reset pin to Gnd, and that activates the reset function.
3. use software reset code: this only reset the running programm. This reset will command arduino to run the programm code from the beggining. (Bootloader, for example, will not be reset.)
It is useful to run automatic reset when using arduino for prototype of long-term usage.
Sofware reset can be done by some means:
1. void(* resetFunc) (void) = 0;
Declare this function in the code and when calling resetFunc(); the programm wil be reset.
2. void resetFunc() { asm volatile (" jmp 0"); }
This is the other way to declare the reset function.
Reference:
http://forum.arduino.cc/index.php?topic=49581.0
http://www.xappsoftware.com/wordpress/2013/06/24/three-ways-to-reset-an-arduino-board-by-code/
http://www.instructables.com/id/two-ways-to-reset-arduino-in-software/step2/using-just-software/
Feb 1, 2014
USE TLC5940 on Arduino Leonardo
The TLC5490 library (http://playground.arduino.cc/learning/TLC5940 ) should be modified to be working with Arduino Leonardo. The Solution can be found here:
http://forum.arduino.cc/index.php?topic=110394.0
I went through all the process and this solution works fine. This post is my documentation.
http://forum.arduino.cc/index.php?topic=110394.0
I went through all the process and this solution works fine. This post is my documentation.
Dec 27, 2013
Upgrade Arduino WiFi-Shield firmware
I am newly studying the interaction between arduino and xively.com. The interaction was first designed for arduino ethernet but now I need the sketch run with WiFi. I use the WiFi shield and Arduino MEGA 2560. Although the internet seems work, my arduino just cannot get the xively data from internet. Even the example sketch of "wifi web client" doesn't work properly.
Finally I tried to update the firmware on my wifi shield. The introduction from the official arduino page is correct but lacks clear step-by-step explaination. Some other online solutions don't work on my shield. This article is written after my finally finshing the update and solving some problems. The final process I found out is actually relative simple and requires only a few downloads (I use windows):
Finally I tried to update the firmware on my wifi shield. The introduction from the official arduino page is correct but lacks clear step-by-step explaination. Some other online solutions don't work on my shield. This article is written after my finally finshing the update and solving some problems. The final process I found out is actually relative simple and requires only a few downloads (I use windows):
Dec 17, 2013
Arduino ATtiny 84/85 (updated 2020/8/4)
ATtiny allows you to reduce the cost of your electronic prototype, even lower than Arduino Mini series. ATtiny84 or 85 is microcontroller from Atmel. ATtiny85 offers 6 I/O pins for communication and 8192 byte memory, and ATtiny 84 12 I/O pins and 8192 byte. You can use Arduino IDE to make a sketch and upload onto this tiny IC. To do that, you need to set up your Arduino as an ISP (In-System Programming).
I think, the original developers using ATtiny for Arduino projects are from High-Low Tech Lab of MIT (2009-2014). Visit their page for more information: http://highlowtech.org/
Oct 9, 2012
controll arduino online
If you need to controll arduino or other electronics remote. Here is a useful website for you.
https://sites.google.com/site/ixacproject/
https://sites.google.com/site/ixacproject/
Feb 21, 2012
How to get start with arduino
Although there is a tutorial on the arduino website, it still seems difficult for the beginers to learn arduino program. I think the problem is that the examples are categorized after special themes, and the difficulties in each theme are quite different. Here I would like to offer a list of examples for the arduino beginers who tries to learn this program by their own. You may do the toturial examples according to my list one after one so that they can learn this program and codes more easily.
The first, get a arduino board Uno and downlad arduino sofware,
and install the board on the computer under this introduction,
Now comes the list. When you start an example, you should try to understand every single code. You may not be able to understand them all, and that's why you need to look the unfamiliar codes up in it's reference parallelly. I believe, if you can finish the first 10 examples, you will get a global understanding about how to program the arduino board. For the beginers who use arduino for building prototype will need to finish the first 15 examples. Example 16~19 are for sound functions of arduino. If you don't need sound functions, you can just skip them. If you can understand the all 22 examples, I believe you will have the ability to study other tutorial examples or you can start learning arduino by studying each language coad in the Reference freely.
List:
01. BareMinimum
02. Blink
03. DigitalReadSerial
04. Button (The circuit picture in this example lacks an LED. You should connect an LED to Arduino board the same like the 02.Blink example.)
05. If Statement
05-2. You should now study "Comparison Operators" in the Reference.
06. For Loop
07. Knock
08. Analog Input
09. Analog Read Serial
10. Analog InOut Serial
11. Fading
12. Smoothing
13. Knob
14. Sweb
15. Motorknob
16. Tone
17. Pitch Follower
18. Simple Keyboard
19. Tone 4
20. While Loop
21. Switch Case
22. Switch Case 2
22-2. You should now study "Boolean Operators" in the Reference.
The first, get a arduino board Uno and downlad arduino sofware,
and install the board on the computer under this introduction,
Now comes the list. When you start an example, you should try to understand every single code. You may not be able to understand them all, and that's why you need to look the unfamiliar codes up in it's reference parallelly. I believe, if you can finish the first 10 examples, you will get a global understanding about how to program the arduino board. For the beginers who use arduino for building prototype will need to finish the first 15 examples. Example 16~19 are for sound functions of arduino. If you don't need sound functions, you can just skip them. If you can understand the all 22 examples, I believe you will have the ability to study other tutorial examples or you can start learning arduino by studying each language coad in the Reference freely.
List:
01. BareMinimum
02. Blink
03. DigitalReadSerial
04. Button (The circuit picture in this example lacks an LED. You should connect an LED to Arduino board the same like the 02.Blink example.)
05. If Statement
05-2. You should now study "Comparison Operators" in the Reference.
06. For Loop
07. Knock
08. Analog Input
09. Analog Read Serial
10. Analog InOut Serial
11. Fading
12. Smoothing
13. Knob
14. Sweb
15. Motorknob
16. Tone
17. Pitch Follower
18. Simple Keyboard
19. Tone 4
20. While Loop
21. Switch Case
22. Switch Case 2
22-2. You should now study "Boolean Operators" in the Reference.
Jan 25, 2012
Oct 24, 2011
How to count time in Arduino
There are two simple ways to do pretty exact time counting in Arduino. The first one is to use delay(). Everytime it runs a delay(1), it's 1 millisecond passed. (1millisecond =0.001second, which means to delay 1 second you need to run delay(1000). ) Like this, you can count the runnning time by counting the delayed milliseconds.
But you may have many defferent delay() in your loop codes and you don't know how many milliseconds have been delayed anymore because it runs everytime differently. In this case you will need to use millis(). It's an internal clock in Arduino which starts to count time everytime the Arduino board starts running or is reseted. It can be counted to 50 days. To give the data of millis() to a variable you have to define this variable as unsigned long.
Code Example
Reference:
http://arduino.cc/en/Reference/Millis
But you may have many defferent delay() in your loop codes and you don't know how many milliseconds have been delayed anymore because it runs everytime differently. In this case you will need to use millis(). It's an internal clock in Arduino which starts to count time everytime the Arduino board starts running or is reseted. It can be counted to 50 days. To give the data of millis() to a variable you have to define this variable as unsigned long.
Code Example
unsigned long Val;
void setup(){
Serial.begin(9600);
}
void loop(){
Val = millis();
Serial.print("Count = "); Serial.println(Val);
delay(1000);
}
http://arduino.cc/en/Reference/Millis
Oct 12, 2011
How to use AREF of Arduino
The aref works like this...
When you do analogue to digital conversion the arduino board uses the 5V supply as a reference. this means that any voltage between 0 and 5v is represented as numbers between 0 and 1024. If the signal you are measuring never reaches 5V it is possible to change the reference to an internal 2.5 v source and this divides the space between 0 and 2.5v in 1024 steps effectively doubling the resolution. If this still doesn't work for you then you can ask the processor to use an external voltage applied to aref. if you find a super stable 1V refernce source this will give you 1milli volt resolution for the ADC. this is used only in special applications because at that resolution the noise becomes a big issue etc etc
switching reference voltage requires adding a few lines of C code to your arduino code.
===========
cbi(ADMUX, REFS1); //clear REFS1 bit (0)
cbi(ADMUX, REFS0); //clear REFS0 bit (0)
===========
Reference:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1139161553/3#3
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1142283743
When you do analogue to digital conversion the arduino board uses the 5V supply as a reference. this means that any voltage between 0 and 5v is represented as numbers between 0 and 1024. If the signal you are measuring never reaches 5V it is possible to change the reference to an internal 2.5 v source and this divides the space between 0 and 2.5v in 1024 steps effectively doubling the resolution. If this still doesn't work for you then you can ask the processor to use an external voltage applied to aref. if you find a super stable 1V refernce source this will give you 1milli volt resolution for the ADC. this is used only in special applications because at that resolution the noise becomes a big issue etc etc
switching reference voltage requires adding a few lines of C code to your arduino code.
===========
cbi(ADMUX, REFS1); //clear REFS1 bit (0)
cbi(ADMUX, REFS0); //clear REFS0 bit (0)
===========
Reference:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1139161553/3#3
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1142283743
Oct 5, 2011
How to regulate voltage in a circuit
If your eletric parts need different voltage in a circuit, you will need to regulate the voltage. The easist way to do that is with a voltage regulator. It not only drops the voltage but also stablizes it.
A Voltage Regulator
You tube ttutorial
http://www.afrotechmods.com/
Or you can build a regulator circuit which is basically built with a resistor and a diode. You need a NPN transistor to enable a larger current. Please see more in Reference.
http://www.satcure-focus.com/tutor/page5.htm
Any way you use to drop the voltage will cause heat. You should keep that in mind!
Sketch Uploading problem by Arduino Pro Mini 328P5V
When uploading our codes to Arduino Mini, we need an adaptor - Arduino MiniUSB - to accomplish it, in which we coonect the 4 Pins of both boards - the Gnd, +5V, RX, TX. But if you got problem to upload the codes to Arduino Pro Mini, please try this: connect one more Pin - the RTS of Arduino MiniUSB to RST of Arduino Pro Mini. It should work now.
Of course, you should choose the correct board typ in your arduino program.
Pins on theArduino MiniUSB
Arduino Pro Mini 328P5V
Of course, you should choose the correct board typ in your arduino program.
Pins on theArduino MiniUSB
Arduino Pro Mini 328P5V
Sound Detector
Sound Detector
(NPN Transistor in sketch)
Connection
=== Arduino Code Sample ===
int DecPin = A5; // analog Input of Sound
int Val1; // an initial value
int Val2; // comparing value
int ValS = 5; // Sensibility
void setup() {
Serial.begin(9600);
}
int Val1; // an initial value
int Val2; // comparing value
int ValS = 5; // Sensibility
void setup() {
Serial.begin(9600);
}
void loop() {
Val1 = analogRead (DecPin);
if (abs(analogRead(DecPin) - Val1) >ValS) { // if the read value changes
Serial.println (analogRead (DecPin)); // print the value
delay(50);
}
}
Val1 = analogRead (DecPin);
if (abs(analogRead(DecPin) - Val1) >ValS) { // if the read value changes
Serial.println (analogRead (DecPin)); // print the value
delay(50);
}
}
====
Reference
Cheap Sound Sensor for AVR
http://tinkerlog.com/2007/05/20/cheap-sound-sensor-for-avr/
How to memory arduino data when power drops
Use EEPROM on Arduino
Be Careful!! The number of time to write EEPROM on Arduino is limited. Arduino supports usually at least 100,000 times EEPROM writing.
http://arduino.cc/en/Reference/EEPROM
http://arduino.cc/en/Reference/EEPROMWrite
http://arduino.cc/en/Reference/EEPROMRead
or on a EEPROM chip, for example a 16 kBit EEPROM chip by conrad.de
http://www.conrad.de/ce/de/product/150180/EEPROM-24LC16BP-MICROCHIP/SHOP_AREA_17311&promotionareaSearchDetail=005
Be Careful!! The number of time to write EEPROM on Arduino is limited. Arduino supports usually at least 100,000 times EEPROM writing.
http://arduino.cc/en/Reference/EEPROM
http://arduino.cc/en/Reference/EEPROMWrite
http://arduino.cc/en/Reference/EEPROMRead
or on a EEPROM chip, for example a 16 kBit EEPROM chip by conrad.de
http://www.conrad.de/ce/de/product/150180/EEPROM-24LC16BP-MICROCHIP/SHOP_AREA_17311&promotionareaSearchDetail=005
reverse current / DC motor control with L293D IC
L293D IC
Pin Connections
L293D Can be used to control two DC motors. INPUT 1, INPUT 2, and ENABLE 1 (Ven1) controll the first motor which is connected to OUTPUT 1 and OUTPUT 2. Vs should be connected to the Power Supply for DC Motor which is higher than Vss and lower than 36 Volt. Vss should be connected to the Power Supply for the IC which is higher than 4.5 Volt. It's good to differ the power supply Vss from Vs. Ven must be higher than 2.3 Volt to enable the DC motor. It can be given by different Power to change the speed of motor.
Logic
Ven1 high & Pin 4 high & Pin 5 high = Stop
Ven1 high & Pin 4 low & Pin 5 low = Stop
Ven1 high & Pin 4 high & Pin 5 low = clockwise
Ven1 high & Pin 4 low & Pin 5 high = anti-clockwise
Ven1 low = Stop (not applicated)
PWM at Ven can be used to control the speed of Motor.
Connection Example
int switchPin = 2; // switch input
int motor1Pin1 = 3; // pin 2 on L293D
int motor1Pin2 = 4; // pin 7 on L293D
int enablePin = 9; // pin 1 on L293D
void setup() {
pinMode(switchPin, INPUT);
pinMode(motor1Pin1, OUTPUT);
pinMode(motor1Pin2, OUTPUT);
pinMode(enablePin, OUTPUT);
}
void loop() {
// if the switch is high, motor will turn on one direction:
if (digitalRead(switchPin) == HIGH) {
analogWrite(enablePin, 255); // analog output for different speed
digitalWrite(motor1Pin1, LOW); // set pin 2 on L293D low
digitalWrite(motor1Pin2, HIGH); // set pin 7 on L293D high
}
// if the switch is low, motor will turn in the opposite direction:
else {
analogWrite(enablePin, 150); // analog output for different speed
digitalWrite(motor1Pin1, HIGH); // set pin 2 on L293D high
digitalWrite(motor1Pin2, LOW); // set pin 7 on L293D low
}
}
==========================
Reference:
Controal a DC motor with Arduino and L293D IC
http://luckylarry.co.uk/arduino-projects/control-a-dc-motor-with-arduino-and-l293d-chip/
http://www.robofun.net/forum/viewthread.php?tid=6189
http://www.freewebs.com/isuru-c/motor_driver.htm
L293D IC by Conrad.de
http://www.conrad.de/ce/de/product/174003/?insert_kz=NA&hk=SEM&WT.srch=1&gclid=CJjz_7WA0asCFcK9zAod_molXA
http://www.conrad.de/ce/de/product/156134/IC-4-KANAL-TREIBER-L293D-STM/SHOP_AREA_17311&promotionareaSearchDetail=005
Important Webs for Design Prototype
Arduino HomePage
http://www.arduino.cc/ (Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.)
Processing HomePage
http://processing.org/ (Processing is an open source programming language and environment for people who want to create images, animations, and interactions. Initially developed to serve as a software sketchbook and to teach fundamentals of computer programming within a visual context, Processing also has evolved into a tool for generating finished professional work. Today, there are tens of thousands of students, artists, designers, researchers, and hobbyists who use Processing for learning, prototyping, and production.)
Fritzing HomePage
http://fritzing.org/ (Fritzing is an open-source initiative to support designers, artists, researchers and hobbyists to work creatively with interactive electronics. We are creating a software and website in the spirit of Processing and Arduino, developing a tool that allows users to document their prototypes, share them with others, teach electronics in a classroom, and to create a pcb layout for professional manufacturing.)
http://www.arduino.cc/ (Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.)
Processing HomePage
http://processing.org/ (Processing is an open source programming language and environment for people who want to create images, animations, and interactions. Initially developed to serve as a software sketchbook and to teach fundamentals of computer programming within a visual context, Processing also has evolved into a tool for generating finished professional work. Today, there are tens of thousands of students, artists, designers, researchers, and hobbyists who use Processing for learning, prototyping, and production.)
Fritzing HomePage
http://fritzing.org/ (Fritzing is an open-source initiative to support designers, artists, researchers and hobbyists to work creatively with interactive electronics. We are creating a software and website in the spirit of Processing and Arduino, developing a tool that allows users to document their prototypes, share them with others, teach electronics in a classroom, and to create a pcb layout for professional manufacturing.)
Subscribe to:
Posts (Atom)










