Pcd Magic Serial

Well, I was also reading it but I haven't noticed any useful difference between soft power-down and hard power-down. (?) And going to hard power-down is quite easy, I just set the RST pin low. To wake it up I call MFRC522.PCDInit and it sets RST pin high.

You can also find that in PCDInit there is 50 milliseconds delay for crystal startup. I modified it for myself to only 5 ms and it seems to work well in my case. And generally, for battery operation, right now I'm testing the mode that ATmega328 asks MFRC522 if there is any PICC, if not then ATmega sets MFRC's RST pin low and goes to sleep for a second itself.

Pcd Magic Serial

After a second ATmega wakes up, sets RST pin high, asks MFRC and then it all go to sleep again. (Of course if there is a PICC present then it is more complicated.) And to be woken for as short time as possible I also noticed that in library there is set 25 ms timeout in TReloadReg registers. You can find it in PCDInit. This timeout is used in PCDCommunicateWithPICC. I shortened it to 10 ms and it seems to work. But like the wakeup delay I don't know what the right minimum is. Well, I'm not testing soft power down.

Because like I said, I don't understand what is on or off in this mode. In hard power-down (RST connected to GND) I measured 0.3 mA. It is quite a lot.

I'm using a module called RFID-RC522 (popular and cheap on ebay, you can google it). I previously unsoldered resistor R1 nearby the power LED D1. (I think it was 1 kOhm, I didn't want to unsolder the LED.) But now I can see that there is also 10 kOhm R2 between 3.3V and RST and that makes that 0.3 mA. So I unsoldered R2 and in hard power-down my cheap multimeter displays 0.1 uA. It is suspiciously much less than 'max. 5 microamp' in datasheet.

Two posts before I mentioned 10 ms timeout in PCDCommunicateWithPICC. I googled datasheet for MF1S503x (MIFARE Classic 1K) and there it looks like that 10 ms is the maximum timeout for he longest operation. I'm trying to make something like 'PICCIs AnyCardPresent' and to have this as fast as possible. Right now I have it this way. I tried your idea with soft power down and extracting only important lines from MFRC522::PCDCommunicateWithPICC and it works fine! My detection cycle takes now cca 3.2 ms.

I understand that most of it takes SPI communication between Atmega and RC522. Right now I'm having problem that I don't see any difference in setting various values of MFRC522SPICLOCK on oscilloscope. In mfrc522.cpp there is always: SPI.beginTransaction(SPISettings(MFRC522SPICLOCK, MSBFIRST, SPIMODE0)); In my case it has no effect on SPI speed. So I was trying adding this: SPI.setClockDivider(MFRC522SPICLOCK); In that case SPI is much faster on oscilloscope (I get detection cycle down to 1 ms like you) but it seems that arduino and rc522 don't understand well each other.

Pcd Magic Serial

I will have to investigate it further. I think this will not be the problem.

I'm having TReloadReg 0x0190 and I'm swapping only TPrescalerReg values 0x05 (when testing card) and 0xA9 (original value when reading and writing). There is a weird in mfrc522.h that MFRC522SPICLOCK is defined as SPICLOCKDIV4 which I beleive is some one byte const.

But SPISettings used in mfrc522.cpp expects frequency in Hz which is uint32. (?) On oscilloscope I can see that my current SPI speed is around 100 kHz, while SPICLOCKDIV4 should be around 1 MHz. Here you go notes:. the current card detection is even more aggressive than in the code above. Now detection is.8 msec, but not sure how stable it is.

I had bad luck buying 'wrong ESP-01 modules' at the first place, so I originally used CHPD of ESP-01 instead of reset. This required some 300 msec reset pulse. Had to do some soldering to fix, bought some good modules later and now in the process of modifying the code (e.g. Now need to call WiFi.forceSleepWake for the connection to work reliably). using fixed IP(dummy) and UDP broadcasting for ESP to minimize the connection time.

This is required for both battery saving and fast reaction. the two AA batteries box is still up and running after 33 days. Thought I'd put it here: 2AA battery device started to miss transmissions (voltage is 2,984V - close to expected).

Detection still works okay but ESP fails to connect in 20% of cases. If you look at the voltage over the time, you'd notice a 'hockey stick' in the beginning - half of the available voltage was gone in the first 3 days when the detection cycle was a little over 10 mSec and the rest - in 40 days (detection time is 1 msec) too bad this does not work for but I like his new approach with the timer. Guess it does not make sense for me to try - don't break what's working;) the only idea I currently have is could possibly have different cpu frequency and that affects the number of cycles required. I don't believe in 'metal' or different kinds of cards (though I agree - sounds not unlikely). Just in case, my board is Arduino Pro Mini, 3.3V, 8 Mhz using 80 Mhz board as far as I understand and looks like every cycle for him is faster. BTW:, I don't understand what device you are using to measure the current, but oscilloscope would definitely help. Also try increasing sleep to 60 sec - this way you at least will measure your 'sleep' current.

Without the led it should be pretty low (tens uA or less). Is this the case? 3AA device is still running as expected and hope it'll continue this way for long. Hi and good day Thanks every one for the precious knowledge shared here. I'm to start a project with this Ic for controlling cabinet locks.

Since it is battery powered, I will need to use the solution mentioned above. Ihave been using esp 8266 in arduino during my recent projects so Im very interested in using the esp as the main MCU. Have you used esp as a processor first then you decided to use mega328? Have you got good result from esp finally? Can any one please conclude the best way and best code from what is tested above? Using esp 8266 was my original idea (same reasons as yours). However I've learned that it takes too long for it to wake from the deep sleep.

Here is the link that I found after myself coming up to the conclusion that wake from sleep is taking hundreds (300 in my case) of milliseconds thus you cannot wake up every second and expect significant power savings: As far as the best code - I believe both timer based approach suggested by and my approach are valid, however you'd need to empirically decide (based on your cpu) what timeout is good in case of or what number of cycles in case of my approach. Try different counts starting from two and up to 100 and see what's working for you. I'd also appreciate if you share your results if you go this route.

As I mentioned, I'm running Arduino ProMini with ESP-01 on three AA batteries. I'm using builtin ProMini voltage regulator (Don't remember where I saw it, but the efficiency should be within 80-90% and consistent with my measurements, so good enough).

Looks to be a SACM m1935-A. It is outfitted witha lanyard loop for use by French Policia. It has a 766a (F?) serial number. As of now, we can not find a war pruf stamp that would indicate that it was possessed by the Third Reich. The F we believe, indicates that it was made after France was Liberated. Jun 9, 2009 - Awhile back I got a 1935A in this holster. It has been re-modeled several times as you can see. The only markings on it is a name and serial number inked in to the inside of the flap. (Magnuson 36711678) I have not had any success so far in finding much about the name/number except that if the number is. Sacm 1935 a serial number. Oct 9, 2014 - While an excellent pistol overall, the French Mle.1935 does not necessarily stand out in any one way. It was produced a. The MAS design actually entered parallel production later when SACM could not speed things up. It appears that pre-invasion the 1935 A made it to serial number B700.

So far running it for a little over 3 months and expect to run for another 6-9 months. Unfortunately my voltmeter has just died and I cannot measure the battery voltage to make more accurate prediction.

Pcdmagic

Will post the result as soon I replace the multi-meter. Update: fresh 3xAA batteries - 4.85 V 3xAA batteries after running 95 days - 4.35 V the voltage drop is 5.26 mV/day on 3 AA batteries (comparing to less than 2 mV a day on 2 AA batteries) estimated remaining time 1800/5.26=340 days. May be too optimistic, but will see. Hi I saw the V1pr question in my email and became interested in the subject again.I put aside using the esp module and made my own board using atmega 328 microcontroller. Programming with arduino, and using 4 AA batteries with a LDO, I finally reached 90uA when sleep mode.

I am thinking about a student time attendance system for class rooms now! It is a raw idea but first i want to check whether it is possible or not. Could you please kindly share your project so that I can test what you have made before?

The power down is just one line: // put NFC to sleep mfrc522.PCDWriteRegister(mfrc522.CommandReg, mfrc522.PCDNoCmdChange 0x10); the code should be implemented in the new version of the library per: 'Add power control functions ' namely powerdown - Enables soft power down mode. Powerup - Disables soft power down mode.

You can safely replace this line with the powerdown call. I wouldn't bother using powerup as it would need additional cycles, but I could be wrong (could be that properly waiting for the oscillator to come up would result in faster and more reliable overall card detection?) correcting myself: looks like in the final code the functions are void PCDSoftPowerDown; void PCDSoftPowerUp.