Jump to content

Help wit Arduino (asap)

Doughnutnator

Hi! I want to make a simple project:

- An Arduino with a RFID Module that detects a tag and plays a sound when it detects it.

 

As far as I know, I need to connect to the Arduino:

- SD Card Reader

- RFID Module

- Headphone jack (to connect speakers)

 

I don't know if I'm going to run out of pins or something like that. Any other suggestions? It's my first time doing these, it's a school project and I have no idea.

 

Thanks  :)

Link to comment
Share on other sites

Link to post
Share on other sites

 

Hi! I want to make a simple project:

- An Arduino with a RFID Module that detects a tag and plays a sound when it detects it.

 

As far as I know, I need to connect to the Arduino:

- SD Card Reader

- RFID Module

- Headphone jack (to connect speakers)

 

I don't know if I'm going to run out of pins or something like that. Any other suggestions? It's my first time doing these, it's a school project and I have no idea.

 

Thanks  :)

 

What Arduino are you using? I'm assuming an Uno, but I could be wrong.

Link to comment
Share on other sites

Link to post
Share on other sites

What Arduino are you using? I'm assuming an Uno, but I could be wrong.

Yes (a generic one, my team is kinda greedy)

 

These parts:

 

Arduino (generic one, UNO R3 compatible)

https://hetpro-store.com/compra-ouno-arduino-compatible/

 

Wave Shield SD module

https://hetpro-store.com/wave-shield-con-sd/

 

And a basic RFID-RC522.

 

Do you think it will work?

Link to comment
Share on other sites

Link to post
Share on other sites

Just noticed that you posted this a bit ago. Might as well start on my answer. ^_^

 

First off, audio on an Arduino can either be really easy or really hard depending on what type of sound you want to make. Looking at your parts list, it looks like you want to load audio files from an SD card and then play them on the Arduino. Is that correct? If it is the case, congratulations! You have chosen the hard way. At least, you have if you are doing it from scratch. If you're not bent on making the audio component yourself there are some great shields you can use that give you a nice library and all the hardware you'll need. One of my favorites can be found here.

 

If you want to do more simple sounds you can use tone() or analogWrite() to specify a frequency for your speaker to output at. There are a ton of awesome guides that can walk you through how to use these functions, and even give you a list of frequencies that correspond to notes.

 

As for RFID, I would recommend that you use an RFID shield. A great one can be found here.

 

These parts should be able to work together on an Uno. Just make sure you have stackable headers for the RFID shield to make it easier on yourself!

 

Let me know if you need any help or have any questions!

 

~Cheers!

 

Edit: Started before I saw the last post one sec.

Link to comment
Share on other sites

Link to post
Share on other sites

Just noticed that you posted this a bit ago. Might as well start on my answer. ^_^

 

First off, audio on an Arduino can either be really easy or really hard depending on what type of sound you want to make. Looking at your parts list, it looks like you want to load audio files from an SD card and then play them on the Arduino. Is that correct? If it is the case, congratulations! You have chosen the hard way. At least, you have if you are doing it from scratch. If you're not bent on making the audio component yourself there are some great shields you can use that give you a nice library and all the hardware you'll need. One of my favorites can be found here.

 

If you want to do more simple sounds you can use tone() or analogWrite() to specify a frequency for your speaker to output at. There are a ton of awesome guides that can walk you through how to use these functions, and even give you a list of frequencies that correspond to notes.

 

As for RFID, I would recommend that you use an RFID shield. A great one can be found here.

 

These parts should be able to work together on an Uno. Just make sure you have stackable headers for the RFID shield to make it easier on yourself!

 

Let me know if you need any help or have any questions!

 

~Cheers!

 

Edit: Started before I saw the last post one sec.

Thanks!

 

I want to play an audio file (mp3 or wav). It seems that if I use the shield I posted it will work. But tbh I don't know.

 

Using shields is better? Can I "stack them" and they will communicate with the Arduino?

 

Like

 

Wave Shield with SD (Audio)

RFID Shield

Arduino

 

Is it too hard to program?

Link to comment
Share on other sites

Link to post
Share on other sites

Yes (a generic one, my team is kinda greedy)

 

These parts:

 

Arduino (generic one, UNO R3 compatible)

https://hetpro-store.com/compra-ouno-arduino-compatible/

 

Wave Shield SD module

https://hetpro-store.com/wave-shield-con-sd/

 

And a basic RFID-RC522.

 

Do you think it will work?

 

It should work, but are you using a breakout with supporting hardware or just purchasing the RC522 chip?

Link to comment
Share on other sites

Link to post
Share on other sites

It should work, but do any of you have any prior experience with electrical engineering or computer science? Most specifically in using I2C?

Nope... I can get the Adafruit RFID Shield, I don't know if I can connect the wave shield on top of that.

Any tips? I can't really change the project now.

 

Now I know that it's harder that I thought, do I have to solder something?

 

EDIT: https://hetpro-store.com/shield-rfid-nfc-lector-pn532/

 

AFAIK it's the same as the Adafruit shield, but I don't know if I have to solder something, same case with the Wave Shield

 

I just plug them in to the arduino and start programming? Or there's something more?

Do you recommend the "generic" Arduino or spend a few bucks more and use the original one?

Link to comment
Share on other sites

Link to post
Share on other sites

Nope... I can get the Adafruit RFID Shield, I don't know if I can connect the wave shield on top of that.

Any tips? I can't really change the project now.

 

Now I know that it's harder that I thought, do I have to solder something?

 

EDIT: https://hetpro-store.com/shield-rfid-nfc-lector-pn532/

 

AFAIK it's the same as the Adafruit shield, but I don't know if I have to solder something, same case with the Wave Shield

 

I just plug them in to the arduino and start programming? Or there's something more?

Do you recommend the "generic" Arduino or spend a few bucks more and use the original one?

First off, my last question may have been a bit intimidating. Me being me, I assumed you were just going to purchase an RC522 chip. If you get a breakout there are plenty of libraries available for you to use with it, along with prebuilt hardware. The shield you just linked will also work. Looking at the documentation for both an RC522 and the audio shield you sent to me they want to use the same pins. (8-13 and SDA for the audio and 9 - 13 or 9,10, and ICSP 1, 3, and 4 for the RFID). You can change these around and make it work, but out of the gate, it will not work on an Uno.

 

You probably will have to solder, nothing complex though just header pins.

 

That's really all there is to it!

 

I actually like the generic Arduinos. Usually they work as advertised and are fairly reliable, only problem is that you may need a different USB driver to interface with them.

Link to comment
Share on other sites

Link to post
Share on other sites

First off, my last question may have been a bit intimidating. Me being me, I assumed you were just going to purchase an RC522 chip. If you get a breakout there are plenty of libraries available for you to use with it, along with prebuilt hardware. The shield you just linked will also work. Looking at the documentation for both an RC522 and the audio shield you sent to me they want to use the same pins. (8-13 and SDA for the audio and 9 - 13 or 9,10, and ICSP 1, 3, and 4 for the RFID). You can change these around and make it work, but out of the gate, it will not work on an Uno.

 

You probably will have to solder, nothing complex though just header pins.

 

That's really all there is to it!

 

I actually like the generic Arduinos. Usually they work as advertised and are fairly reliable, only problem is that you may need a different USB driver to interface with them.

Thank you! 

What if I use the other shield? (The PN532) that is "stackable"? 

 

It seems that it's better because the final product would be smaller, and the antenna is bigger.

 

Would that work with a UNO generic board?

Like

 

Wave shield

PN532 RFID

Generic Arduino?

 

Where can I find more info? Saw this video: 

 

Exactly what I want to do, but I can't get the Adafruit Wave shield in my country (shield is the same as the one I can get, PN532.

Thoughts?

Link to comment
Share on other sites

Link to post
Share on other sites

You could play the audio file out over PWM if it's easier. I think if you do a software PWM it is possible to get a 44.1kHz sample frequency.

It's only 8-bit (IIRC)... but it doesn't sound like high fidelity is too important. Though, perhaps I misunderstood.

Just map your 16-bit samples down to an 8-bit space, by doing an 8-bit shift to the right to chop off the least significant bits, and write them out to your PWM.

Depends what you want to do though, I guess.
 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×