Pages: [1]   Go Down
Author Topic: New to Arduino - Twitter to Motor Project. Please Help  (Read 213 times)
0 Members and 1 Guest are viewing this topic.
Melbourne, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone,

I'm new to Arduino, I have next to no experience, so this project might be a bit much, but what the hell hey!

I am wanting to do an installation for a graduate exhibition. My idea was to have a Jack in the Box powered by an electric motor which would run once a tweet was received (#tag or @).

So, just to break in down, someone standing at my stand at the exhibition is encouraged to send a tweet, this tweet would run a motor which would turn the Jack in the Box, then pop!

I currently have an UNO and a Motor Shield. I was planning on using my iPhone as the link between the tweet and the Arduino (Would that be good idea?)

I guess I am stuck at what would be the best way to do this project? In particular the tweet part. Would a bluetooth shield be best? Or is there a way to connect my iphone to the Arduino via usb?
Another cheat way I was thinking was having a tweet push notification (iPhone vibrates) which would engage an Arduino sensor to run the motor?
Another issue is the time between sending a tweet and the Arduino receiving it. (Can't really have someone standing there waiting for something to happen...)

Any advice or information would be greatly appreciated!!!

Thanks
Aaron
Logged

Melbourne. Australia
Offline Offline
God Member
*****
Karma: 27
Posts: 867
Freelance software and hardware development based in Melbourne Australia
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have seen code that used to be able to send a Tweet from an Arduino, but I'm not sure if the library still works or whether it supports Push Notification style reception of Tweets.
So although this would be a really neat solution, i.e no external devices, I'd say it would a  risky thing to spend time on.

Using your phone to receive the tweets sounds a better suggestion. Could you get the phone to make a sound e.g. though the headphones as well as vibrate, I guess this depends on the twitter client you are using, or what type of phone you have etc, i.e iPhone or Android.
If you can output sound if you get a tweet, it would be dead easy to feed that sound either into a digital input on the Arduino to trigger an interrupt or into an analogue input where you'd need to constantly poll the analogue input looking for variations in the input voltage.

If there aren't any twitter clients that make a sound as well as vibrate, you could look around for an open source twitter client that you could modify (e.g. possibly https://code.google.com/p/twimight/), either to make a sound, or send data via bluetooth to the Arduino.

So just finding a twitter client that makes noises though the headphones connection is probably your best bet.
Logged

Melbourne, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Roger, thanks for the reply.

Yeah, I think using the phone as the tweet receiver is the way to go. Probably the quickest way to receive a tweet anyway yeah?
So as far as receiving a tweet from an iPhone, it will vibrate and make a noise. So I was thinking of using a vibration sensor or some sort of mic sensor. Any idea on what would work best? Also, stupid question, how do these sensor connect to the system? Is it attached to the UNO, or do they have there own shield like the motor does?

Thanks again,

Aaron

Logged

Melbourne, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry again Roger, but I see you're from Melbourne, can you suggest any good shops or local online shops for buying parts and what not...

Cheers!

Aaron
Logged

Melbourne. Australia
Offline Offline
God Member
*****
Karma: 27
Posts: 867
Freelance software and hardware development based in Melbourne Australia
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Jaycar.com.au

Where are you. They have a store in just north of the CBD and in Moorabbin, and I think Dandenong amongst other places
Logged

Melbourne, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Cool. Yeah, i'm in the north west, so I could pop into the coburg store.

Thanks again.
Logged

Melbourne. Australia
Offline Offline
God Member
*****
Karma: 27
Posts: 867
Freelance software and hardware development based in Melbourne Australia
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Aaron

Jaycar sell several sorts of mic, but I think you may need to build a small amplifier as the signals from the mics are normally very small.

The problem with using a regular mic is its not designed to pick up vibration.

Believe it or not you may be better off attaching a small speaker to your phone.
Possibly this one http://www.jaycar.com.au/productView.asp?ID=AS3004

I'd try doing something like placing the speaker face upwards on a table, then put something on the middle of the cone of the speaker, e.g. something the shape of a cotton reel, then placing the phone on the top of the cotton reel.

Then, when the phone buzzes, it would shake the center of the speaker but not the outside, and the movement would induce a signal in the coil in the speaker, which could then be amplified and sent to the Arduino.

You may not even need to amplifiy it.

I'll see if I can find an old speaker in my box of salvaged parts and see if it works ;-)

BTW. What exhibition are you doing ?



Logged

Melbourne. Australia
Offline Offline
God Member
*****
Karma: 27
Posts: 867
Freelance software and hardware development based in Melbourne Australia
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Aaron

Just as a matter of interest, I attached a small speaker between the 3.3V and the A0 input to the Arduino, then rested my phone on a piece of plastic on the center of the speaker, and measured analogue input.

But there isnt quite enough signal being generated by the speaker to be usable.

but it looks like with a small amount of amplification, it would probably work as a detector.

However one thing that I think may be a problem is that as you are sensing vibration, it will sense any form of vibration not just the phone, so it could get interference from other sounds in the room :-(

This may or may not be a serious issue, I'm not sure.

It would be better if the twitter app on your iPhone could make a sound as well as use the buzzer, as this would be easy to detect as you could connect the jack socket from the phone to the Arduino via a capacitor

Logged

Melbourne, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey Roger, sorry for the delay in response, I got crook last week! Last thing I needed haha!

I didn't think of connecting the jack socket straight to the Arduino! that's an awesome idea. Yeah, I think sound straight to the Arduino would be best. Ambient noise or vibration could mess with the installation.
I am hopefully seeing someone tomorrow at RMIT who could give me a hand. But I'm running out of time as the exhibition is on thursday. Damn flu has thrown a spanner in the works.

Oh, it's for a digital design short course I did, hence the twitter component is fairly critical.

here is a pretty powerful example of how the digital and physical (motor, gears, levers) world can work:
https://www.youtube.com/watch?v=afR-7F31Tco

Cheers Roger, appreciate your help mate!

Aaron
Logged

Melbourne. Australia
Offline Offline
God Member
*****
Karma: 27
Posts: 867
Freelance software and hardware development based in Melbourne Australia
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Aaron,

No worries.

If you are connecting the headphones jack to the Arduino, put a capacitor on the input to the analogue pin to save any harm to the Arduino, some people also recommend a diode (you can get all that stuff at Jaycar) for a few dollars.

I normally just cut up old broken headphones to get a jack and a cable ;-)

Logged

Pages: [1]   Go Up
Jump to: