Offline
Newbie
Karma: 0
Posts: 8
|
 |
« on: November 14, 2012, 06:14:46 am » |
Ok, first post ever on this forum. Please be nice. I am using one of these cheap rf modules: http://www.ebay.com/itm/1pcs-RF-transmitter-and-receiver-kit-for-Arduino-project-433Mhz-/370687915310?pt=LH_DefaultDomain_0&hash=item564eb8b52ei have everything working just fine and dandy on my uno. But I want to use the receiver with an atmega8 on a breadboard. I uploaded the sketch and it works fine. Then I tried unplugging it from the usb and using a 6v power supply (4 AA battery pack). Now it doesn't work. Then I tried 2 2032 coin cell batteries. Then it worked again! I assume it has something to do with the voltage or current, but frankly, i have a really bad grasp of all of that. The specs for the receiver say it uses 5v, but then why do the coin cells work? I tried different resistors between the battery and the VCC pin on the receiver, but no luck. (and yes, the AA batteries were fresh and working). Any thoughts?
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Edison Member
Karma: 51
Posts: 2477
What a host of balls she had seen: gaity, the brass buttons...
|
 |
« Reply #1 on: November 14, 2012, 06:23:49 am » |
Can you post a schematic of your circuit so we can see how things are connected up?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 8
|
 |
« Reply #2 on: November 14, 2012, 02:59:44 pm » |
not much to show, but i attached an image anyways.
It's just the rf receiver connected directly to voltage, a digital pin on the microcontroller, and ground.
Like i said, everything works fine on usb power (through the FTDI bridge i use to upload sketches) and from the 2032 coin cells.
thank you.
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Edison Member
Karma: 51
Posts: 2477
What a host of balls she had seen: gaity, the brass buttons...
|
 |
« Reply #3 on: November 14, 2012, 03:10:25 pm » |
That can't be the whole circuit - there's components missing.
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 282
Posts: 15443
Measurement changes behavior
|
 |
« Reply #4 on: November 14, 2012, 03:13:34 pm » |
Yes the mega8 needs more stuff to work then what you show, what is the clock source for the chip? How did you load the sketch into the mega8?
Lefty
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 8
|
 |
« Reply #5 on: November 14, 2012, 03:52:06 pm » |
i'm using this: http://cal-eng.com/?wpsc-product=atmega8_8mhzSo, really, that's the whole circuit (minus the led i use to indicate that a message is received) When I upload sketches, I connect this: http://cal-eng.com/?wpsc-product=ftdibridge-usb-serial-transceiverBut after that, I take it out and am left with a very simple circuit. Like I said, it works with the coin cell batteries. I had it sitting on one side of the room, by itself, blinking every time it received a message from the transmitter on the other side of the room. I just don't want to rely on those small (and expensive) batteries for this project, and I'd like to understand what's happening so I can apply the knowledge to future endeavors for ever and ever.
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Edison Member
Karma: 51
Posts: 2477
What a host of balls she had seen: gaity, the brass buttons...
|
 |
« Reply #6 on: November 14, 2012, 05:01:07 pm » |
My guess is that the coin cells have a lower internal resistance than the AA batteries, and thus can react to transients much faster, compensating for your lack of decoupling capacitors.
|
|
|
|
|
Logged
|
|
|
|
|
Värmland, Sweden
Offline
Full Member
Karma: 8
Posts: 243
|
 |
« Reply #7 on: November 14, 2012, 05:20:32 pm » |
In addition to decoupling caps you should add a pull-up resistor on the reset pin.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 8
|
 |
« Reply #8 on: November 14, 2012, 05:49:56 pm » |
Majenko: can you explain decoupling caps? What capacitors should i use? Where do I put them?
Perhof: I use a pull-up resistor on the reset pin when I'm connected tot he usb module for uploading code. Why would I need it during regular, stand-alone use, and how would it help me problem?
|
|
|
|
|
Logged
|
|
|
|
|
Värmland, Sweden
Offline
Full Member
Karma: 8
Posts: 243
|
 |
« Reply #9 on: November 14, 2012, 05:53:46 pm » |
Leaving the reset pin unconnected leaves it floating. The result could be random or continuous resets.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 8
|
 |
« Reply #10 on: November 14, 2012, 06:08:16 pm » |
ok. What resistor should i use and where should i put it (from reset to...)?
Just to be clear- this simple setup has worked for me for other things- with the AA batteries, and no caps or resistors. Which leads me to assume that the problem is something specific to using the rf receiver.
|
|
|
|
|
Logged
|
|
|
|
|
Australia
Offline
Full Member
Karma: 6
Posts: 216
|
 |
« Reply #11 on: November 14, 2012, 06:17:18 pm » |
The problem is the 433 Mhz receiver, they are very critical on supply voltage. They need 5V plus or minus 0.5 V. They wont work on 6V. The reason most likley that the coin cells work, is that they arnt designed for delivering much current, so its likley the current the Mega8 is pulling is causing the cell voltage to droop a bit. If you want they system to be reliable its best to run the receiver off 5 V regulated.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 8
|
 |
« Reply #12 on: November 14, 2012, 06:52:04 pm » |
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Edison Member
Karma: 51
Posts: 2477
What a host of balls she had seen: gaity, the brass buttons...
|
 |
« Reply #13 on: November 14, 2012, 06:56:25 pm » |
Not unless you want to add another battery.
The dropout voltage on one of those would put the incoming voltage at over 7V to get a 5V output.
To continue running from 6V you need a low dropout regulator.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 8
|
 |
« Reply #14 on: November 14, 2012, 07:06:10 pm » |
Ok, so I can use a 9v battery then, right?
|
|
|
|
|
Logged
|
|
|
|
|
|