0
Offline
Jr. Member
Karma: 2
Posts: 80
Arduino rocks
|
 |
« on: July 14, 2011, 04:34:26 pm » |
Hi,
Im testing the Sparkfun Si4735 AM.FM radio shield with Arduino and the Si4735 library on Diecimila and Duemilanova. The example sketches work fine and the radio is controlled as expected.
However, I am now trying to use the getResponse command to retrieve data from the radio. For example to get the current FM frequency and RSSI, using code like this:
char response[16];
radio.sendCommand("2200"); radio.getResponse(response);
however instead of getting the expected response data, I usually get all 0s in the response. Very occasionally there will be some data but it is inconsistent and different every time. Looks like the SPI read from GPO1 is not working as expected. When I look at the output of the GPO1 during these queries I can see there is consistent data at 3.3V coming from the radio.
Could this be due to the fact the radio is a 3.3V part (GPO1 is 3.3V output) but the Arduino input is 5v? Has anyone had success using the Si4735 with a 5V Arduino? With a 3.3V arduino?
Cheers.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 2
Posts: 80
Arduino rocks
|
 |
« Reply #1 on: July 14, 2011, 05:29:14 pm » |
To answer my own question, yes this is due to the 3.3V output from the Si4735 being incompatible with a 5V Arduino like Duemilanove and Diecimila
Adding a silicon diode in the D12-GPO1 line on the shield like this:
D12 ----->|-- GPO1
(this involves cutting the existing track on the shield) shifts the voltage seen by the Arduino up by 0.6 V, allowing the SPI reads to work correctly. Now getting consistent reads using getResponse().
Interested if this is needed with a 3.3V Arduino. Probably not?
Cheers.
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Offline
Brattain Member
Karma: 336
Posts: 36476
Seattle, WA USA
|
 |
« Reply #2 on: July 14, 2011, 05:33:02 pm » |
Adding a silicon diode in the D12-GPO1 line on the shield like this:
D12 ----->|-- GPO1
(this involves cutting the existing track on the shield) shifts the voltage seen by the Arduino up by 0.6 V, allowing the SPI reads to work correctly. How does adding a diode increase the voltage? Usually, adding a diode results in a voltage drop.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 2
Posts: 80
Arduino rocks
|
 |
« Reply #3 on: July 14, 2011, 06:08:34 pm » |
The Arduino is configured with a pullup on D12. So while GPO1 varies between 0 and 3V, the voltage seen by the Arduino varies between 0.6 and 3.6 V The diode acts like a voltage shifter.
Cheers.
|
|
|
|
|
Logged
|
|
|
|
|
São Paulo/SP/Brazil
Offline
Sr. Member
Karma: 2
Posts: 293
Brazilian Arduino Team
|
 |
« Reply #4 on: July 17, 2011, 12:10:02 am » |
The Arduino is configured with a pullup on D12. So while GPO1 varies between 0 and 3V, the voltage seen by the Arduino varies between 0.6 and 3.6 V The diode acts like a voltage shifter.
Cheers.
did you test this and it works? I'm asking because this is a big FAIL from sparkfun. Even on my 3.3 xbee rx/tx I add a transistor and 4 resistors to make a "poor but works" level shifting. It's a single pin.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 2
Posts: 80
Arduino rocks
|
 |
« Reply #5 on: July 17, 2011, 01:13:42 am » |
Yes, tested and working. Yes, its disappointing that the board did not work reliably with common Arduinos.
|
|
|
|
|
Logged
|
|
|
|
|
São Paulo/SP/Brazil
Offline
Sr. Member
Karma: 2
Posts: 293
Brazilian Arduino Team
|
 |
« Reply #6 on: July 18, 2011, 03:07:56 pm » |
Is it possible to you send a picture of what you done to your shield?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 2
Posts: 80
Arduino rocks
|
 |
« Reply #7 on: July 18, 2011, 04:23:10 pm » |
ok, attached
|
|
|
|
|
Logged
|
|
|
|
|
São Paulo/SP/Brazil
Offline
Sr. Member
Karma: 2
Posts: 293
Brazilian Arduino Team
|
 |
« Reply #8 on: July 26, 2011, 10:18:00 pm » |
do you know what's the diode are you using?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 2
Posts: 80
Arduino rocks
|
 |
« Reply #9 on: July 26, 2011, 10:27:59 pm » |
Ordinary silicon diode like 1N4148.
Cheers.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 10
|
 |
« Reply #10 on: October 27, 2012, 05:49:06 am » |
Hello, i tried the diode solution with the same exact component, but i still get only zeroes. Do you have further suggestions?
thanks
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 3
|
 |
« Reply #11 on: November 02, 2012, 01:54:18 pm » |
I did the diode mod but get not response from si4735. Else is working, tune etc. I am using Mega. D12 is wired to Arduino pin 50. (Diode is on that wire) All respose I get is 0. Same even if I disconnect pin 50 from D12  Sometimes it has been F or FFFFF... also. So D12 should have pullup resistor on...but when I measure voltage of pin 50, it is about zero. It seems to be 5 volt short time after reset, but then it sets to 0v. If I understand right, it should stay at 5v, right? Any Ideas? Tarmo ps. Here is picture of my si4735 radio.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 2
Posts: 80
Arduino rocks
|
 |
« Reply #12 on: November 02, 2012, 06:27:12 pm » |
I didnt test with Mega, so Your Mileage May Vary.
If you are using Mega, MISO is on D50, not D12. You should not connect MISO to D12. You shold not conect D50 to D12.
I would guess you should have:
D50 ----------->|----------------- GPO1 1N4148
maybe you need a pullup resistor with Mega?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #13 on: November 03, 2012, 01:43:37 pm » |
did you test this and it works? I have tested it for other applications and it worked wonderfully. Unlikely the poster, I liked to use two diodes, or sometimes an led for this. Worked every time.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 3
|
 |
« Reply #14 on: November 03, 2012, 03:03:11 pm » |
Mikem, sorry my fuzzy explanation. My wiring is exactly as you suggest. I am sure mod is basicly working, but there is something odd in pullup in pin 50 at Mega. Or maybie not odd, only something I dont know  If I put digitalWrite(50, HIGH); at my code, I can measure +5v at pin 50. And I have constant Y response in radio sketch. So hardware seems to be ok. I think I have read somebody else complaining also, that this shield is working at Uno but not Mega, but I dont remember exactly that post.
|
|
|
|
|
Logged
|
|
|
|
|
|