Posts with «control» label

IR Translator Makes Truly Universal Remote

Universal remotes are a handy tool to have around if you have many devices that would all otherwise have their own remote controls. Merging them all into a single device leads to less clutter and less frustration, but they are often not truly “universal” as some of them may not support every infrared device that has ever been built. If you’re in a situation like that it’s possible to build a truly universal remote instead, provided you have a microcontroller and a few infrared LEDs on hand.

This was the situation that [Matt] found himself in when his Amazon Fire TV equipment control feature didn’t support his model of speakers. To get around this he programmed an Arduino to essentially translate the IR codes from the remote and output a compatible set of codes to the speakers.This requires both an IR photodiode and an IR LED but little else other than the codes for the remote and the equipment in question. With that all set up and programmed into the Aruino, [Matt]’s remote is one step closer to being truly “universal”.

While [Matt] was able to make use of existing codes in the Arduino library, it is also possible to capture the codes required manually by pointing a remote at a photodiode and programming a microcontroller to capture the codes that you need. [Matt] used a Raspberry Pi to do this when debugging this project, but we’ve also seen this method used with a similar build which uses an ESP8266 to control an air conditioner via its infrared remote control capabilities.

Arduino Reduces Heating Costs

While almost everyone has a heater of some sort in their home, it’s fairly unlikely that the heat provided by a central heating system such as a furnace is distributed in an efficient way. There’s little reason to heat bedrooms during the day, or a kitchen during the night, but heating systems tend to heat whole living space regardless of the time of day or the amount of use. You can solve this problem, like most problems, with an Arduino.

[Karl]’s build uses a series of radiator valves to control when each room gets heat from a boiler. The valves, with a temperature monitor at each valve, are tied into a central Arduino Mega using alarm wiring. By knowing the time of day and the desired temperature in each room, the Arduino can control when heat is applied to each room and when it is shut off, presumably making the entire system much more efficient. It also has control over the circulating pump and some of the other boiler equipment.

Presumably this type of system could be adapted to a system which uses a furnace and an air handler as well, although it is not quite as straightforward to close vents off using a central unit like this as it is to work with a boiler like [Karl] has. With careful design, though, it could be done. Besides replacing thermostats, we can’t say we’ve ever seen this done before.

Thanks to [SMS] for the tip!

Hack a Day 17 Jun 00:00

Reflowduino: Put That Toaster Oven To Good Use

There are few scenes in life more moving than the moment the solder paste melts as the component slides smoothly into place. We’re willing to bet the only reason you don’t have a reflow oven is the cost. Why wouldn’t you want one? Fortunately, the vastly cheaper DIY route has become a whole lot easier since the birth of the Reflowduino – an open source controller for reflow ovens.

This Hackaday Prize entry by [Timothy Woo] provides a super quick way to create your own reflow setup, using any cheap means of heating you have lying around. [Tim] uses a toaster oven he paid $21 for, but anything with a suitable thermal mass will do. The hardware of the Reflowduino is all open source and has been very well documented – both on the main page and over on the project’s GitHub.

The board itself is built around the ATMega32u4 and sports an integrated MAX31855 thermocouple interface (for the all-important PID control), LiPo battery charging, a buzzer for alerting you when input is needed, and Bluetooth. Why Bluetooth? An Android app has been developed for easy control of the Reflowduino, and will even graph the temperature profile.

When it comes to controlling the toaster oven/miscellaneous heat source, a “sidekick” board is available, with a solid state relay hooked up to a mains plug. This makes it a breeze to setup any mains appliance for Arduino control.

We actually covered the Reflowduino last year, but since then [Tim] has also created the Reflowduino32 – a backpack for the DOIT ESP32 dev board. There’s also an Indiegogo campaign now, and some new software as well.

If a toaster oven still doesn’t feel hacky enough for you, we’ve got reflowing with hair straighteners, and even car headlights.

Reflow Rig Makes SMD Soldering a Wok in The Park

For a DIY reflow setup, most people seem to rely on the trusty thrift store toaster oven as a platform to hack. But there’s something to be said for heating the PCB directly rather than heating the surrounding air, and for that one can cruise the yard sales looking for a hot plate to convert. But an electric wok as a reflow hotplate? Sure, why not?

At the end of the day [ThomasVDD]’s reflow wok is the same as any other reflow build. It has a heat source that can be controlled easily, temperature sensors, and a microcontroller that can run the proportional-integral-derivative (PID) control algorithm needed for precise temperature control. That the heating element he used came from an electric wok was just a happy accident. A laser-cut MDF case complete with kerf-bent joints holds the heating element, the solid-state relay, and the Arduino Nano that runs the show. A MAX6675 thermocouple amp senses the temperature and allows the Nano to cycle the temperature through different profiles for different solders. It’s compact, simple, and [ThomasVDD] now has a spare wok to use on the stove top. What’s not to like?

Reflow doesn’t just mean oven or hotplate, of course. Why not give reflow headlights, a reflow blowtorch, or even a reflow work light a try?

Retractable Console Allows Wheelchair User to Get up Close and Personal

[Rhonda] has multiple sclerosis (MS), a disease that limits her ability to walk and use her arms. She and the other residents of The Boston Home, an extended care facility for people with MS and other neuromuscular diseases, rely on their wheelchairs for mobility. [Rhonda]’s chair comes with a control console that swings out of the way to allow her to come up close to tables and counters, but she has problems applying enough force to manually position it.

Sadly, [Rhonda]’s insurance doesn’t cover a commercial solution to her problem. But The Boston Home has a fully equipped shop to extend and enhance residents’ wheelchairs, and they got together with students from MIT’s Principles and Practices of Assistive Technology (PPAT) course to hack a solution that’s not only useful for [Rhonda] but should be generally applicable to other chairs. The students analyzed the problem, measured the forces needed and the clearances required, and built a prototype pantograph mount for the control console. They’ve made the device simple to replicate and kept the BOM as inexpensive as possible since patients are often out-of-pocket for enhancements like these. The video below shows a little about the problem and the solution.

Wheelchair hacks are pretty common, like the 2015 Hackaday Prize-winning Eyedrivomatic. We’ve also covered totally open-source wheelchairs, both manual and electric.

Filed under: Medical Hacks

raspberry + arduino / webiopi + firmata (python)

Im buildin internet controlled rc car with arduino, arduino motor shield and raspberry.
So how to use firmata and webiopi at the same time.

read more

Motor control or servo control


I came across this circuit on google. It controls motor speed by simple flip-flop that gives a PWM signal.

The question is can this be used as a servo control ?

first use 5 volts supply instead of 12 volts ...then by replacing the 3RD NPN transistor with a servo. the + goes up, the - goes down and the signal feeds from the flip flop...can we do that ??

Motor control or servo control


I came across this circuit on google. It controls motor speed by simple flip-flop that gives a PWM signal.

The question is can this be used as a servo control ?

first use 5 volts supply instead of 12 volts ...then by replacing the 3RD NPN transistor with a servo. the + goes up, the - goes down and the signal feeds from the flip flop...can we do that ??

Hack Your Cat’s Brain to Hunt For Food

This cat feeder project by [Ben Millam] is fascinating. It all started when he read about a possible explanation for why house cats seem to needlessly explore the same areas around the home. One possibility is that the cat is practicing its mobile hunting skills. The cat is sniffing around, hoping to startle its prey and catch something for dinner. Unfortunately, house cats don’t often get to fulfill this primal desire. [Ben] thought about this problem and came up with a very interesting solution. One that involves hacking an electronic cat feeder, and also hacking his cat’s brain.

First thing’s first. Click past the break to take a look at the demo video and watch [Ben’s] cat hunt for prey. Then watch in amazement as the cat carries its bounty back to the cat feeder to exchange it for some real food.

[Ben] first thought about hiding bowls of food around the house for his cat to find, but he quickly dismissed this idea after imagining the future trails of ants he would have to deal with. He instead thought it would be better to hide some other object. An object that wouldn’t attract pests and also wouldn’t turn rancid over time. The problem is his cat would have to know to first retrieve the object, then return it to a specific place in order to receive food as a reward. That’s where the cat hacking comes in.

[Ben] started out by training his cat using the clicker method. After all, if the cat couldn’t be trained there was no use in building an elaborate feeding mechanism. He trained the cat to perform two separate behaviors, one tiny bit at a time. The first behavior was to teach the cat to pick up the ball. This behavior was broken down into six micro behaviors that would slowly be chained together.

  • Look at the ball
  • Approach the ball
  • Sniff the ball
  • Bite the ball
  • Pick up the ball
  • Pick up the ball and hold it for a few seconds

[Ben] would press on the clicker and reward his cat immediately upon seeing the desired step of each behavior. Once the cat would perform that step regularly, the reward was removed and only given to the cat if the next step in the chain was performed. Eventually, the cat learned the entire chain of steps, leading to the desired behavior.

Next, [Ben] had to teach his cat about the target area. This was a separately trained behavior that was broken down into the following three steps.

  • Look at the target area
  • Approach the target area
  • Sniff the target area

Once the cat learned both of these behaviors, [Ben] had to somehow link them together. This part took a little bit of luck and a lot of persistence. [Ben] would place the ball near the target area, but not too close. Then, he would reward his cat only when the cat picked up the ball and started moving closer to the target area. There is some risk here that if the cat doesn’t move toward the target area at all, you risk extinguishing the old behaviors and they will have to be learned all over again. Luckily, [Ben’s] cat was smart enough to figure it out.

With the cat properly trained, it was time to build the cat feeder. [Ben] used an off-the-shelf electronic feeder called Super Feeder as the base for his project. The feeder is controlled by a relay that is hooked up to an Arduino. The Arduino is also connected to an RFID reader. Each plastic ball has an RFID tag inside it. When the cat places the ball into the target area, the reader detects the presence of the ball and triggers the relay for a few seconds. The system also includes a 315MHz wireless receiver and remote control. This allows [Ben] to manually dispense some cat food should the need arise.

Now whenever the cat is hungry, it can use those primal instincts to hunt for food instead of just having it freely handed over.

[Thanks Dan]

Filed under: home hacks
Hack a Day 08 Aug 18:00
315mhz  arduino  ball  behavior  brain  cat  clicker  control  feeder  food  home  home hacks  hunt  kitten  learn  psychology  remote  rfid  tag  teach  training  

MT8870 DTMF - Dual Tone Multi Frequency Decoder

Project Description

We will be using an MT8870 DTMF module with an Arduino UNO to control a small servo motor in this project. The DTMF module gives the Arduino super-powers and allows you to control the Servo motor in so many ways. For example, this tutorial will show you how to control the servo motor using:
  • a YouTube Video
  • a voice recorder
  • A web application (Online tone generator)
  • A smart phone app (DTMF Pad)
  • A touch-tone phone to cell-phone call
All of these control methods will take advantage of the same exact Arduino code/sketch. But how???
The MT8870 DTMF decoder is quite a neat little module that allows you incorporate DTMF technology into your arduino projects. DTMF stands for Dual-Tone Multi-Frequency. DTMF tones are commonly associated with touch-tone phones and other telecommunication systems. When you press the number "1" on a touch-tone phone, two sine waves with frequencies: 697Hz and 1209Hz are combined to produce a unique DTMF signal which can be transmitted through the phone line. The MT8870 DTMF module can take this signal as an input, and decode it to produce a binary output.

The DTMF module does not care how you produce the DTMF tone. However, if it receives this tone, it will decode it. We can take advantage of this feature to supply the module with tones from different sources. The module has a 3.5mm port for line input. Providing you can connect your DTMF source to this line input in some way, it should work. I must warn you, however that this is a line input and NOT a microphone input. If you wanted to use a microphone, you will need to boost or amplify the signal before sending it to the DTMF module.
You will need the following parts for this project

Parts Required:

Software/Apps Required

Arduino Sketch

Upload the following sketch to the Arduino.

/* ================================================================================================================================================== Project: MT8870 DTMF Servo sketch Author: Scott C Created: 4th August 2015 Arduino IDE: 1.6.4 Website: Description: This project will allow you to control a Servo motor using an Arduino UNO and a MT8870 DTMF Module. The DTMF signal is received through the 3.5mm port of the DTMF module and is decoded. We will use the decoded output to control the position of the Servo. A SG-5010 Servo motor was used in this project. ===================================================================================================================================================== *///This sketch uses the Servo library that comes with the Arduino IDE #include <Servo.h> //Global variables----------------------------------------------------------------------------------------- Servo SG5010; // The SG5010 variable provides Servo functionality int servoPosition = 0; // The servoPosition variable will be used to set the position of the servo byte DTMFread; // The DTMFread variable will be used to interpret the output of the DTMF module. const int STQ = 3; // Attach DTMF Module STQ Pin to Arduino Digital Pin 3 const int Q4 = 4; // Attach DTMF Module Q4 Pin to Arduino Digital Pin 4 const int Q3 = 5; // Attach DTMF Module Q3 Pin to Arduino Digital Pin 5 const int Q2 = 6; // Attach DTMF Module Q2 Pin to Arduino Digital Pin 6 const int Q1 = 7; // Attach DTMF Module Q1 Pin to Arduino Digital Pin 7 /*========================================================================================================= setup() : will setup the Servo, and prepare the Arduino to receive the MT8700 DTMF module's output. ========================================================================================================== */void setup() { SG5010.attach(9); // The Servo signal cable will be attached to Arduino Digital Pin 9 SG5010.write(servoPosition); // Set the servo position to zero. //Setup the INPUT pins on the Arduino pinMode(STQ, INPUT); pinMode(Q4, INPUT); pinMode(Q3, INPUT); pinMode(Q2, INPUT); pinMode(Q1, INPUT);} /*========================================================================================================= loop() : Arduino will interpret the DTMF module output and position the Servo accordingly ========================================================================================================== */void loop() { if(digitalRead(STQ)==HIGH){ //When a DTMF tone is detected, STQ will read HIGH for the duration of the tone. DTMFread=0; if(digitalRead(Q1)==HIGH){ //If Q1 reads HIGH, then add 1 to the DTMFread variable DTMFread=DTMFread+1; } if(digitalRead(Q2)==HIGH){ //If Q2 reads HIGH, then add 2 to the DTMFread variable DTMFread=DTMFread+2; } if(digitalRead(Q3)==HIGH){ //If Q3 reads HIGH, then add 4 to the DTMFread variable DTMFread=DTMFread+4; } if(digitalRead(Q4)==HIGH){ //If Q4 reads HIGH, then add 8 to the DTMFread variable DTMFread=DTMFread+8; } servoPosition = DTMFread * 8.5; //Set the servoPosition varaible to the combined total of all the Q1 to Q4 readings. Multiply by 8.5 to amplify the servo rotation. } SG5010.write(servoPosition); //Set the servo's position according to the "servoPosition" variable. }


Fritzing Sketch

Connect the Arduino to the MT8870 DTMF module, and to a Servo.
Use the following Fritzing sketch as a guide.
(Click the image above to enlarge it)


You will need to connect a cable from the DTMF module's 3.5mm port to that of your smart phone, computer, voice recorder or any other DTMF source of your choice.


When you power up your Arduino, the Servo motor should turn all the way to the left to it's zero position. Once the DTMF module receives a DTMF signal, it will identify the relevant frequecies as described in the table at the beginning of this tutorial, and produce a binary like output. You will notice the DTMF module's onboard LEDs light up when a tone is detected. Onboard LED (D5) will turn on for the length of the DTMF tone it just received, and turn off when the tone has stopped. On the other hand, the onboard LEDs (D1 to D4) will light up depending on the tone received, and will remain lit until the module receives another tone. The onboard LEDs are a visual representation of the voltages applied to the DTMF module's pins (Q1 to Q4, and STQ). Q1 matches D1, Q2 matches D2 etc etc. and STQ matches D5.
You will notice that there are two STQ pins on the DTMF module. The STQ pin that is closest to Q4 will only go high when a DTMF tone is detected, and will remain high for the duration of the tone. The other STQ pin is the exact opposite. It will switch LOW when a tone is received and remain LOW for the duration of the tone. When there is no tone, this STQ pin will remain HIGH. The table below provides a summary of the DTMF module outputs, with a blue box representing a voltage applied to that pin (HIGH), whereas a black box indicates no voltage applied (LOW).

In order to follow this project, you need a source of DTMF tones. You can produce DTMF tones using a touch-tone phone, or through the use of a DTMF Pad app. If you are feeling creative, you can create a DTMF song/tune like the one I posted on YouTube. You can see the video below:

As you can see from the video, I also recorded the DTMF tune onto a voice recorder, and was able to control the servo that way. If you are not feeling creative, you can visit this website to create DTMF tones from your browser.

Concluding comments

This project was very fun, and shows some novel ways to control your Arduino. After completing the project, I realised that I could use this module to alert me when new emails or messages arrive on my phone or computer. If you have the ability to change the email or message notification sound to a DTMF tone, you should be able to get the module and Arduino to respond accordingly. Oh well, maybe I'll save that project for another day.
If this project helped you in anyway or if you use my code within your project, please let me know in the comments below. I would be interested to see what you did.

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.



However, if you do not have a google profile...
Feel free to share this page with your friends in any way you see fit.