Arduino - hacking a micro SD card reader data logger to connect with another SPI device nRF24L01

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello today i want to talk to you about this module here this is a micro sd card reader so this here is actually the micro sd card reader itself here's a micro sd card similar to what you would stick in an android phone but often what these are used for is to connect to an arduino and if you have sensors connected to this and you wanted to save that data from the sensors you can write it to a micro sd card and so you need a module like this now the arduino they typically run on 5 volts so these pins are 5 volts but this reader actually runs on 3.3 volts and if you give it 5 volts you would actually damage it so this module here is made to help interface these together so if you connected 5 volts from the arduino to the vcc pin of this module there's actually a voltage regulator here to convert it to 3.3 volts so you can power the reader without damaging it this module uses the spi serial peripheral interface so these are the data pins so miso mosi sck and css chip select which the arduino then tells it that this is the device it wants to communicate to or take data from however the data lines they also need to be converted to 3.3 volts otherwise again you will damage this so this module has this chip here which if you look at that it is [Music] lvc125a and i had to google that and it is a see if you can see that there a quadruple bus buffer gate but basically what that does is this chip converts the signals uh from 5 volts to 3.3 and then from 3.3 to 5 volts and so that's how this works now because this is the spi uh bus you should be able to actually connect more than one device using the same communication protocol to the arduino so this is a an rf24l01 it's a radio transceiver so you can send signals through the air but it also has a serial clock sek a miso and a mosi pin and so theoretically you should be able to connect both of these to the arduino at the same time and and use both of them however the problem is that this this chip here doesn't turn off the miso line when this is not in use and so then when you go to use the radio transceiver it actually doesn't work because this line isn't turned off when this is not being used so let me show you what i mean so this uh it has eight pins and i made an adapter for it so this is it here so it kind of plugs in there um and then if i get another arduino here so it doesn't matter which one but um so i've made this adapter so i can plug it right into the breadboard like that now i'm going to use the radial radiohead library so it has example code to run this radio transceiver the radiohead library typically uses pins 8 and 10. for its uh ce and csk pins and then you'll see these blue jumpers so these blue jumpers are here to actually connect the sck the mostly in the miso pins from the transceiver to the microsd card the reader so let me plug those in there so now electrically the two sck pins are connected the two mosi pins are connected and then two miso pins are connected so let's finish off the connections here so this red is from the vcc to the positive bus so let's connect that so the positive bus here goes to the 5 volts on the arduino so there's the in ground ground there here 5 volts and then this brown jumper goes to the negative rail and same as for the transceiver right then they're both connected to the negative rail so let's connect the negative rail to the ground okay and then this this wire here connected to the adapter is for 3.3 volts of the radio transceiver so i'm going to connect that to the 3.3 volt on the arduino then for the spi communication the sck is the serial clock that goes to pin 13. so here's 10 11 12 13. next here is mosi so mosi goes to pin 11 so it's not in order actually it goes to pin 11 and then the miso connects to pin 12. and then like actually let me change sorry let me change this min i have a this is a same it's just shorter i'm gonna connect that there ground to the negative rail and then this cs pin the chip select pin so in the sd library that comes with your arduino there's an example uh code example sketches for one of these and it uses pin four for cs so let's use pin force of zero one two three four zero one two three four okay so now both of these the radial transceiver and the micro sd card are connected to the arduino both using the spi interface so now if i connect this to my computer so theoretically both should be able to work in the same sketch in the same program but to keep this simple i'm going to just load up the example sketch for the radio transceiver so if we go to the computer so this is it here but it uses there this comes from the radiohead library so if you go online you can find the radiohead library where is it here here's radiohead there's lots of different transceivers that use this but here this is for the nrf24 so these are the example sketches for the nrf24l01 so the same radio transceiver that i have plugged in and i actually have another uno an arduino running this sketch here this is the reliable datagram client sketch so it's sending out signals right now and then this sketch here is what i have open the the server sketch reliable datagram server so that's this one here so i'm this has nothing to do with a micro sd card but i just want to show you that so it's uno and it's this one here if i upload this now to the board so it's uh compiling now it's uploading now it's done uploading so now if i open the serial monitor you'll see it says init failed and so what this means is that the sketch tried to initialize the nrf24l01 but it failed it didn't work and that's because again the the miso pin of the microsd card reader is not turning off so for example if i just unplug this take it right out again with these blue lines these blue jumpers the sbi communication lines are still connected to the arduino even though this is taken out and if i just hit reset and if i go back to the computer there if i just hit reset you'll see right away it says hello world so this is in the example if you know the radiohead example this is the signal coming from the other arduino so that tells me that this nrf24l01 transceiver is working it just doesn't work when the microsd card is also connected so if we go to the computer so this is card info so if you if you it comes with the arduino ide if you go open examples whoops examples here's the sd library that comes with the arduino ide there is one called card info and so that's this one oops that's this sketch here so if i upload this to the arduino again it has nothing to do with the radio transceiver it just actually runs the micro sd card reader so i'm copying over this other one in the arduino and it's done uploading so if i open it so i just wanted to show you that this is the data you know the information pulled off the card so it the micro sd card reader does actually work it just doesn't let the radio transceiver work so what i plan to do then is to to basically run the miso line directly to the micro sd card reader and not through this chip and we can do that because the signal comes out is 3.3 volts but the arduino can accept 3.3 volts in the signal into it from this chip and that's high enough in that that the spi communication will work so to disconnect this pin from this chip here i'm gonna actually cut the tracing i can actually drill a hole through the board so if you look here so here's the miso pin there's a tracing here that runs a little bit to the right here and then it comes up the board this way here and then if you turn the board over this is it here as it then connects to our buffer so i want to break that connection the other thing i want to point out is there is a tracing that comes across the board here and comes up it has nothing to do with this miso line but i don't want to damage that right so it's here along the i and the o here so what i plan to do then is to actually take a drill and actually drill a hole close to where this o is right there right through the board and that will break that that communication to that chip the other thing is this uh the pin here is actually the third one over from the right is the pin that ultimately connects to the miso line and what i've found is that pin actually so here's my here's my uh multimeter and if i put it to continuity sorry the connections so i put the continuity i've found that that third pin there connects to this resistor right let me focus that there this resistor right here in the middle right there so this is uh c1 and then in between here there's a resistor so that's what i want to remove i think it's labeled r4 here so if i remove that then that will remove the connection from the the actual reader to this chip and so by running a wire directly from that third pin over from the right directly right on top of the board here right to this pin then this will allow the micro sd card reader to communicate with the arduino without going through this this buffer chip okay so that's what i plan to do so right now my my soldering iron's heating up so let's start with the drilling since that's still heating up so again i want to actually go through the the tracing from the miso pin but i don't want to disrupt this other line going across so let's just find a spot right there start it i don't know if you can see that there so just like that and then what i should have done before this video was actually tr show you where this pin actually connects i actually traced it out it connects to so this this chip here it starts this is pin one of this chip and it goes down i think there's seven here and then it comes up this side and so it's actually the third or fourth one over from this side here that it connects to and so by drilling this hole then that through yet it's not through yet by drilling this hole this is not this way it's it's not this is not in tight enough so by drilling this hole i can then double check that connection to see if it's actually disrupted i think my drill is getting a little dull here it's getting there it might actually be enough but well here let's try it actually let's see if that's enough my iron is smoking there let me see so there's continuity let's just test it okay so sorry you can't see what i'm doing here so if i touch the miso line here there is no connection here anymore so that hole that i drilled was enough okay so that's good i didn't go all the way through but but that was enough to break that connection so let me just clean my my tip here and just tin the end so the hardest thing now is actually going to be to get the to get that wire onto that tiny little spot there the easier thing though is to remove this so let's do that first so let me just show you there it's the one the one in the middle here that i want to remove okay so let's just remove that i just lift it off and even if i just pull it off here there there it is there right so now you'll see here is where that resistor was and now it's gone so now that third pin from the right there that third pin from the right there is no no longer connected to this chip so the last thing to do here is to connect that pin right to the miso here so this is probably the hardest part because these these pins are so close together so let me just see if this will remove the end there just a tiny bit maybe a little bit more so actually i got this from amazon it looks like a toy it's kind of plasticky but it works okay though it pulled off a little bit i think it's too small of a let's take a bigger chunk out okay and so there's the end i don't need that much so let me just trim that off okay so just a tiny bit now i think the best thing to do would be to just tin it a little bit so just for the sake of the video whoop let me just put that in there find where i put my solder and then just tin a little bit okay not too much because again these pins are very close together and so now it's a little bit hard because of the cameras in the way but it's going to be the third pin there so i shouldn't take much heat it's not that cool no i didn't think let me try adding a little bit more solder to the end of this take off the excess off the tip and let's try it again the problem is right now it's kind of bent down so let's just bend that the right way just trying to bend it a little bit see if that cools there that's pretty good right it's stuck on there so you may want to actually eventually put something around here to kind of hold that in place so that doesn't pull off but that's what i wanted there now i want this pin to connect to the miso so i just want to mark here this basically where i want to cut the insulation i want to cut it right about here i'm just putting in a mark i'm not cutting it and then take some off here let's try our little gadget again actually i can't again with the camera's hard but i'm going to just gonna just check here how much do i want it's not quite a centimeter something like that amount there not quite too much let me see if i can take off more here there we go that was good so ouch so whoops myself here i usually use needle nose pliers which are not here right now but i'm just going to trim off the excess and then just make a little loop that'll go around that pin there so i usually use the precision screwdriver this uh this wire is not insulated or sorry it's insulated it's not uh it's um it's not silicone it's pvc so it melts actually it's not the base best for this but with the glob of solder that's already on the pin now with that the copper wrapped around the pin if i just heat it up it will actually melt the solder around the copper so if i just hold this down with the screwdriver and then just heat up the pin and the solder and the wire then the solder just flows around the copper and that's it that should probably work i'm just checking uh looking at how well that not the best it but i think it made that connection but not the best so let's try it now so let me clear all this up and we'll pull out the arduino again so here again is our modified micro sd card reader here's our same setup as before let me plug it in let me plug this in here so if everything worked properly then i should be able to load that radiohead reliable datagram server sketch and it should actually pick up the signal from the other arduino that i know that this can work even though the microsd card is connected so let's go to the computer so here again this is the example from the radiohead library so it's compiling again and i'm uploading it to the arduino again uploading and done there we go so even though the microsd card is connected it's the nrf24l01 is actually receiving a signal and just to confirm let's just check here's our card info sketch and let's upload that so hopefully if we didn't damage the board then this should work as well it's uploading done uploading there we go success so that's how you modify the microsd card reader to allow it to be able to work with another sbi device i hope that was helpful thanks for watching
Info
Channel: JD Kato
Views: 1,122
Rating: 4.8518519 out of 5
Keywords:
Id: iqqFn2jn3p8
Channel Id: undefined
Length: 26min 42sec (1602 seconds)
Published: Sat Nov 28 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.