Electronics > Projects, Designs, and Technical Stuff

Read SD connected to atmega

(1/2) > >>

Amper:
Hi,
another short questionregarding my geiger datalogger build.

I plan on using a atmega 328 for arduino compatibility and low sleep current consumption. It will write to an sd card mounted inside of the device which i want to access without removal.

Is there any possibility to connect a common micro sd over a bridge IC to the micro and still have a second sd-reader on board connected at the same time? Is there some better way to do this without using a larger micro with worse standby performance?

Of cause i dont expect both usb and micro at access at the same time.

cheers

Kasper:
Yes that is possible.  If you search for SPI with 2 masters 1 slave you might find some good info.

I once added a 328p to a df player. I think all I did was connect the SPI and gnd and insert a tri-state buffer in sclk.  I used the buffer to disconnect the df player from the sd card when the 328p wanted to drive sclk and read the sd card.  Not sure the buffer was needed, but it seemed to be the quickest solution.

Amper:
Thanks!

I just found a chip that seems to be absolutely perfect for this application, however it is out of stock everywhere and seems to be "not recommended for new designs"

Its the MAX14502, it would allow having a single usb port that by default is routed to the uart bridge and after activation via the controller switches from sd feed through to usb card reader. The absolutely ideal part...

Is there any modern equivalent i could use or is this application just non existent today?

Ian.M:
I think you are overcomplicating your design.  Although an ATmega32U4 (as used on the Arduino Leonardo) has a significantly higher current consumption than an ATmega328P, you can still expect to run it in power down sleep mode, with WDT enabled as a possible wakeup event source, for over a year from a single CR2032 coin cell.   

Program it to be a USB mass storage SD card reader when USB is connected and to run your data logger code when USB isn't connected, and put the money saved from chips to support a dual master SD card interface, dedicated USB SD card reader and USB hub or switch into a better higher capacity battery and you should come out ahead on operating battery life

Amper:
Mhm, you may be right there, i never had a look at the 32 atmegas until now. I expected them to be similarly bad in sleep consumption as the stm32 analogues. Also i like the fact that there seems to be some projects directly driving the SD with no interface chip. The downside seems to be a serious speed disadvantage. While i dont really have to move much data thats still sad. Also it would be nice to have the ability to run the micro and sd access at the same time.
One variant i also like is using a two channel usb hub on board, connecting to the controller side and some sd to usb bridge, i will just have to find a way of switching the sd between the sides. This way it would be possible to operate the device controlled by the computer via usb-uart and at the same time use the mass storage.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod