LCD and SD

This is the place to show off your felix printer hacks and improvements.
Post Reply
Trnquill
Posts: 66
Joined: Fri Oct 05, 2012 10:01 am

Re: LCD and SD

Post by Trnquill »

Problem solved! It was not the transformer (well, sort of...) that caused all my problems but a poorly adjusted Y stepper driver. I tuned the driver just a hair and now everything is working as it should. :)

So, I had printed a lot with printer connected to a computer via USB and controlling with Repetier Host. Then I bought the LCD/SD expansion module and printed just fine while still powering the printer via USB but controlling it with the LCD/SD module. Then I got rid of the computer and used an iPad transformer instead for powering the printer via USB. Everything was still fine, no problems what so ever.

Only when I ditched the iPad transformer and tried using an ordinary barrel connector transformer the problems begun. My Y axis was loosing steps quite badly. I experimented with several 8-12V transformers but had the same problem with them all. Next I soldered together an USB power cable which enabled me to power the electronics via USB socket. I used the power supply of Felix as a source for 5V. But no luck, the same thing with the Y axis was still there. Finally I pulled the electronics from the electronics box, disassembled the boards a bit and istalled the D1 diode under the Pololu stepper drivers to power the Arduino from 12V rail. But still, the very same problem! Then it occured to me: Y axis sounded quite similar to what it sounded when I had turned stepper drivers of all the axis too high. So, small turn of the pot on Y-axis stepper driver and the problem was solved!

It is still a mystery to me why things were working correctly when powering the electronics via USB from computer or from iPad transformer. Maybe the lower current capacity of an USB port and iPad transformer made the electronics "run slower" thus giving some breathing room for the stepper driver? Who knows, but now it works and that's the best thing! :)

Kjetilei
Posts: 334
Joined: Fri Mar 16, 2012 8:26 pm
Location: Stavanger, Norway

Post by Kjetilei »

I finally caved in and ordered the parts needed for a LCD/SD setup. Although I originally planned to buy a complete kit I changed my mind in the end and bought loose parts from Ebay to create a variant of the PanelMax design.

I bought a cheap 20x4 LCD display that should be compatible and a cheap Arduino compatible SD card reader that was described on a German blog as working with Ramps. Total price ended up under $22 (and I could have gone several $ cheaper if I wanted). That's around 1/3 the price of the kits. Lots of more work and uncertainties but the end result should be more rewarding :)

Now I just wonder how I'll be able to combine the LCD/SD parts, 4 fan controllers and the LCD bar that I have bought without it ending up looking like a complete mess ;)

dognotdog
Posts: 181
Joined: Tue Sep 04, 2012 9:22 pm

Post by dognotdog »

Have a link to that SD card reader?

Kjetilei
Posts: 334
Joined: Fri Mar 16, 2012 8:26 pm
Location: Stavanger, Norway

Post by Kjetilei »

SD card reader: SD Card Module Slot Socket Reader for Arduino ARM MCU

Info about the SD card reader being compatible: LCD Upgrade

20x4 LCD Display: HD44780 2004 20x4 White Characters LCD Display Module + Blue Blacklight

HD44780 based LCDs should be compatible with both Marlin and Repetier firmware: Marlin, Repetier

Rotary encoder: EC11 car ROTARY ENCODERS 20 Position Step-level Modulator for DVD CD Speaker

Momentary push button: Red LED 12V Lamp Round Cap Self-locking Push Button Switch 3A 250V AC - I'm a little uncertain about this one - worth a try...

In addition I bought some other bits and pieces:
2 x 10K OHM CERMET POTENTIOMETER - 1 used for LCD backlight dimming. The other might be usable for dimming the push button LED?
25 x 1N4004 Diode 1A 400V - D1 on RAMPS - to be able to print from SD without USB cable attached
10 x 40Pin 2.54 Single Row Pin Male Header - cut to size and soldered on the RAMPS AUX ports.
80 x Dupont wire cable 1p-1p female pin connector 2.54mm 20cm - bought due to the many different colors and pre-crimped terminals
25 x 10P Dupont Jumper Wire Cable Housing Female Pin Connector 2.54mm Pitch - will be cut down to correct sizes
10 x 5x7 PCB Prototype board - only one "needed" but the price difference was minor

PanelMax tutorial

Notice: the SDCARDDETECT Hack described in the tutorial is not needed - use Refresh command in the LCD menu.

I plan to leave AUX1 free for possible future Bluetooth upgrade

satoer
Posts: 436
Joined: Mon Oct 01, 2012 8:00 pm
Location: Netherlands

Post by satoer »

This isn’t the standard SD shield for Arduino. Make sure the data lines to the SD card communicates with 3.3V instead of the 5V Arduino works on. Otherwise you may fry the SD card. I’ve used that SD card reader with another Arduino project and used a level shifter to translate the Clock, DI (MOSI) and the CS (CHIP SELECT) to 3,3V
My Felix 1.5 printed designs on Thingiverse
E3D V6 Hot end upgrade for your Felix
Tweezer bracket for your Felix
Led bar upgrade for your Felix

Kjetilei
Posts: 334
Joined: Fri Mar 16, 2012 8:26 pm
Location: Stavanger, Norway

Post by Kjetilei »

Hi satoer,

Thanks for the feedback.

I'm aware of the possibility of frying the SD card if the shield feeds it 5V. I planned on using a dirt cheap SD card to test with. Also the link on the German blog linked to a LC Studio card that looks identical to the card I have ordered.

If the SD reader does not work as I hope I plan on adding a level shifter or just buy a "SD Ramps" if adding the level shifter is too difficult/time consuming - something I doubt.

I'm not doing this to save money but to learn more and hopefully find a cheaper solution that other DIYers can follow.

satoer
Posts: 436
Joined: Mon Oct 01, 2012 8:00 pm
Location: Netherlands

Post by satoer »

I’ve looked into the schematic of that SD card when I want to use it on my project on the Arduino
forum:
http://arduino.cc/forum/index.php/topic ... #msg809887
Turns out, it has some kind of 5V to 3.3 V conversion using dividing resistors. But… the drawback is, that it needs a special SD card library to use it. If you want to use the regular SD card library like the RepRap firmware does, you really need to use a level shifter to bring down the voltage on the data lines to 3.3V
If you look at the RepRap Wiki SD card section:
http://reprap.org/wiki/Sdramps
You see there’s a special chip that needs to be soldered to the PCB. This is the 74HC4050. And guess what that kind of chip this is ;-)
It’s fairly easy to add this level shifter to your SD card reader (just buy a DIL version of the HC4050).

Internal schematic:
Image

Feed pin 1 with 3.3V
GND on pin 8
MOSI (from the Arduino) to Pin 3
Pin 2 to the MOSI (SD card PCB)
SCK(from the Arduino) to Pin 5
Pin 4 to the SCK (SD card PCB)
CS(from the Arduino) to Pin 7
Pin 6 to the CS (SD card PCB)
My Felix 1.5 printed designs on Thingiverse
E3D V6 Hot end upgrade for your Felix
Tweezer bracket for your Felix
Led bar upgrade for your Felix

Kjetilei
Posts: 334
Joined: Fri Mar 16, 2012 8:26 pm
Location: Stavanger, Norway

Post by Kjetilei »

Thanks for the info/schematics!

I knew about the dividing resistor but hadn't noticed that it requires a different library! Strange... The DFRobot SD module used in the PanelMax tutorial does not have a level inverter either.

I knew about the level inverter being used on the SD RAMPS module but I hadn't looked into how it is wired. Your schematics will help me out! Of to ebay then ;) Thanks!

dognotdog
Posts: 181
Joined: Tue Sep 04, 2012 9:22 pm

Post by dognotdog »

I just ordered one of these: http://www.komputer.de/zen/index.php?ma ... cts_id=122

It has level shifters builtin, and both regular and micro sized SD sockets. Also, I think it's dirt cheap. I'll post more info once it arrives, and I've attached it.

Kjetilei
Posts: 334
Joined: Fri Mar 16, 2012 8:26 pm
Location: Stavanger, Norway

Post by Kjetilei »

dognotdog: Thanks for the link. Please let us know how it works.

It is also available from ebay at $7.49 including shipping

I also found a nice micro SD-only module with a level shifter that looked nice at $6 + $4 shipping

Since I'm a complete novice regarding electronics: could a SN74HC04N be used as a replacement for a 74HC4050?
2 X SN74HC04N $0.99 including shipping
2 X 4HC4050 $0.99 + $2.99 shipping

And once again: I'm not doing this to be cheap, just trying to figure out how cheap we can build a LCD/SD combination :)

Post Reply