Managing motors with dual L298N

At least You can swap Z axis encoder if your works bad.
I’ve posted video about how i did it :stuck_out_tongue:

Making of that video give me a lot of laugh :stuck_out_tongue:

I hope You will enjoy. Leave comment to boost my channel :stuck_out_tongue:
Still haven’t get any money from YT :stuck_out_tongue: but still, lets share some fun.
I had to stop working on my maslow becouse i had to sell my laptop… lack of money. Coronavirus killed my business.

2 Likes

Sorry to hear that, I think allot of small hobby and medium businesses will really get hurt by this pandemic. Here we are all watching movies about zombies, aliens, dirty politicians and nuclear wars… and what stops the world; a bug so small we can’t even see it, from a country that really supplies the world with industry.

1 Like

So i am still reading a lot of these (not enough time in a day), but has anyone else had any luck with using different motors on the originally designed Maslow Kit? From the looks of it you seem to be the only one?

2 Likes

Ok. Another idea. I will connect Optical encoders direcly to that 3mm motor shaft :stuck_out_tongue:
It will give me 300*2400 PPR xD = 720000 :fire:
If that will be too much i will try to lower PPR by using external arduino Nano for both top motors.

I will use small rubber tube as joint. I need to get new laptop for maslow :stuck_out_tongue:

2 Likes

It’s the END.
Opitcal encoder for Z axis with 2400 PPR works good.
Both top encoders mounted in two diffrent configurations doesn’t work.
One time the resolution is too low, other the wobble from motor rpms are too big and it dismount itself xD
I’m already build new cnc in 80% (Frame, x,y,z axis). I’ve recycled parts from maslow into this new project. It will still work on GRBL servo programs with arduino (maybe mega/Due) I think maslow shield can run it too xD.
Yup and I started my own company to get money. Yea, i quit low paid job to kickstart on my hobby.
I’ve got some news from people that managed to run maslow with my DIY boards. HEH :slight_smile:
You will still get my support :smiley: On THE TOP of thread are links for my EASYEDA profile where You can find prbbly 3 working versions of maslow 1.2 shields.

@HipNerd :slight_smile:
There are scripts for drawing that can process images. Some tweaks can be made to product Gcode

My Maslow adventure ended :v: No problem, everyday we roll dice and sometime we get 6sis and sometime don’t

1 Like

Hi Marcinan,

sorry to hear about that;
I was loosely following your work, and I was amazed by what you have done/found yourself: the PCB, the ring, the steel bar, the L and R motor reinforcements, and, and …
I could pinpoint several others.

I myself was stuck at the prototype stage, when using for the Z axis, a motor coming from a photocopier: 24V, no gearbox and 100PPR, far from the standard Maslow motors encoders.

That motor was oscillating and I have found it had to do with PID, but never found which parameter had to be tuned.

My project is put at sleep but I still hope to wake it one day.
I could understand your point.

If someone is interested, here are two great (huge) resources about PID control:
Controlguru – an online resource for practitioners of process control. :
https://controlguru.com/
Teaching Old Motors New Tricks, especially Part 1: Introduction to Motor Control, PI Controllers, PID Controllers and Intro to Field Oriented Control :
https://training.ti.com/teaching-old-motors-new-tricks-c2000

1 Like

Yes. But experimental pid setting wont allow to get precision. I saw maslow 1 rig made on heavy windshield motors(made by some Polish). They got 1:55 gearbox and if You have tools to make motor shaft longer you can get about 22000PPR from 300-400 optical encoder.

I’m building diffrent CNC on maslow motors. Now flat with DCServo and I’m working on scenario about tuning this sh…
Make screenshot. Lower 2nd ‘i’ and 3rd ‘d’ parameters to 0. Then slowly get P-roportional lower till it stop oscilating. 0.1 point every step.
If the oscilation is low enough start tuning 3rd parameter. Than 2nd parameter to make oscillation slow down even faster.

To make it faster put Z axis motor on table. Mount optoencoder to the shaft via hotglue and start tuning.
To get test done You can run DCServo code

Edit H-bridge and encoder pins in Arduino IDE (You can leave DIR and STEP pins becouse they wont be used) to match maslow shield output.

HEH. Peoples who got some skill in making visualisation on Arduino IDE Graphs can show somth like this

1 Like

I was almost to give a warning, but looking at it again i am amazed about the work on this that you are doing. Would love to see more on alternatives! Thanks for the effort you are putting into this.

Kind regards, Gero

Spooky! I just built a CNC machine based on this design by homofaciens (Norbert Heinz):
https://www.homofaciens.de/technics-machines-cnc-v0-6_en.htm

However, instead of using his code for the Arduino controlling it I used grbl. Then I added two Arduino Pro Minis with misan’s dcservo for the X and Y axes. It’s a small world after all.

1 Like

Im doing this on arduino nano becouse I’ve got shield ready for this. I will need to repeat tuning process after assembly becouse friction will change response. But atm im close enough to get max speed from this setup

One thing to add. The L298 modules are not that good. They drop a lot of voltage, and they get hot. On my CNC I had to add a small fan to cool the module.

However, they are cheap and easily available…

2 Likes

I’m preparing ESP32 shield :stuck_out_tongue:

It may work by connecting encoders into limit switch pins and external H-bridges to DIR and STEP pins

If You got any suggestions please let me know :stuck_out_tongue:

1 Like

Does this work to drive a DC motor? I guess it kind of does :grinning:

yup. its possible to run 7axis and 6 encoders :stuck_out_tongue:
but there is no software yet

Ok. I’ve ordered prototypes from china. I will build grbl esp32 software adaptation, then sell them on tindie


2 Pics but with wrong ESP32. This is 30 pin, and board is made for 38 pin.
Now my way thru porting hell begins. I will try… try maybe fail to port GRBL ESP32 library to that board.

3 Likes

Very exciting!

Pinout

#define MACHINE_NAME “numernabis_4axis_xyyz” //now based on “ESPDUINO_32”

#define X_STEP_PIN GPIO_NUM_18
#define X_DIRECTION_PIN GPIO_NUM_5

#define Y_STEP_PIN GPIO_NUM_17
#define Y_DIRECTION_PIN GPIO_NUM_16

#define Z_STEP_PIN GPIO_NUM_4
#define Z_DIRECTION_PIN GPIO_NUM_0

#define A_STEP_PIN GPIO_NUM_2
#define A_DIRECTION_PIN GPIO_NUM_15

#define SPINDLE_TYPE SPINDLE_TYPE_RELAY //SPINDLE_TYPE_PWM
#define SPINDLE_OUTPUT_PIN GPIO_NUM_26 //DAC //PWM //ON_OFF

#define X_LIMIT_PIN GPIO_NUM_36 //A //I will just connect both limit switches to one input :confused:
#define Y_LIMIT_PIN GPIO_NUM_39 //B //As PinMode(Y_LIMIT_PIN,IMPUT);
#define Z_LIMIT_PIN GPIO_NUM_34 //C //As PinMode(Z_LIMIT_PIN,IMPUT);

//BONUS LIMIT SWITCHES
//#define D_LIMIT_PIN GPIO_NUM_35 //D //As PinMode(D_LIMIT_PIN,IMPUT);
//#define E_LIMIT_PIN GPIO_NUM_32 //E //As PinMode(E_LIMIT_PIN,IMPUT);
//#define F_LIMIT_PIN GPIO_NUM_33 //F //As PinMode(F_LIMIT_PIN,IMPUT);
//#define G_LIMIT_PIN GPIO_NUM_25 //G //As PinMode(G_LIMIT_PIN,IMPUT);
//#define H_LIMIT_PIN GPIO_NUM_27 //H //As PinMode(H_LIMIT_PIN,IMPUT);

//BONUS ALARM SWITCHES
//#define X_ALARM_PIN GPIO_NUM_23 //As PinMode(X_ALARM_PIN,IMPUT_PULLUP);
//#define Y_ALARM_PIN GPIO_NUM_22 //As PinMode(Y_ALARM_PIN,IMPUT_PULLUP);
//#define Z_ALARM_PIN GPIO_NUM_21 //As PinMode(Z_ALARM_PIN,IMPUT_PULLUP);
//#define R_ALARM_PIN GPIO_NUM_19 //As PinMode(R_ALARM_PIN,IMPUT_PULLUP);

/*//ENABLE EXTERNALS
#define COOLANT_MIST_PIN GPIO_NUM_8 // labeled Mist
#define COOLANT_FLOOD_PIN GPIO_NUM_7 // labeled Flood
#define PROBE_PIN GPIO_NUM_13 // labeled Probe

#define CONTROL_RESET_PIN GPIO_NUM_35 //PinMode(CONTROL_RESET_PIN,IMPUT);
#define CONTROL_FEED_HOLD_PIN GPIO_NUM_32 //PinMode(CONTROL_FEED_HOLD_PIN,IMPUT);
#define CONTROL_CYCLE_START_PIN GPIO_NUM_33 //PinMode(CONTROL_CYCLE_START_PIN,IMPUT);
*/

2 Likes

“What is the working principle of this dust removal system?”