Home › Forums › DIY Sand Table › SD card woes
- This topic has 14 replies, 2 voices, and was last updated 2 years, 10 months ago by hackintoshlover12.
-
AuthorPosts
-
December 2, 2022 at 6:26 am #1040StompParticipant
Hi
Ive gotten to the SD card conundrum.. Ive tried many used various formatting ways and I am for ever greeted with the 1.01MB numbers..Gotta say the frustration is getting the better of me.
Is there any way to test the board to see if its just incompatible SD cards or my code thats the problem?
Ive hooked up an external SD reader.. 2 actually and still nothing.
I dont have a 4gb sandisk but have one coming on the slow boat.. Some of the libraries are outdated so when compiling code I had to change some lines and im no programmer so no idea if its something I screwed up… i was so happy to actually flash something that I dont want to go back and re do it just in case.
Now if I cant get this sorted is there another board that has more memory so I can avoid this all together? Can this be flashed to a Pi?My brain is fried please help me I cant take this anymore haha
ALso thanks so much for the projectDecember 2, 2022 at 7:21 am #1041hackintoshlover12ParticipantHi,
For me everything works.
I am not even using adafruit sdcard logger/shield.
I am using big sd card the ones used in camera and not the microsd card used in phones.
Kindly follow the connections below:
SD card pin 1 – esp32 gpio 21
SD card pin 2 – esp32 gpio 18
SD card pin 4 – 3.3v
SD card pin 5 – esp32 gpio 5
SD card pin 6 – gnd
SD card pin 7 – esp32 gpio 19Connect a 100k resistor between SD card pin 1 and 3.3v
Note: the big sd card pins are labelled as follows starting from the slant edge
9,1,2,3,4,5,6,7,8December 2, 2022 at 7:22 am #1042hackintoshlover12ParticipantWhile compiling use platformio version 2.1.0
Everything will compile perfectly fine.December 3, 2022 at 1:54 am #1046StompParticipantThank you for that Ill try it today.
If anyone comes across this post and wants to run 2208 drivers they need a ground on the enable pin not +ve.. cut the trace and ground it they work great and so quiet its blissDecember 3, 2022 at 2:11 am #1047StompParticipantYeah not compiling this is what happened last time..
Cannot find a directory called “include” and conflict type for “random” whatever that means..src/WorkManager/Evaluators/tinyexpr.c:121:15: error: conflicting types for ‘random’
static double random() { return rand() / ((double)RAND_MAX); };
Compiling .pio\build\featheresp32\src\WorkManager\WorkManager.cpp.o
^~~~~Compiling .pio\build\featheresp32\src\main.cpp.o
~
In file included from src/WorkManager/Evaluators/tinyexpr.c:38:
c:\users\stomp\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\sys-include\stdlib.h:270:6: note: previous declaration of ‘random’ was here
long random (void);
^~~~~~
*** [.pio\build\featheresp32\src\WorkManager\Evaluators\tinyexpr.c.o] Error 1
============================================================================================================================ [FAILED] Took 38.64 seconds ============================================================================================================================December 3, 2022 at 5:21 am #1048hackintoshlover12ParticipantYou are getting the exact issue as mine.
After installing vscode and platformio, when you install espressif framework it gives a version dropdown just below the title “installation” change it to 2.1.0 and reinstall the framework.
Compile after that and it will surely compile.December 3, 2022 at 6:44 am #1049StompParticipantNope still problems with this “random” piece of code and library errors.. once i change it to a previous version it works but I get a ESP_ERR_INVALID_STATE in terminal regarding SD card.. if its in or not makes no difference
December 3, 2022 at 7:26 am #1050StompParticipantI soldered up an sd card like you said too and still nothing. Im hoping they are all just bad SD cards and the one I ordered works otherwise I dont know what to do.. its very frustrating
December 3, 2022 at 7:35 am #1051hackintoshlover12ParticipantShare the following to help you better:
1) Your config file.
You can find it by firing web at <ip/cnc.html>
Copy paste the config file.2) SD card to esp32/ huzzah32 connection pictures.
There is nothing as bad sdcard
I have used 1gb, 4gb, 8gb successfully.
December 3, 2022 at 8:05 am #1052StompParticipant{“robotType”:”SandTableScaraMatt”,”cmdsAtStart”:””,”webui”:”sand”,”evaluators”:{“thrContinue”:0},”robotGeom”:{“model”:”SingleArmScara”,”homing”:{“homingSeq”:”FR3;A+20000N;B-20000;#;A+20000n;B-20000;#;A-600;B+600;#;B-20000N;#;B20000n;#;B-500;#;A=h;B=h;$”,”maxHomingSecs”:120},”blockDistanceMM”:1,”allowOutOfBounds”:0,”stepEnablePin”:”12″,”stepEnLev”:0,”stepDisableSecs”:10,”axis0″:{“maxSpeed”:3,”maxAcc”:10,”maxRPM”:5,”stepsPerRot”:12000,”unitsPerRot”:628.318,”maxVal”:190,”stepPin”:”14″,”dirnPin”:”32″,”endStop0″:{“sensePin”:”36″,”actLvl”:0,”inputType”:”INPUT_PULLUP”}},”axis1″:{“maxSpeed”:3,”maxAcc”:10,”stepsPerRot”:12000,”unitsPerRot”:628.318,”maxRPM”:10,”maxVal”:190,”stepPin”:”33″,”dirnPin”:”15″,”endStop0″:{“sensePin”:”39″,”actLvl”:0,”inputType”:”INPUT_PULLUP”}}},”fileManager”:{“spiffsEnabled”:1,”spiffsFormatIfCorrupt”:1,”sdEnabled”:1,”sdMOSI”:”18″,”sdMISO”:”19″,”sdCLK”:”5″,”sdCS”:”21″},”wifiLed”:{“hwPin”:”14″,”onLevel”:0,”onMs”:200,”shortOffMs”:200,”longOffMs”:750},”ledStrip”:{“ledPin”:”4″,”sensorPin”:”34″}}
Ive used multiple ways for it to see the SD card.. currently its using the adafruit feather as a piggyback board so not really any way to screw that up.. i cut the small copper pad connection and soldered the wire on the back…
I dont know how it all works but is it possible to send a compiled image that I can just flash to the board?
Or is anyone in/near Australia that can send me a working SD card if I paypal them some beer money?
CheersDecember 3, 2022 at 8:18 am #1053hackintoshlover12ParticipantI have not tried adafruit board.
Check the image in the link for what i have done:
https://drive.google.com/file/d/1Dy_f6YZVUL9qr77tZelALeObBAy04Rdb/view?usp=drivesdkcan you do it?
The only issue with th adafruit board is, it’s very hard to check whether the cs pin is actually connected to esp32 pin21.
December 3, 2022 at 8:48 am #1054StompParticipantI did solder up an sd card just like you said.. ive also tried multiple sd card and micro SD card adapters.
I have a very good microscope so its not a problem tracing that pin.. everything is wired as it should beDecember 5, 2022 at 4:27 am #1055StompParticipantYaay! so figured it out.. as said above re load earlier version of platformIO AND previous version of espressiv 32 platform
Now literally every SD card i was trying works.. yay.. at least I backed up all my crap off all these cards which is something i guess.
Still 3 frustrating days stuck at home with kids and with covid fighting this thing are over finally.. now onto cutting the table on my cncI also found in MotorEnabler.h the _stepEnLev = true; which im guessing makes the enable pad for the motors have 3.3v which means anyone running 2208 drivers will have an issue where they cant connect to the board.. i assume this is because there is some short no idea really but i know that those drivers need ground on the enable pin to work.. i ended up cutting the trace and grounding it previously to enable motors but I think this line in the code change to false might fix this motor issue maybe. I might try it at some point and will report back if its right.
December 8, 2022 at 2:23 am #1056StompParticipantEverything sorted now but as I hate searching for answers and coming to a thread that looks promising and just stops here are some issues and solutions I found.
The code not compiling error is caused by using current PlatformIO and espressiv32 versions.. use 2.1 and it all works fine
TMC2208 drivers need a -ve signal to be enabled and +ve to be disabled.. you can change it in the code as I said above but I found out its easier just changing the config file that you can edit in the webUI /cnc.html – where it says stepEnLev”:0 change the 0 to 1 or the other way around, put MM across the output pin to confirm its enabling and disabling motors.
I found I was getting a strange “tick” from the bottom arm stepper driver/motor.. i checked it and it was receiving a voltage pulse across the STEP pin, I guessed that it was something to do with the WIFILED part of code below it as it says hwpin 14 for the output of the LED. I couldnt see any LED there anyway so I // the code from below the file manager pin assignment code including the LED strip part as im using a seperate d1mini flashed with wled and addressable 2801 leds instead of the on board PWM fet. This got rid of the tick as far as I can tell.. so if your bot finishes drawing and starts on a random line using one arm this is the problem. If you hold the stepper motor you can feel the ticking.
I hope this helps someone down the line what a fun project thank you very much i might post my finished photos once I do the woodworking part of it.
PS im no coder but would be great to use one board to drive both the bot and wled.. I have no idea where to start implementing this but if anyone ever does can you please bump this thread so I know.
Cheers
AdamDecember 8, 2022 at 6:29 am #1057hackintoshlover12ParticipantHey,
Glad you figured it out.
I gues you missed but I was asking you from the beginning to shift to esp32 v2.0.1 for everything to compile fine.
I am using a4988 driver and everything is quite silent.
My top arm motor was getting weird movement whenever restarted or reset because the step pins was connected to pin 15 which is strapping pin for esp32 and outputs pwm om boot, changed it to different pin and now it’s fine.
In webcncui there is a pin assignedd to enable and disable stepper motors after some timeout so that they don’t overheat. -
AuthorPosts
- You must be logged in to reply to this topic.