Custom Shield - MicroSD/FRAM

So it kept thinking all day and night about WHAT IF the user (rather me during testing :p) placed the shield in the reverse direction?!

It seriously bothers me so…

Looking at the visual analysis, it seems like the uSD/FRAM shield will be safe from any damage if you reverse the placement :smiley:

Also, if you are a shield designer, this might be helpful:

The pins highlighted in RED are HOT which means if there’s a circuit connected to it, there’s a chance of current flowing through. So just do a check and see what’s the connection like.

I hope you like the effort put in for this shield! :smiley:

2 Likes

Revision 9 - Removed the Pull-up resistor for microSD Card Detect to:

1.) Reduce standby power consumption (the resistor will always draw current if a card is not inserted)

2.) Prevent accidental shorting to ground when the CD pin on the core is configured wrongly to Output

This can be resolved with adding another current limiting resistor between the detect pin but…

3.) The user will simply set the CD pin (D4) to internal pull-up if they want to use this feature :wink:


Specifications for Testing jig: (preliminary planning)

  1. Current consumption monitoring
  2. High side power switch to connect/disconnect shield
  3. microSD bus activity LED on/off
  4. SPI Transfer rate
  5. FRAM full memory space Read/Write
  6. Test if any adjacent pins are shorted

So exciting! :smiley:

3 Likes

Pre-orders payments are 80% in. Will be ordering the parts soon and aim to deliver the shield on time :smile:

If you have not pre-ordered, do so at http://enabler.crowdtilt.com/ :wink:

2 Likes

GERBER and Schematics are posted for those interested in making their own :wink:

It’s a really simple board and many could probably add in their project within a few minutes!

But it’s really a great project for me to learn and make something :smiley:

Timeline:

By Week 1 August - Send GERBER to fab house and purchase components

By Week 2 August - Populate all boards and complete testing

By Week 3 August, Ship all boards!

Concurrently, the FRAM library will be worked on and published, ready for you to tinker before the shipment!

1 Like

Updates!

1.) PCB has been set to fab house

2.) Stencil has been sent for production

3.) Parts have been ordered

Waiting for everything to arrive and we can start turning them into lovely shields! :smiley:

On a side note, i tried making a transparency Stencil just for fun.

2 Likes

Awesome, looks great what did you use to make it?

Hows your library coming along? I’ve just started trying to modify my code to use the FRAM for the database of fingerprints and the SD for the log file… problem is my code has grown to over 2500 lines not including the 7 libraries and i cant remember what does what!

1 Like

@peekay123 is working on the library.

Maybe I will take a stab tonight :slight_smile:

@kennethlimcp, sorry about the delays. Lots of family stuff and as you know, happy wife, happy life!

I will be posting the SharpMem/FRAM libray as well as some other FRAM libraries I tested. Oddly, though I could get the SharpMem stuff working with the FRAM, I had problems with the other libraries which worked just fine on an Adafruit 64K FRAM breakout. My guess is that I’m missing something simple. I should have stuff up on my github later today. :smile:

3 Likes

@kennethlimcp, I have finally posted the SharpMem/FRAM display library here. The code is setup for a 400x200 display but that can be changed easily. I have tested it on a 128x128 display as well.

2 Likes

Updates! Parts have all been packed, Stencil and Panelized PCBs are manufactured already.

Expecting them to arrive Singapore this week :smile:

FRAM:

PCB:

Stencil:

6 Likes

Ok so trying to update my fingerprint reader to use this shield… I noticed something that may cause me an issue.

im planning on using @BDub code from above (post# 136) but if i set the SPI up and call SPI.begin and don’t specify a pin it defaults to A2. the way i got around this previously (as its in a few libraries this way) was to make sure nothing was connected to A2, so i put the digole on A0 and the SD on A1. my thoughts are if we are spitting out random stuff to the SD card we will corrupt it pretty quickly, if not brick the card by writing to the bits you shouldn’t, i dont know if it happens or not, but i don’t want to risk it!

Now the dilemma, the SD card is hardwired to A2…

whats the best way to go about this? can we map CS to a no-broken out pin so we dont loose a ‘spark’ pin? or is there a way to create instances so we can have SPI_Digole that is for the digole and is a mode 3 whatever and on A0, and a SPI_SD thats mode 0 at clk/4 on A2 and a SPI_FRAM thats set mode 0 clk/4 on D3

also,
has anyone converted the test code into a library for this shield? i think its pretty much all there, Im going to make a start on it now… but be warned… I’m still learning so it wont be perfect!

If you call SPI.begin(D2); for example, it should set D2 as the SS output pin and set it HIGH. The Core's SPI library should not takeover A2 as a digital output anymore and you should be able to use it as an analog input.

That said, your user library that requires a SS pin needs to be aware of the new D2 output and set it LOW whenever you are talking on the bus, and back HIGH after you're done.

1 Like

@kennethlimcp this is sweet! Nice to see this kind of progress on a community driven shield. How much was the stencil and what was the turnaround? It would be cool to get the tooling for this cheap enough for home based small batch assembly runs. That looks like the same panelization as the Spark Core, so if made at Spark’s CM they probably have the tooling ready to go… which is nice.

Yep thats what i figured, what about for the likes of @timb digole library, it manually controls the CS pin defined and calls SPI.begin(); defaulting to A2…

Is there a pin we can map to thats not broken out? that way we dont waste another pin?

Im running out of time before i leave for Italy, @kennethlimcp ill PM you the library i have so far, its based on the arduino EEPROM library with @BDub 's functions from the test code above… ill give it a very quick test in the WebIDE then its all yours!

1 Like

@Hootie81, thanks for the help! I will dig in further when i start doing tests for all the shields before shipping them.

The library i still in the early phase but the basic functionality works :wink:

I'm not seeing the problem I guess... if you just map your code/library to use the A2 pin for CS/SS then you have not wasted two pins for this function no matter if you call SPI.begin() or SPI.begin(A2)

If you use any other pin and don't specifically call SPI.begin(ANY_OTHER_PIN); then you are now initializing A2 as a digital output and setting it high when you call SPI.begin(). That said, you can still call analogRead(A2); thereafter and it will reinitialize A2 as an analog input. Beware if doing this, that any analog circuitry you have hooked up to A2 is going to be subjected to a HIGH output for a brief period of time (this could be fatal, which is why I added the ability to call SPI.begin(ANY_PIN) to the core-firmware :wink: )

2 Likes

the problem as i see it, its probably me thats wrong…

If i call SPI.begin for the digole display it will set A2 as CS, even though i want to use A0
then for the SD card, i want to use A2
and the FRAM uses D2 and D3
and i need to pick one for the RFID reader too :smile:

timb’s library calls SPI.begin(); so SPI is now set for A2, even though i set CS as A0.

A2 will be driven low each time the library calls SPI.transfer to write to the display. even though we are manually doing the CS low on A0
same goes for writing to the FRAM and RFID…

so if A2 is going low, then we are writing to both the display and the SD card… see what i mean

It’s probably the similar issue here:

@Hootie81, @kennethlimcp, I wrote a lot of the Digole library with timb. He gave me editing privileges so I modified the code in the repo to use SPI.begin(_SS) where _SS is passed in the constructor. :smile:

1 Like

I was going to say the problem is just that the library needs to be updated to be more dynamic now that the Spark core firmware allows it to be. And it looks like @peekay123 has your back on this one :wink: Thanks PK!