ricardo-reis: hello!

ricardo-reis
Posts: 5
Joined: Sat Jan 27, 2018 12:07 am

ricardo-reis: hello!

Post by ricardo-reis » Sat Jan 27, 2018 12:51 am

Hello everyone!
Not sure how to start this, but i thought a bit of a background intro followed by what brought me here and what have i been trying lately could be a way in, so, here it goes:

I'm Ricardo, 32, from Portugal, living currently in Slovakia, with some time spent in a couple of universities studying computer science / informatics engineering.
I've been introduced to the arduino world in 2009. Back then i was working as a freelancer web dev, and was given my first duemilanove with a "find out what's this good for". I did find out that it was a great tool to play around with a passion i was growing at that time - robotics. Enjoyed it for a few years, till i moved to SK and left all my little projects behind.
A few years later (now) i decided to bring some old projects back to life (led cubes, obstacle avoiding little robots and stuff of this sort), and to create something new too (a rover to help me cleaning the snow on the driveway).
This last one is just starting to be built, and at the moment it's just a basic RC prototype, but the idea is to throw at it some processing power and sensors so it can automate, at least partially, the task. Arduino was since the beginning a no go, as the number of pins and memory wouldn't allow much, so, talked about it with a friend of mine and he introduced me to the Maple Mini. This was about 2~3 weeks ago - i ordered a few, and started reading the forum here, to see what would i be running into.

Today, finally, my first one arrived, and i'm quite pleased with it so far.
It's fast and it has so much more memory that i passed from 20% free memory to 20% used. :D
Installing the drivers wasn't the most straight forward journey i've seen, but after successfully flashing the first code, turned out to be easier than finding documentation for dummies to jump into this. (just a thought: the work you guys have been putting on this community/HW/SW is amazing, but for newcomers, it's rather overwhelming to find something easy to read and walk through)

Now what am i trying, and what am i failing at:
- i'm running a pc with win10, Arduino IDE 1.8.5, all drivers installed as per the instructions on here (somewhere, don't have the link), and definitely able to upload programs into the maple mini;
- i've started with the basic blink (pin33 here);
- then reused some code i wrote for a GPS/GPRS module i have (Telit GM862) - the code was for Arduino, uploaded to the maple mini with no worries apart from finding out why couldn't i read TX/RX - was on the wrong pins :D - silly, right?;
- then reused some code for the OLED displays (sort of the adafruit ones, using the same lib, at least) - all ok;
- now i'm stuck on how to get a SPI Micro SD card adapter to work - and i'm failing miserrably.

For this last one i'd really appreciate some help. I've been trying to find some info on the forum, but i bump into either different boards, or posts with code that 'works' but doesn't, or into threads that are so long that i get lost just trying to catch up, or post that are from so long ago, that i'm not sure they're applicable anymore. All of this to say, i'm not able to make the SD card read/write in any way. - Is there anyone (still reading this) able to show me the direction to a post that has this working for Maple Mini? I'd really appreciate!

Well, this is it for now.
Thank you for reading. :)

EDIT: adding a photo of this first setup with a Maple Mini..
(the SD module wasn't on the board for the pic, but it's placed above the display)
InkedIMG_20180126_154503_LI.jpg
InkedIMG_20180126_154503_LI.jpg (192.33 KiB) Viewed 184 times

User avatar
mrburnette
Posts: 2193
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: hello!

Post by mrburnette » Sat Jan 27, 2018 1:05 am

ricardo-reis;

Welcome. Nice intro.
I have not used SD-card with Maple Mini in several years. I got caught up in the ESP8266, rPi_Zero-W, and the ESP32.
But, SD used to work!

I say used-to because SPI has been reworked a lots in the core and I have not independently breadboarded SD recently. In fact, we have had several issues come up in the past few weeks with I2C because the default implementation was "software" and the current core defaults to "hardware" I2C. Hopefully all of that has been corrected and merged into "master" on github.

This suggests SD is working
http://wiki.stm32duino.com/index.php?title=SDFat


Good luck,

Ray

ricardo-reis
Posts: 5
Joined: Sat Jan 27, 2018 12:07 am

Re: ricardo-reis: hello!

Post by ricardo-reis » Sat Jan 27, 2018 2:37 am

hi Ray,
Thanks for the reply.
I've been to both links - didn't try your code, yet, but will do tomorrow.
The SDFat, i've tried a few of their example codes but wasn't successful with any. Maybe i'm doing something wrong, but not sure what. The pins seem to be all ok. SD has worked with the SD card example from/to arduino (using an old 1Gb SD card, to avoid weird issues with size and what not).


With I2C i had no issues. The display is I2C and it's working perfectly. Just tried the I2C 1, though, but as soon as i pass these issues with the SD card, will probably get to test the I2C 2 - with a 9DoF BNO005.

stevestrong
Posts: 2050
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany
Contact:

Re: ricardo-reis: hello!

Post by stevestrong » Sat Jan 27, 2018 9:02 am

SD should work on MM.
You showed in the picture everything except the module which does not wok. That is not helpful.

There are two different SD card modules: with and without 5V->3.3V converter.
Since the MM works with 3.3V, you need an SD module without that power converter on board, like this one: https://www.aliexpress.com/item/Mini-Mi ... 28363.html
Or, if you have one with, you have to remove the on-board resistors (or any existing level adapter) between SD socket pins and module pins.

ricardo-reis
Posts: 5
Joined: Sat Jan 27, 2018 12:07 am

Re: ricardo-reis: hello!

Post by ricardo-reis » Sat Jan 27, 2018 1:50 pm

Sorry for that, it was the pic i had at the moment.
So, the modules i have are these: https://www.ebay.com/itm/1-2-5-10pcs-SP ... 2726191318
They're listed as operational with vcc between 3.3v and 5v. - i assume that would work with no changes.
I've tried using the SPI1 pins (4 to 7) vcc and gnd from the MM board.

Do you have any leads on working code/libs to use to make it work, apart from the mentioned by Ray?
(will be testing this again later today)

thank you

User avatar
BennehBoy
Posts: 501
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: ricardo-reis: hello!

Post by BennehBoy » Sat Jan 27, 2018 2:15 pm

SDFAT works just fine on MM, I'm using it without issue in my project here -> https://github.com/BennehBoy/LRDuinoTD5

Be sure that your SD reader isn't designed for 5V Arduino - these usually have a voltage divider on them to drop down to 3.3v, if supplied with 3.3v from the MM, you end up with a voltage that's too low.

I'm using the github version of Greiman's SDFAT.
-------------------------------------
https://github.com/BennehBoy

zmemw16
Posts: 1674
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: ricardo-reis: hello!

Post by zmemw16 » Sat Jan 27, 2018 4:26 pm

wow, i've got one of those, found it while searching for something else, absolutely typical :D

that got me reading the data sheet looking for 5v tolerant pins. somewhat surprisingly spi1 is not 5v tolerant, i thought all of port A was :!:

BUT if remapped on to port B it is, perhaps something to consider before grabbing the soldering iron.

stephen

stevestrong
Posts: 2050
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany
Contact:

Re: ricardo-reis: hello!

Post by stevestrong » Sat Jan 27, 2018 5:21 pm

ricardo-reis wrote:
Sat Jan 27, 2018 1:50 pm
So, the modules i have are these: https://www.ebay.com/itm/1-2-5-10pcs-SP ... 2726191318
They're listed as operational with vcc between 3.3v and 5v. - i assume that would work with no changes.
They can write what they want, but it will not make it work with MM SPI. Forget it.
Unless you remove the level-shifter and make direct connections from SD slot to module pins.
Additionally it may be necessary to solder on each of MOSI, MISO and CLK pins a 10K resistor to 3.3V.

User avatar
BennehBoy
Posts: 501
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: ricardo-reis: hello!

Post by BennehBoy » Sat Jan 27, 2018 5:52 pm

-------------------------------------
https://github.com/BennehBoy

User avatar
BennehBoy
Posts: 501
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: ricardo-reis: hello!

Post by BennehBoy » Sat Jan 27, 2018 5:57 pm

-------------------------------------
https://github.com/BennehBoy

Post Reply