Mturk Jobs

Mturk Jobs
Mturk Jobs

Tank

Thursday, October 25, 2018

Arduino Cricket - How to generate soothing realistic Cricket Sounds with Arduino

The cricket is a little bug that makes noisy sounds at night.




Some people find them annoying. But some others - and I’m one of them - find them soothing and a symbol of nature and piece.

I admit that this repeatable sound of cricket can be annoying. It might get you sleep deprivation specially if it keeps making this noise in a place near where you sleep.

But the other type of people who find its sound soothing may be grateful to hear it at bedtime and feel relaxed from it.


There are even some iPhone and Android apps that do nothing but playing those sounds to keep you relaxed.

Today I thought of generating these sound using Arduino for fun.

This can be a good way of relaxation and you don’t need to go look for that cricket if you want it to stop. In this case you can simply turn it off. 

After all you are who programmed it.

I found a good post from a cleaver guy who made the most annoying cricket sound ever.

He wanted to make it a prank for his friend that he made the sound generation at random intervals.

He also made a consistent version of sound that sounded just like the normal cricket does.

In this version you can control the volume using PWM Pulse Width Modulation.

I liked the consistent sound version.


So here is how I made it.






What you’ll need:


  • Arduino board.
  • 8 ohm speaker.
  • Wires to connect the speaker to Arduino board.

Program the software

Circuit




Connect the speaker




Play the sound of your cricket.

That’s all.

Thank you for reading.


Code

#include "Volume3.h"
#define speakerPin 9

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:
  chirpFade();
  delay(random(100,5000));
}

void chirpFade() {
  uint16_t f = 3900;

  uint8_t times = random(1,3);
  float master = 1.0;
  uint16_t v = 0;
  uint8_t vDir = 1;
  float vb = 0;

  while (times > 0) {
    while (vb < 1.0) {
      if (v < 1023 && vDir == 1) {
        v += 16;
      }
      else {
        vDir = 0;
      }

      if (v > 0 && vDir == 0) {
        v -= 16;
      }
      else {
        vDir = 1;
      }

      vol.tone(speakerPin, f, v * constrain(vb, 0.0, 1.0)*master);
      delayMicroseconds(50);
      vb += 0.003;
    }
    while (vb > 0.0) {
      if (v < 1023 && vDir == 1) {
        v += 16;
      }
      else {
        vDir = 0;
      }

      if (v > 0 && vDir == 0) {
        v -= 16;
      }
      else {
        vDir = 1;
      }

      vol.tone(speakerPin, f, v * constrain(vb, 0.0, 1.0)*master);
      delayMicroseconds(50);
      vb -= 0.001;
    }
    times--;
    master -= 0.75;
  }
  vol.noTone();

}


Source

https://github.com/connornishijima/arduino-volume1/tree/master/examples/volume_crickeduino_prank

Tuesday, October 23, 2018

Arduino Ladder Logic - How to program Arduino like PLC using Ladder Logic

I've posted an article about Arduino based PLC and I've an unexpected response.

Many Arduino enthusiasts and students and also many other automation specialists showed interest to the subject.

This simply shows how there are so many people wanting to know more about open source and freely developed tools that can be used in automation and in industry as a whole.

I remember a friend of mine who had a dream since fourteen years ago. That dream he had was to replace old PLCs with modern Microcontrollers like PIC, Atmel and lately Arduino.

I guess now his dream came true.

I received a lot of questions on Arduino based PLC products and how they can be programmed.

So I’ve searched further and found that there are already some tools that can be used to program Arduino using ladder language.

PLCs are often programmed in ladder logic. This is because PLCs originally replaced relay control systems, and after all those years, we still haven't quite let go. A PLC, like any microprocessor, executes a list of instructions in sequence.


Today I’m putting these tools in front of you so you can start learning them and hopefully using them efficiently.


SoapBoxSnap


SoapBox Snap is a free and open source PC-based automation platform.

The ladder editor includes standard instructions like contacts, coils, timers, counters, rising edge and falling edge, and set/reset instructions.

SoapBox Snap also comes with an Arduino Runtime, which means you can download your ladder logic programs to an Arduino (UNO, Nano or Mega board) and even do online debugging and forcing.





LDmicro

It’s a compiler that starts with a ladder diagram and generates native PIC16 or AVR code.
Features include:

-       digital inputs and outputs
-       timers (TON, TOF, RTO)
-       counters (CTU, CTD, `circular counters' for use like a sequencer)
-       analog inputs, analog (PWM) outputs integer variables and arithmetic instructions
-       easy-to-use serial communications, to a PC, LCD, or other device
-       shift registers, look-up tables
-       EEPROM variables, whose values are not forgotten when you lose power
-       simulator, to test your program before you generate PIC/AVR code
http://cq.cx/ladder.pl

I hope this article could shed some light on the subject.

Thank you for reading.




Check My books on Amazon:





Learn By Making: Embedded Systems Tutorial for Students and Beginners




Embedded Systems, Electronics: My Projects Collection From Instructables





Monday, October 22, 2018

Arduino based PLC - Where Arduino Meets Industrial Applications

Some people still think about Arduino and open source electronics as a toy for hobbyists and students.

We believe that open source hardware is in the process of revolutionizing electronics and industry in all fields of our lives.

Arduino and its shields have matured to be a modern way of researching tool, rapid prototyping and even in the field equipment for many industries.


M-DUINO PLC Arduino 57AAR I/Os Analog / Digital / Relay PLUS


Ease of use has made Arduino a good candidate for many applications. The variety of tools and millions of lines of code have facilitated the process of development.

Abundant sensors and massive processing power have found their way in Internet of Things era.

Collaborating with Big Data to collect huge amounts of bits of data to form useful information that lead to giant knowledge base for decision making on larger scales; Arduino is the heart for this big picture.


Odoo image and text block

Source: industrialshields.com

Today you can find weather monitoring stations completely built around open source hardware using open source tools for competitive prices.







Many companies are forming around Arduino platform to evolve into industrial automation makers.

To name some:

industrialshields.com is making its own industrial Arduino PLC and shields to control water level in tanks, production lines and weather station monitoring systems.

sferalabs.cc is making industrial enclosures for Arduino kits and shields for robustness.

If you are interested in Arduino, you can start by learning how to build your own industrial application.



Monday, October 15, 2018

Arduino Drawing Robot - How to do Art with Arduino and a Pen

In this post will see how this Arduino controlled robot can make beautiful patterns and drawings.




Gathering Parts




Arduino Uno
2 5v Stepper Motors
Micro Servo
ULN2803
Breadboard


Code
You can get the code from here.





Making the frame





Circuit diagram

Installing Wheels





Mounting Servo for Pen movement





Final Assembly and Test




Source
https://www.instructables.com/id/Arduino-Drawing-Robot/




Check our books on Amazon:





Learn By Making: Embedded Systems Tutorial for Students and Beginners








Embedded Systems, Electronics: My Projects Collection From Instructables




Sunday, October 14, 2018

Modify your old RC Car into that new modern smartphone controlled car with Arduino and Bluetooth

Who have every played with his toy RC car?
Today you can turn your old RC car into an advanced Android RC car using Arduino and Bluetooth shield in simple straight forward steps.




First you need to get the car that fits all of those simple components required for the new control circuit.


Then you need to get all of the stuff out of it. You can find room for your control board as those modern circuits are much smaller than regular ones.



What you’ll need

Arduino UNO
HC-06 Bluetooth shield
L293D IC
12v Lipo battery pack
Some resistors



And you need the program that controls the circuit




Android program:

https://play.google.com/store/apps/details?id=braulio.calle.bluetoothRCcontroller





Source:
https://www.instructables.com/id/Arduino-Bluetooth-RC-Car-Android-Controlled/




Check our books on Amazon:





Learn By Making: Embedded Systems Tutorial for Students and Beginners









Embedded Systems, Electronics: My Projects Collection From Instructables





Saturday, October 13, 2018

Beginner's Dream Quadcopter - Arduino and Bluetooth Micro Quadcopter



This is sure the Beginner's Dream Quadcopter. I've searched a lot for a Quadcopter like this. Today I've found it.





I didn't ask too much. But I couldn't find it until today. And that's why I wanted to share it with you.

Why would it make the Beginner's Dream Quadcopter?

Simplicity
This is one of the simplest quadcopter circuit I've seen recently.  It uses Arduino Nano as its main controller. As for quadcopter stabilization it uses 6050 MPU Module.
User control interfacing circuit is achieved via HC-06 Bluetooth module. This means that you can control this little quadcopter from your smartphone.

Motor drive circuits is built using four transistors.






Source: instructables




Check our books on Amazon:





Learn By Making: Embedded Systems Tutorial for Students and Beginners









Embedded Systems, Electronics: My Projects Collection From Instructables





Tank