Posts with «hc-sr04» label

Prextron CHAIN BLOCKS - Arduino Nano controlled Ultrasonic sensor that switches a motor wirelessly using 433MHz RF modules and a relay board.


 

Description

In this tutorial, I will be evaluating Prextron CHAIN blocks – a new system that allows you to connect your sensors and actuators to an Arduino NANO using clever 3D-printed prototyping boards that can be stacked sideways. This very modular system makes it easy to connect, disconnect and replace project components, and eliminate the “rats nest of wires” common to many advanced Arduino projects. CHAIN BLOCKS are open, which means that you can incorporate any of your sensors or actuators to these prototyping boards, and you can decide which specific pin on Arduino you plan to use. The CHAIN BLOCK connections prevent or reduce common connection mistakes, which make them ideal for class-room projects and learning activities.

I am going to set up a project to put these CHAIN BLOCKs to the test:
When I place my hand in-front of an Ultrasonic sensor, the Arduino will transmit a signal wirelessly to another Arduino, and consequently turn on a motor.


 

Parts Required:

You need the following Prextron Chain Blocks


Please note: You may need to solder the module wires to the CHAIN BLOCK protoboard.


 
 

Arduino Libraries and IDE

This project does not use any libraries. However, you will need to upload Arduino code to the Arduino. For this you will need the Arduino IDE which can be obtained from the official Arduino website:
https://www.arduino.cc/en/main/software


 
 

ARDUINO CODE: RF Transmitter


 
 

ARDUINO CODE: RF Receiver


 
 

Fritzing diagrams for Transmitter


 


 


 


 

 

Fritzing diagrams for Receiver


 


 


 


 

Concluding comments

The purpose of this project was to evaluate Prextron CHAIN BLOCKs and put them to the test. Here is what I thought of CHAIN BLOCKS at the time of evaluation. Some of my points mentioned below may no longer apply to the current product. It may have evolved / improved since then. So please take that into consideration


 

What I liked about Chain Blocks

  • The design is simple, the product is simple.
  • Once the Chain Blocks were all assembled, they were very easy to connect to each other.
  • I can really see the benefit of Chain Blocks in a teaching environment, because it simplifies the connection process, and reduces connection mixups.
  • It was good to see that the blocks come in different colours, which means that you can set up different colour schemes for different types of modules.
  • You can incorporate pretty much any sensor or Actuator into the Chain block which is very appealing.
  • You also have the flexibility of choosing which pins you plan to use on the Arduino.
  • Projects look a lot neater, because you no longer have the rats nest of wires.
  • The Blocks lock into each other which means that they are much easier to transport/carry.


 

What I did not like about Chain Blocks

  • In most cases, the Chain Block protoboard lanes were not numbered, which increased the chances of making mistakes when soldering
  • The need to solder modules to the protoboard, may be a discouragement for some people.
  • I would have liked a choice of different size Chain blocks. Some of the sensors did not fit nicely into the Square blocks.
  • Prextron really need to work on their website if they plan to get serious with this product: Webpage has incomplete functionality or irrelevant links etc etc.


 
 
 

Thank you very much to Prextron for providing the CHAIN BLOCKS used in this tutorial, and allowing me to try out their product. If you are interested in trying them yourself, then make sure to visit them at:


 
 
 
 
 
If you like this page, please do me a favour and show your appreciation :

 
Visit my ArduinoBasics Google + page.
Follow me on Twitter by looking for ScottC @ArduinoBasics.
I can also be found on Pinterest and Instagram.
Have a look at my videos on my YouTube channel.

             

Litter Basket Automation

Sometimes the technology part of a project isn’t the hard part. It is having an idea for something both useful and doable. Sure, a robot butler that would do your cleaning and laundry would be useful, but might be out of reach for most of us. On the other hand, there’s only so many use cases for another blinking LED.

[Martinhui] knows how to use an ultrasonic sensor with an Arduino. Driving a motor isn’t that hard, either. The question is: what do you do with that? [Martin’s] answer: Automate a trash can. You can see a video of the result, below.

You can find commercial versions of this, of course, but what fun is that? The can is a bit small, but a larger motor or a different mechanical design could scale it up easily.

As robotic trash cans go, this isn’t that ambitious, but it is highly doable. If only it connected to the Internet.


Filed under: Arduino Hacks

Presenting the Internet of Trash Cans !

This was gonna happen – sooner or later. [matthewhallberg] built a “Smart” trash can that is connected to the Internet and can be controlled by its own Android App. We’re not sure if the world needs it, but he wanted one and so built it. He started it out on a serious note, but quickly realized the fun part of this build – check out his funny Infomercial style video after the break.

The build itself is uncomplicated and can be replicated with ease. A servo motor helps flip the lid open and close. This is triggered by an ultrasonic ping sensor, which responds when someone waves a hand in front of the trash can. A second ping sensor helps inform the user when it is full and needs to be emptied. A Leonardo with the Idunio Yun shield helps connect the trash can to the internet. An mp3 shield connected to a set of powered computer speakers adds voice capability to the trash can, allowing it to play back pre-recorded sound clips. Finally, a Bluetooth module lets him connect it to an Android phone and the companion app controls the trash can remotely.

For the IoT side of things, [matthewhallberg] uses a Temboo account to send an email to the user when the trash can is full. The Arduino sketch, a header file to configure the Temboo account, and the Android application can all be downloaded from his blog. If this project inspires you, try building this awesome Robotic trash can which catches anything that you throw near it  or read the barcodes off the trash being thrown out and update the grocery list.


Filed under: Arduino Hacks, home hacks, internet hacks

Ball Balancing Arduino-Style

If you have a good sense of balance, you can ride a unicycle or get on TV doing tricks with ladders. We don’t know if [Hanna Yatco] has a good sense of balance or not, but we do know her Arduino does. Her build uses the ubiquitous HC-SR04 SONAR sensor and a servo.

This is a great use for a servo since a standard servo motor without modifications only moves through part of a circle, and that’s all that’s needed for this project. A PID algorithm measures the distance to the ball and raises or lowers a beam to try to get the ball to the center.

Servos like this usually operate in radio control vehicles and they are very easy to drive. A pot coupled to the shaft generates a pulse that the servo internally compares to a pulse from the microcontroller. If the pulse is wider than the reference pulse, the motor drives in one direction. If the pulse is narrower than the reference, the motor operates in the other direction. Just how much it drives depends on how much difference there is between the two pulses. When the pulses match, the servo motor stops moving. This pulse arrangement is very simple to drive from a logic output on an Arduino or other microcontrollers.

The build details are a bit sparse, but you can see in the video the general layout, and she links to a similar project that inspired this one if you are looking for more details.

You can do the same trick in two dimensions if you prefer. Or perhaps you’d like to try using a time of flight sensor, instead.


Filed under: Arduino Hacks
Hack a Day 15 Dec 00:00

HC-SR04 Isn’t the Same as Parallax PING))) But It Can Pretend to Be!

“It’s only software!” A sentence that strikes terror in the heart of an embedded systems software developer. That sentence is often uttered when the software person finds a bug in the hardware and others assume it’s going to be easier for fix in software rather than spin a new hardware revision. No wonder software is always late.

[Clint Stevenson] is his own hardware and software guy, as are most of us. He wanted to use the less expensive HC-SR04 ultrasonic rangefinder in a prototype. Longer term he wanted to have the choice of either a Parallax PING or MaxBotix ultrasonic sensor for their better performance outdoors. His hardware hack of the SR04 made this a software problem which he also managed to solve!

[Clint] was working with the Arduino library, based on the Parallax PING, which uses a single pin for trigger and echo. The HC-SR04 uses separate pins. Originally he modified the Arduino library to accept the two pin approach. But with his long term goal in mind, he also modified the HC-SR04 sensor by removing the on-board pull-up resistor and adding a new one on the connector side to combine the signals. That gave him an SR04 that worked with the single-pin based library.

We’ve seen Parallax PING projects for sensing water depth and to generate music. These could be hacked to use the HC-SR04 using [Clint’s] techniques.

[Arduino and HC-SR04 photo from http://www.blaxlab.com/%5D


Filed under: Arduino Hacks, Holiday Hacks, software hacks

My FirstMonster (or FM for short)

Primary image

What does it do?

autonomouse navigation

I managed to finish my first robot on witch I spent a lot of time, mostly because a lot of stuff was new to me. It is not very complicated but it seems to do it's job well. I posted everything about the build on my blog and also the parts I used (and the ones I rejected).

It is a Tamiya tracked platform with dual gearbox. I used an Arduino UNO and a SeeedStudio motor shield to drive it from a 11.7 lipo battery I had from my RC heli. It uses a Ultrasonic sensor to look in front and also a DIY IR sensor for backing up. I also added a temperature sensor for the fun of it.

Cost to build

$80,00

Embedded video

Finished project

Complete

Number

Time to build

20 hours

Type

tracks

URL to more information

Weight

300 grams

read more

BubbleBot

Primary image

What does it do?

Navigates via Ultrasound, annoys the dogs

This is the most complete robot I've ever made.  That's because I intentionally killed it right after I made the video:

I was so sick of this thing that I did what anyone would do: I stuck an X-acto knife in his head.

BubbleBot started life as an RC Car:

Cost to build

$45,00

Embedded video

Finished project

Number

Time to build

Type

URL to more information

Weight

read more

BOXX-E

Primary image

What does it do?

Navigates via four HC-SR04 Ultrasonic Sensors

Parts:

Meduino Nano microcontroller

TB6612FNG motor driver on carrier board

Four HC-SR04 ultrasonic sensors

i2c serial LCD display - 16X2

1 TI MSP430 Launchpad box

1 TI Stellaris Launchpad box

Tamiya twin motor gearbox

Tamiya truck tires

Tamiya ball caster Power switch

IDE ribbon cable

2 430 contact breadboards

AA battery pack

9V battery connector

Zip ties

Wire

You can read more at my blog: http://www.meanpc.com

Cost to build

$70,00

Embedded video

Finished project

Number

Time to build

5 hours

Type

wheels

URL to more information

Weight

907 grams

BioBot v1

Primary image

What does it do?

Exhibits all 7 characteristics of life, therefore technically it is an organism.

Wonders around autonomously. Exhibits all 7 characteristics of life, therefore technically it is an organism.

Cost to build

$50,00

Embedded video

Finished project

Number

Time to build

6 hours

Type

URL to more information

Weight

YA2WDNSOSBBALABMHAMF (Yet Another 2WD Not So Original Starter Bot But At Least Assembled By My Own Hands As My First) or B4short

Primary image

What does it do?

Navigate around via ultrasound avoiding obstacles

Well, finally I've started to assemble my first go at building an autonomous bot, nothing fancy, nothing original just something to learn the ropes. I'm going for a 2WD design that to me seems to be quite ubiquitous.

As of the moment (May, 17th 2012) basically I've only glued together a couple of DVDs (following generalgeek's sugestion) to use as base, and then also hot-glued a couple of DC motors and a 3rd non-motor wheel to it.

Component-wise I'm only waiting for a couple of transistors to build an H-bridge (as sugested on a Dan M's post).

Cost to build

Embedded video

Finished project

Number

Time to build

Type

wheels

URL to more information

Weight

read more