Porting to faster hardware

A nice demonstration of the Teensy3.5, thanks for the link. The Teensy 3.6 or 3.6 look like they would be worth investigating for the Maslow - plenty of gpios, on board floating point, and SD storage too.

2 Likes

Interesting - by editing cnc_ctrl_v1/utility/direct_pin_read.h to deal with the Teensy 3.5 & 3.6, and hiding the TimerOne library parts from the cnc_ctrl_v1 directory so that the version installed by the Teensyduino installer is used, the firmware will compile :slight_smile:
I don’t have a teensy board to try it on, but it is tempting…

utility/direct_pin_read.h
line 8: if defined(AVR) || defined(MK20DX128) || defined(MK20DX256) || defined(MK64FX512) || defined(MK66FX1M0)

1 Like

That makes a lot of sense because most of the libraries we are using were written by Paul who created the Teensy :wink:

EEPROM does wear out. Flash is a form of EEPROM, they are basically the same thing with the only real difference being the logic with which the data is read, written and erased (EEPROMs are single byte while flash is block-based ). (in fact, flash was born from EEPROM) Generally speaking I agree that flash can handle more write cycles than EEPROM so it can last longer but to say it doesn’t wear out is not true. The lifespan of flash is changing (improving) these days too, I’m not super current on the new stuff but I know it’s been getting better and better.

They are both non-volatile memory and they both store memory using floating-gate transistors. At risk of stating the obvious, read cycles shouldn’t affect lifespan, only erasing/writing.
Now how all this pertains to how Maslow works I have no clue…

Fun side story: In the mid 80’s when I was a kid we got a puppy and my (nerdy EE) dad named it EEPROM. (theoretically because you can “program” a puppy to do things, and she was a black lab (and the chips were black)) The name only lasted a couple weeks because my mom and pretty much everyone who ever met the dog said “what’s eeprom?!” and it became tedious for my dad to explain (and even after the explanation blank stares ensued). The dog’s name was eventually changed to Frito…

Edit: now that I think about it I bet the dog’s name was actually EPROM (one E) because I vividly remember seeing those chips with the little clear window on them around the house (my dad’s “startup” was literally making computers in our basement. laying out traces by hand and etching and hand soldering, it was crazy) from what I recall those little windows were for erasing the chip with light… So they were not Electronically Erasable, just Erasable…

Sorry to distract from the matter at hand!

5 Likes

You erased the chips with ultraviolet. We had an extruded aluminum gadget with a UV bulb and a timer that would do several at a time. If you didn’t cover the window (black electrical tape worked great) regular light would gradually rot bits away. The full name was UV erasable EPROM

1 Like

There is a lot of room to run, lots of popular hardware. Note that the 3C printer community, the open side has stuck to the Mega this is due to the cost of the mega and a 5 axis controller. X,Y&Z motors & 2 Extruders + GPIO. You can get this on Amazon for $20 - 30 including a LCD interface.

The reason I bring this up - is I’ve been looking at a board I backed - The Udoo

there is the Udoo & Udoo X86 , both incorporate a Arduino as well as a PC mainboard in one package. The original Udoo has a Arduino Due compatible built in. This would limit you to Linux if it were compatible with the Maslow Controller. It is a reasonably priced solution for a workstation / arduino combination and opens a lot of powerful options.

I use the X86 with Windows 10 & Ubuntu as a dual boot system. It’s embedded Arduino is Arduino 101 compatible so the layout of an Uno.

Here is a 4 axis board I’m looking to add to it -

https://reprapchampion.com/products/assembled-cnc-v3-arduino-shield-for-a4988-drv8825-stepsticks-router-mill-robot?utm_medium=cpc&utm_source=googlepla&variant=12077060550&gclid=CjwKCAiA3JrQBRBtEiwAN7cEGnn5CA9JbJOpBNPa553ZZfueF2H2fdqOXGK9lr4vACPGSdK7L_-dgxoCHe4QAvD_BwE

I had a intel Atom based windows PC mounted to the side of my first 3D printer. I believe in dedicating a pc to my machine.

Is there a list of the pins used on the mega anywhere?

I invite comments please. The one that doesn’t need to be said is “yes the Udoo is probably not an option for the kit due to price” . For me the X86 version has been a great compatibility test bed.

That looks like a well made board, and a nice low price. There’s been steady improvement on the Arduino core for the ESP32, it’s well supported. The Maslow requirement for 15 control signals will make a big dent in the available I/O, though, and will need some careful planning to avoid the pins with special limitations.
I’ve spent some time working to get the Maslow firmware to compile on the Arduino-esp32 setup, much works right out of the box. The TimerOne library and the interrupt configuration were the areas that would need adaptation if I remember. If you’re set up for the ESP32 boards, see what you think would be needed to get the firmware to compile.

In the firmware, in the file CNC_Functions.h:

//PCB v1.2 Detected
    
    //MP1 - Right Motor
    ENCODER1A = 20;
    ENCODER1B = 21;
    IN1 = 4;
    IN2 = 6;
    ENA = 5;
    
    //MP2 - Z-axis
    ENCODER2A = 19;
    ENCODER2B = 18;
    IN3 = 7;
    IN4 = 9;
    ENB = 8;
    
    //MP3 - Left Motor
    ENCODER3A = 2;
    ENCODER3B = 3;
    IN5 = 11;
    IN6 = 12;
    ENC = 10;
1 Like

Many thanks to you - this helps

I like the Adafruit feather line for the onboard power management -

https://www.adafruit.com/product/3405

I should explain further - my bad, sorry. I am researching solar power, several of my microcontroller
projects are using solar and induction power. I have a solar generator I’m using on a 3D printer. It’s an aim at green power. I’m in LA California, we have power almost continually with almost no down time since 1994 where I am. Recently the local power station caught on fire the the power went out for ~ 3 hours. It was like the end of the world for some folks. They ran to the store to horde water, for the life of me I didn’t understand the thinking behind that. The water works in the dark. The point is it was a very minor hickup to me due to my solar setups.

I also want to point out there is a lot of WiFi bashing taking place here. With proper setups WiFI and tools/ other electrical works fine. There are some that will have issues, know that should be the exception not the rule. I do not think as a community we should build to the exception.

To operate is the power management needed ? - no, however with a $3 battery I can ensure a power hiccup with my setup will keep working and run for around an hour after the main power is out in an outage.

It’s a feature and I like the size of the boards - in theory I could make stackable H bridge shields and mount the whole thing on a fan.

Here is a board without power management for $4 less -

If we want to develope a board of our own here is the module alone for $9

It’s worth noting it has Bluetooth too. If running under multitasking it could run a webserver with an upload interface.

I have a 3D printer that runs on a 150 watt solar battery doing a 93 min print it uses around 60-70% of the battery. I have a bigger main back up battery and looking to add more.

$3 battery is the lipo to run the logic, the router would be running through a 1200 watt battery

Lets breakout the power -

3.3v logic run over a 5v USB port

The H Bridge Motors over 12v

and the router over 120v AC - US from 12v battery via inverter

I have a buddy I work with in the UK so we go over this often enough but he only powers quad copters so no need to invert to UK mains. I’m curious to know if the difference in voltage for inversion makes it less efficient going to 200+.

I’m running my 3D printer off the inverter, I could run it directly off the 12v port and I’d get more run time but it requires buying/making a cable. In the case of the 3D printer I did it to be able to run a demo where there is no power socket. I mentor at a Hacker Space. Sometimes they have booths in parks with no power available.

What pins are essential on a ESP32 for maslow? There are so many different boards with ESP32 some with lots of pins some with only a few, I kinda like the tiny ESP32 modules though i can’t figure out if they have the right pins available.

1 Like

I don’t know the ESP32 very well yet -

there is this

Big answer, first from the Maslow end:

=====================================

MaslowCNC PowerControl Board GPIO PINS

Essential Group - gotta have these:

SIGNAL     TYPE     SPECIAL REQUIREMENT
---------- -------- -------------------
//MP1 - Right Motor
ENCODER1A  INPUT    INTERRUPT
ENCODER1B  INPUT    INTERRUPT
IN1        OUTPUT
IN2        OUTPUT
ENA        OUTPUT   PWM

//MP2 - Z-axis
ENCODER2A  INPUT    INTERRUPT
ENCODER2B  INPUT    INTERRUPT
IN3        OUTPUT
IN4        OUTPUT
ENB        OUTPUT   PWM  

//MP3 - Left Motor
ENCODER3A  INPUT    INTERRUPT
ENCODER3B  INPUT    INTERRUPT
IN5        OUTPUT
IN6        OUTPUT
ENC        OUTPUT   PWM


Non-essential Group - nice to have

SIGNAL     TYPE     USED
---------- -------- ------------
AUX1       IN/OUT   GENERAL I/O
AUX2       IN/OUT   GENERAL I/O
AUX3       IN/OUT   GENERAL I/O
AUX4       IN/out   use this input for zeroing zAxis with G38.2 gcode
AUX5       IN/OUT   GENERAL I/O
AUX6       IN/OUT   GENERAL I/O



 POWER
The Maslow board needs a logic-level voltage supply for the bridge chips
and the encoders. Both are tolerant of a wide range of supply voltage, so using
3v3 from a host that only handles 3v3 on its inputs should work. The LED on the
Maslow board labelled 'USB' is tied to the logic voltage supplied from the host, 
not to the USB power (which would be 5V even on a 3v3 host).

=====================================

The ESP32 end is messier, there are so many different implementations, many similarities but subtle differences. Watch out, here be dragons…

=====================================

ESP32 GPIO PINS special requirements
 -- NOTE, varies by board design
           these are some of the 'special requirements' that
           I've seen on various boards, check on the specific 
           board you're using

PIN     SPECIAL REQUIREMENT
------  -------------------           
0       PULL-UP FOR BOOT-UP SELECT
2       PULL-DOWN FOR BOOT-UP SELECT
4       PULL-DOWN FOR BOOT-UP SELECT
15      PULL-UP FOR BOOT-UP SELECT

12      OUTPUT ONLY, PULL-DOWN, MUST BE LOW DURING BOOT
13      ON-BOARD LED
32      IN/OUT, ALSO CONECTED TO XTAL
33      IN/OUT, ALSO CONECTED TO XTAL
34-39   INPUT ONLY, NO PULLUPS, CAP BETWEEN 36-37 & 38-39    

=====================================

Forgive me for turning on the firehose :smile:

Edit: added info about power supplied to the Maslow board from the host micro.

2 Likes

Is power management an issue on a cnc controller?

Yes, anything that depends on real-time responses has serious problems when
power management kicks in (this is one of the advantages of using something like
a Pi, it’s so low power you don’t need to do power management on it)

I¢m more interested in whether we can add websockets serial to make it wireless. Power management and networking don¢t make for the best bedfellows.

Websockets still requires networking working well to work. So it doesn’t solve
the poer management problem.

We don’t need websockets, that would just require that we involvea browser,
there are a number of tools out there that can accept a TCP connection and drive
a CNC machine.

David Lang

Just to be clear, and ESP32 is not an arduino compatible device. It’s just that
you can use the arduino IDE to drive a compiler that’s compatible with the
ESP32, and people are making libraries that make many/most Arduino programs run
on the ESP32.

I cringe reading things were the source-level compatibility and the binary
compatibility get mixed up (part of the reason is that it gives the Arduino
folks credit for a lot of other people’s very hard work)

David Lang

You’re right, I should have been more careful with my citation. The appropriate link to the excellent support would be this: