Monday, March 20, 2017

New motor control board. I'm in love

I came across the cytron motor driver board on roboshop.com and now I'm completely happy with what I got. Originally, the l298n was not up to the task. It gets very hot after maybe 5 minutes of operation and I could litterally feel the electricall smoke (which is a familiar scent). The worst part is that it is lowe power, 2-3A on paper I believe and it really struggles to drive my RC motor. Thats when I thought it was a good time to buy a new motor driver. This one is 10A so it would be more than enough to handle the current. The pinout and the wiring are almost identical. There is 1 pwm pinand 1 direction:polarity pin and the logic table is written on the board. Both pins high means forwards, pwm high and dir pin low meams backwards. Pwm low mean stop môtr. Fairly simple.
The only downside is tbat I wont have my 5v regulator anymore which is kind of sad. But I'm adding my own regulator using some transistors. So far seems to be working fine.

Thursday, March 9, 2017

3D Printer First Major Mod

To be able to fully support the robot I figure it is time to upgrade my printer. My old printer dies due to bad heated bed wiring. The zip tie that ties the power and heat probe cables was carving into my timing belt which caused major wear issue. It was also carving into my power wires and as the result of that. My power wire bed was shorted, my board died, the temperature is out of control and shoots up to 50 degree in 2 seconds when I plug it in. Crazy Stuff right there. I ended up returning it to amazon and they sent me a replacement. Thank you amazon, amazon is just the king of customer service in my opinion.

Anyways, since I do not wish to face this issue again because I want to keep printing nice things for my robot. I decided to take actions, I bought a couple of things, a 16T metal pulley from Reprap Champion and 2 3mm bore toothless pulley to replace the old cheap plastic pulleys. I also bought some cable wrapping, zip ties, drag chains and new timing belt. When they arrived in the mail I knew it was time.

So I unscrewed the bed, re-solder the cables so that they face backwards. Then I cut the belt to get to the pulleys. I took out all the pulleys and replace them with new ones. The Y stepper pulley is a little bit stubborn but I managed to take it out. After that I opened the side and bottom panels to get to the board. I drilled a hole in the back and re-wired the cabled. Then I added my chain drag and cable ties. And when I was done with it, I turned it back on and BAMMM. It works. It turns out to be even nicer than I thought.

Here are some pictures



Monday, March 6, 2017

2.4 Inch TFT Touchscreen module


I came across this awesome module on Ebay and I did not hesitate to buy it for under $10. Currently I'm having a little bit of a problem with my controller since the analog readout from my microcontroller is non that great. It uses its built in 10 bit ADC which converts 5V analog from the joysticks to digital levels. The biggest problem is that it will ouput the maximum level at 1023 at around 4V (supposed to be 5V). This is a pretty big deal and it causes the joystick to be extra sensitive. One light touch on the joystick with cause it move to maximum. Which is hard to control variable speed motor. 

A digital touchscreen could be the solution to all of this.  The genuine touchscreen module out there is probably the one from Adafruit. They're fairly pricey too. I would suggest that one if you are manufacture your products. For me since this is a prototype I'm okay with using the one on Ebay. Save me the cost. 

This touchscreen module is running  spfd5408 controller which no longer supported. There is only one library/driver for this controller and it is from Adafruit. Here is the link to that library:
https://github.com/JoaoLopesF/SPFD5408

One thing that you should note when using this library is that when you upload the code and start your touchscreen module. You might notice that your touchscreen is not working. Don't panic it is probably because the pins are not correct. The pins were changed around a little so in my case. In your Arduino touchscreen sketch change the pins as below:
#define YP A3
#define XM A2
#define YM 9
#define  XP 8

you can also look at the schematic (if provided) for the pinout on the module that you bought.

The next problem I ran into is that the coordinates are messed up for my module. Luckily, you can change the configuration by editing this file : SPDF5408_Touchscreen.cpp. In there locate this line of code: return TSPoint(1023 - x, 1023 - y, z);
for me it got it working with this settings: return TSPoint(x,y-50,z); you can play around with these values to get your desired result.

And that should get you up and running. This is a great little module. I wish it is a little bigger so I make a wall display. That'll be really cool.