View previous topic :: View next topic |
Author |
Message |
toto
|
Posted: Wed Sep 16, 2015 5:00 pm Post subject: sd card 5 meter away from microcontroler |
|
|
Hello,
How to conect a sd card 5 meter away from microcontroler?
Driver needed perhaps?
Anyone know what to do?
Thanks in advance
Best regards
toto
(BASCOM-AVR version : 2.0.7.8 , Latest : 2.0.7.8 ) |
|
Back to top |
|
|
Printpix52
Joined: 18 Jun 2014 Posts: 282 Location: D.F.
|
Posted: Wed Sep 16, 2015 5:42 pm Post subject: |
|
|
Hello!
With a wireless of nRF24L01
|
|
Back to top |
|
|
AdrianJ
Joined: 16 Jan 2006 Posts: 2483 Location: Queensland
|
Posted: Wed Sep 16, 2015 11:00 pm Post subject: |
|
|
Depends a lot on how fast you want to transmit the data. If you use standard SPI transfer system, with only MOSI and MISO, then there are only three high speed lines, those two and of course SCK. The CS can be relatively slow ( as long as it falls at the card before the data transfer actually starts ). Micros ( at least AVRs ) have possibility to control the SPI clock speed, so you can select initially a fairly low speed, get it running, and then try raising the speed to see when it fails.
AVT port drivers already have fairly high drive capability, I would not expect you would get much better unless you use something fairly exotic. But of course dont try to drive high capacitance lines, like eg shielded cable. CAT5 is probably as good as any, with the unused lines tied to ground. Putting each signal line on its own twisted pair, with the other line in that pair grounded sounds like a good idea.
I would not think that 5m should be much of a problem. USB does that, even USB3, and the timing and clocking is far more stringent there than with SPI.
Of course you could consider using differential drivers like RS485 on all of the CS, SCK, MOSI and MISO lines. That would almost certainly work, at a considerable increase in complexity.
One thing you MUST do though is provide a solid bypass cap ( probably something like 100uF low ESR electro + 100nf ceramic ) right at the card Vcc and Gnd lines. _________________ Adrian Jansen
Computer language is a framework for creativity |
|
Back to top |
|
|
toto
|
Posted: Thu Sep 17, 2015 5:10 pm Post subject: |
|
|
Thank you AdrianJ
Hello Printpix52,
Have you a idea how to use wireless the nRF24L01 to solve this issue?
A Schematic and a piece of code to see how it works?
Do you have maked it allready?
Best regards
toto |
|
Back to top |
|
|
njepsen
Joined: 13 Aug 2007 Posts: 469
|
Posted: Thu Sep 17, 2015 11:00 pm Post subject: |
|
|
I have used serial programming over 10m of ribbon cable with success. I had a board running in the workshop, and wanted to
reprogam it from the PC in my office, so used a 10m length of ribbon cable and it worked fine. Programmed was ebud. _________________ Neil |
|
Back to top |
|
|
JC
Joined: 15 Dec 2007 Posts: 585 Location: Cleveland, OH
|
Posted: Sat Sep 19, 2015 4:47 am Post subject: |
|
|
If you decide to use the RF link, then you really need a micro at the far end with the SD card.
RF links have a lot of noise, and data errors.
The micro at the far end needs to check the data integrity, using a Check Sum, or CRC, or error correcting packet transmissions, etc.
Just sending the data over the RF link, and directly to the SD card without a micro and data validation will not work well.
JC |
|
Back to top |
|
|
njepsen
Joined: 13 Aug 2007 Posts: 469
|
Posted: Sat Sep 19, 2015 6:48 am Post subject: |
|
|
One of my projects sends a 170k file over the cellular network and I use a crc16 check at the receiving end, with great success. I, like post the function I use tomorrow. _________________ Neil |
|
Back to top |
|
|
toto
|
Posted: Sat Sep 19, 2015 11:53 am Post subject: |
|
|
Hello njepsen,
That is a good solutions for me to. Can you send me more information about your celular network project, like schematic and Bascom code that i can learn from it?
hdsdorion@gmail.com
Thank you
Best regards
toto |
|
Back to top |
|
|
|