Thursday, October 10, 2019

Suppressing minorities

A recent CNN report shows the Chinese government seemingly targeting Uighur minorities in Xinjiang.

Disturbing video shows hundreds of blindfolded prisoners in Xinjiang

It is extremely sad to see minorities being targeted.

As the supposed leader of the free world, the U.S. has called on the Chinese government to stop its repression of minorities.

Locking up native minorities in camps, taking over their lands, pushing them into corners, widening income gap between the native minorities and the newcomers... this may sound like Xinjiang in 2019, but one must remember that this was also the case with the U.S and the native Americans. And is still the case, as native Americans continue to be segregated in reserves, their lands in the hands of the white men who came from across the seas.

After pushing the native Americans off their own lands, and developing it into their own booming economy, the newcomers are not going to just "give the land back" to the native Americans, right? Expecting the Han Chinese who have moved into Xinjiang to do the same with the Uighurs is similarly wishful thinking.

Telling others "What you are doing is wrong, stop it" is one thing. But another better way of doing things is to set an example, and show people "This is how you should be living in harmony with the native minorities in co-prosperity." If the U.S. can do that, it will be the true leader of a democratic system which believes in equality and human rights.

Until such a day comes, people in glass houses should not be throwing stones at others.

Sunday, October 06, 2019

Alert at the end of print: custom commands on ESP3D

As some may know, I have been working on a 3D printer control board based on the ESP32 microcontroller. It basically allows control of the 3D printer via any web browser. The underlying firmware is a custom fork of Marlin, while the web interface is the ESP3D webUI.

Recently, the webUI has been expanded to allow the handling of custom commands sent from the firmware using M118 gcodes. For example,
M118 [esp3d]eop
will print the message
[esp3d]eop
on the serial interface, telling the webUI the print has been completed ("eop" for "end of print"), triggering the webUI to play a short beep. This is a useful command that can be added to your end gcode.

Another custom command is
M118 [esp3d]beep(1000,300)
while will tell the webUI to play a sound of 300Hz for 1s (1000ms).

Right now, these are the only two custom commands that have been included in the webUI. But users are free to modify the custom.js file to add in addition commands that they want the webUI to handle. You can see how the above two commands were implemented in the file, and modify it to suit your needs. BTW, the webUI works on other hardware that runs the ESP3D firmware too.

Thursday, October 03, 2019

Video shows Hong Kong police shooting in self-defence

Hong Kong continues to be in turmoil as protesters continue to take to the streets with their five demands. But the problem is, some of the protesters are more violent than others, and we have seen cases of people being beaten, property destroyed (smashed or set on fire), and clashes with the police. Yes, the protesters don't have firearms, but blunt weapons like metal pipes can still deliver fatal blows. And they have Molotov cocktails too.

So it was big news when the police shot one of the protesters with a live round. The global media basically exploded with "Police shot protester" headlines and news. The initial coverage seemed like the police using disproportionate force.

Until the video of what happened before the shooting came out.


And then, people see that it was the protesters who were being extremely violent, assaulting a lone policeman with blunt weapons like metal pipes and hammers. When other policemen turned up to assist, the protesters attacked them too. Which led to the shooting.

Such news coverage brings to question the protesters' legitimacy. One of their demands was about police violence. But with such a video now, it would seem that the police are not the violent ones, have been exercising restraint, and any use of force was in self-defence.

It also brings into question the global media's past coverage of the protest. Had the media been too one-sided in its coverage, playing up the legitimacy of the protesters while purposely trying to portray the Hong Kong government and police in a more negative light? Can we trust the media to be unbiased in its reporting?

Whatever the case, the violence of the protesters cannot be denied, with subway stations being torn apart and set on fire. Public buildings being attacked. Vandalism, destruction of public and private property, trespassing, the list of crimes goes on. And anyone who condones such action cannot be said to be a law-abiding person, cannot be said to be someone who promotes the rule of law.

The moment the protest turn violent was the moment the protesters lost their legitimacy, their morale high ground. Now, they are just a bunch of thugs sticking together so that they cannot be caught and tried. If they had not turned violent, they stood a chance. Now, everything is just going to go downhill.

Hong Kong protest: an opportunity already lost

Singapore's history of separation sets it apart from Hong Kong: Historian Wang Gungwu

This article is actually got an insightful read on why Singapore was able to survive through independence while Hong Kong is in a totally different scenario. Geographically, Peninsula Malaysia is Singapore's hinterland, but Singapore has never been very reliant on its hinterland, instead trying to source for resources from further away. As an international port who main purpose was to move goods, the focus has always been further away.

But Hong Kong is a different place. It served as a gateway for the West into China, and as such, there has always been that strong relationship with its hinterland, China. Even during British rule, Hong Kong businessmen have ventured into China in search of cheaper labour. This is all the more after the handing back of Hong Kong; Hong Kong is economically tied so closely to China that it is hard to imagine how an independent Hong Kong can survive. Remember, China is not reliant on Hong Kong; it now has other ports for international trade, other outlets for the products of its Guangzhou manufacturing sector. But Hong Kong has no other hinterland, and on its own, no resources to speak of. With the door to China closed, how many will continue to see Hong Kong as a beneficial trading partner?

So while I applaud the protesters for their determination to get greater freedom from Beijing, I think they need to think through about what is the final shape of things that they want. "Five demands" is not the endgame, and it serves no logical end except as a "feel-good" thing for the protesters. If they are really serious about effecting political change for the better of their society, they need to come up with a plan, not demands. Giving demands, and then bashing things up when the demands are not met... that's like a kid in a toy store, smashing toys in the store until the parents give in and buy the kid a toy.

And the longer this drags on, the worse it gets for the protesters, not Beijing. The protesters are making life difficult for the people of Hong Kong. In the beginning, they may have public sentiments on their side, but as inconvenience drags, and business starts to become adversely affected, there will be rising public resentment instead. The protesters should have sat down and tried to negotiate a better deal the moment Carrie Lam relented. That was the lost opportunity. Now, that opportunity is lost, and as time goes by, the attention of the global media will be drawn to other new things, and soon, the protesters will be left forgotten, their cause unfulfilled.

They didn't see the opportunity, and now have lost it. All that remains is for the media attention to die down, and this protest will be like a fire, slowing dying out after consuming everything within its reach.

And then, the Beijing hammer will strike down hard. And the protesters will have no one but themselves to blame. For they were the ones who lost that opportunity for a better deal.

Monday, September 30, 2019

Making the MRR ESPA board available

In a previous post, I mentioned that the MRR ESPA is being made available via Kickstarter. Unfortunately, the funding goal was not met, and it won't be made available to the general public via the Kickstarter platform.


Still, I do hope to somehow get this board out to people who are interested. The project will continue to be hosted on GitHub at its "official" repo. This will be the repo where any future work, documentation, etc. will be uploaded as the board is past its development stage and is ready to be shared. If you are interested in the MRR ESPA, please check the repo for updates, the latest files, and other news.

As of today, the latest version of the board is v1.3 (files have not been uploaded to GitHub yet, will do so once the files have been updated with LCSC part numbers to make it easier for people who want to make their own boards to get their hands on the required BOM).

Note: "Making the board available" probably entails me soldering the boards together by hand instead of commissioning assembly to a company like Elecrow.

Note: Pre-launch version now available here. Some information on this has been updated here.

Thursday, September 26, 2019

Maybe Trump wants to help China

I am not a conspiracy theorist. But it is a professional habit to speculate about possibilities, so that one can be prepared. And thus, when I look at the current situation in the U.S., I sometimes wonder about what is really happening.

And one such possibility that cannot be ignored is that Trump is actually trying to help China. In exchange for business favors. And here is why it is actually not that far fetched.

Trump knows his presidency will end. There is a term limit no matter how good he is. But his good friend Xi does not. Xi can be President for life. And if Trump can get into his good books, he can secure business favors to enrich his business even after his presidency ends.

And so, the secret deal could well be that he will do his best to throw the U.S. into chaos, such that it will not be in any position to hinder China's rise to the top.

A trade war? Yes, it affects both sides, even other nations. But China has the "fat" to survive this... while other nations will suffer the after effects for much longer. This puts them further behind China.

Ban Huawei? It gives Huawei a reason to break away from Google, and venture toward trying to secure its own independent share of the market. Without such an excuse, any attempt by Huawei to launch Hongmeng would be viewed with suspicion. Now, Huawei can just say it is trying to survive.

But won't Trump be charged for treason if they gets out? Well, no. Because by then, China would be too powerful to ignore. Politicians in the U.S. will need to think twice about charging Trump if China comes out and expresses "displeasure." By then, Trump would have flown off to the Caribbeans.

So there, a possibility. Not a fact, but a possibility. A speculation. But can we choose to ignore such a possibility?

Sunday, September 22, 2019

What really is freedom and democracy?

Looking at Hong Kong entering its 16th week of protests, I ask myself: what really is freedom and democracy?

Is the U.S. the best representation of what these concepts mean? If so, which aspect of the U.S. would that be? I have never lived in the U.S., only visited. What I see about the U.S. in terms of freedom and democracy is through TV, news, movies, and other media. But even then, I recognise that this representation of freedom and democracy that I see is not the truth. It is part of the truth, or part of an ideal; it is how the U.S. wants to be seen, but not what it actually is.

If the protestors in Hong Kong are fighting for this representation of the U.S. that they see in the media... boy, are they in for a surprise. Because the truth is probably different.

Another question springs into mind: how many of the protestors are in their forties or older? How many have actually lived as adults under British rule, to be able to give a fair and accurate comparison between Chinese and British rule? How many of them have actually had to pay taxes to the British, and continue to think that the British way was a better way?

Yes, democracy and freedom gave us the First Amendment. But it also gave us the Second Amendment and gun violence. See the stats here. And it gave us Trump and Brexit.

And if you look back far enough... it was the British who screwed the people of Hong Kong. After World War Two, the U.K. granted independence to many of its colonies. BUT IT HELD ONTO HONG KONG! Why? Was it because Hong Kong was the Pearl of the Orient, bringing in taxes to the U.K.? If the U.K. had granted independence to Hong Kong in the 1950s, when China was too weak to protest (having just fought a civil war; PRC didn't have a seat in the UN then, while the KMT had just been exiled to Taiwan), it would be a fait accompli by 1997. But no, the British held on to Hong Kong, and left the Hong Kong people's fate to China when the British left.

Instead of vandalizing the town, the protestors should sit down and really think through what is it that they want, and provide evidence of why that would work, why what they demand is going to be better for Hong Kong. Back their demands with facts, and no one can dismiss them. Talk only about ideals, and the more pragmatic will just laugh at them.

Saturday, September 21, 2019

Video update on MRR ESPA

Here are some video updates on the MRR ESPA, a 32-bit 3D printer control board with native WiFi based on the ESP32 microcontroller. Web interface is provided by ESP3D, served through a custom fork of Marlin 2.0.

MRR ESPA Kickstarter page

MRR ESPA GitHub page

MRR ESPA past development

Controlling 3D printer via smartphone:

Remote printing via webUI:

MRR ESPA controlling an Ender-3 to print PETG:

Accessing an IP camera via the webUI:

And the Kickstarter video:

Tuesday, September 17, 2019

MRR ESPA Kickstarter launched!


The MRR ESPA has been launched on Kickstarter!
Here is the link: MRR ESPA

It is priced to cover the cost of production and shipping, including any fees that must be paid to Kickstarter and PayPal/bank, plus any taxes on my end (unfortunately, funds received via Kickstarter will be taxed... sigh). The purpose for launching the MRR ESPA on Kickstarter is because I want to make it available to people who otherwise do not have the time/resources to make their own. I mean, the project is open source. Anyone can get the required files from GitHub, and make one. But buying the components (most of them do not come in quantities of ones, so you will need to buy in bigger quantities) and then soldering them... not everyone wants to do that.

So I talked to Elecrow, see what is a good "mass production" quantity that will bring the cost down, and got them to give me a low-cost quotation for drop-shipping via airmail. Added everything up, threw in taxes, payment fees, and voila! I got the magic number of 5,290 yen, which should be around USD48. It may seem a bit costly, but that price includes shipping. Plus confidence and quality, because the board will be made by Elecrow, who is quite established. (I had wanted to talk to SeeedStudio too, but they only entertain quantities of at least 1,000... which is way beyond what I am prepared to do).

While waiting for the Kickstarter to close, I will be testing the MRR ESPA on my modified FLSun Cube (it has undergone a CoreXY conversion). Standby for more updates!

For those who don't need the board, you can still show your support by helping to spread the news! There is also a 100 yen reward option. 😉

Note: Pre-launch version now available here. Some information on this has been updated here.

Monday, September 16, 2019

MRR ESPA printing away!

Here's a quick video of the MRR ESPA printing away. It is printing a model I found on Thingiverse, using PETG, and the MRR ESPA is installed in an Ender-3.

I am planning to launch the MRR ESPA on Kickstarter soon, so that it can be made available to a wider audience. My intention is to price the reward to just cover the costs: PCB assembly, shipping and handling, plus Kickstarter's commission. Why? Because this is an open source piece of work that is only possible through the work of the open source community, and this is my way of giving back to the community. Right now, I am just waiting for the PCB manufacturer/assembly company to get back to me with their final quote so that I can finalize the amount that I will actually need to get this going.

Why I really like the MRR ESPA:

  1. With a web interface, it basically means no more LCD controllers! I just control everything through a web browser. It means less cost: most, if not every hobbyist now, have a smart phone. There is no need to fork out money to buy a LCD controller or something like the MKS TFT32. Less parts mean less things to connect wrongly, and less things which can break down.
  2. Remote printing is possible since everything can be controlled via the web interface. I envision this to be a huge bonus for those who run printing farms. Imagine being able to have your printing farm located in a different part of the building, and every printer accessible via a web browser. You can sit in your office, and when an order comes in, you slice the file, send the gcode file to the printer remotely, and start the print. All from your office. Wow!


Special thanks must go to luc-github (who created the ESP3D web interface, and modified Marlin 2.0 to allow it to serve ESP3D to web browsers) and the Marlin ESP32 HAL contributors.

Next steps (not in any particular order):

  • Launch Kickstarter.
  • Test MRR ESPA v1.3 (the PCB is currently being manufactured; minor updates from v1.2.)
  • Test out CoreXY performance on my modified FLSun Cube (which is also a 12V system, unlike the 24V Ender-3).
  • Manufacture and ship on a successful Kickstarter campaign (wish me luck!)



Friday, September 13, 2019

Is nuclear energy the only realistic option for Japan?

Exiting atomic power unrealistic for Japan, minister says, disputing colleague

Japan's new Environment Minister, Koizumi Shinjiro, is one of those who wants to see Japan free from nuclear energy. But there are those who see alternatives as being not feasible.

But is that really so? Must Japan really rely on nuclear energy?

Of course, I am not advocating a return to coal and other fossil fuels. I am really hoping more work can be put into renewable energy. And yes, Japan is already working on that; there are mega solar power generation facilities being built in different parts of Japan. There are places with wind power generation, hydroelectric power plants at dams, and even geothermal energy.

And really, talking about geothermal energy, I would think Japan would be more active in seeking to exploit this form of energy. Besides digging for onsen hot springs, why not use that digging to locate sources of geothermal energy which can then be used to generate electricity?

Also, Nagano Prefecture actually gets quite a bit of sunlight, and is usually not as affected from typhoons as it is inland. Why not build more solar power farms there to harness this form of energy? Especially as more and more farmland is being left empty as people leave for the cities.

We need to keep trying. Because once we stop trying, nothing will improve. Denying the possibility of other options is the best way to be stuck with no options.

MRR ESPA v1.2 thermal tests

Update: The reason for the board (20A VBED fuse) heating up to extremely high temperatures has been found. It is because I wrongly assumed my heated bed to be a 180W@12V (=15A) heated bed. Instead, using a clamp meter, I measured 24A being drawn while heating. Obviously, drawing 24A through a 20A fuse is not the best idea.

Thermal testing results since I got my thermal camera. I had previously checked for temperature using a thermocouple as well as an infrared thermometer. I am posting here in case people miss the post on Github.

Running on 12V, heating up a 310mm by 310mm heated bed, the temperatures observed using a HY-18 MLX90640 thermal camera:

No active cooling: ~135degC (20A VBED fuse); ~100degC (VBED and BED connectors)
Bottom cooling: ~95degC (20A VBED fuse); ~75degC (VBED and BED connectors)
Top cooling: ~90degC (20A VBED fuse); ~75degC (VBED and BED connectors)
Top and bottom cooling: ~75degC (20A VBED fuse); ~50degC (VBED and BED connectors)
(above are temperatures during heating up phase)

Bottom cooling was a 80x25mm fan mounted 5mm below the board, directly blowing at the bottom side of the board.

Top cooling was a 80x25mm fan mounted 30mm above the board, directly blowing at the top side of the board.

Obviously, the best way to cool the board when used with 12V for the heated bed is with both top and bottom cooling. But if you cannot mount a fan to the bottom side of the board, it seems that top cooling only is a good alternative. Mounting a fan on the top side not only helps to keep the fuse (which is running current through it at close to its current limit) and the MOSFET (not really an issue) cool, it can also help to cool down the stepper motor drivers too.

Whatever the case, it is best to leave a gap of at least 5mm below the board to allow for air flow.

More thermal testing, under the following test conditions:
- Board in open air (unenclosed), mounted to top and bottom panels using spacers, and no side panels.
- 12V 40mmx40mm fan mounted 30mm above the board, blowing directly down on the top side of the board. Fan is offset by 10mm from center of board toward the edge with VBED connectors.
- Bottom clearance of 5mm below the board.
- Started heating bed from room temperature to 100degC.
- After reaching 100degC, maintained at 100degC for 10 minutes.
- Started heating hotend from room temperature to 240degC when bed reached 90degC.
- Maintained hotend at 240degC until end of test.

Observed temperatures when heating up (before bed reaches 100degC):
~130degC (20A VBED fuse); 100degC (heated bed MOSFET); 95degC (VBED and BED connectors)

Observed temperatures when maintaining 100degC:
~90degC (20A VBED fuse); 80degC (heated bed MOSFET); 70degC (VBED and BED connectors)

As expected, the fuse, MOSFET, and connectors reached high temperatures when pushing a lot of current (15A at 12V) during the heating up phase, as this is when the full current is being passed through to bring the heated bed up to the required temperature.
However, once the required temperature is reached, the current required drops, and corresponding, the temperature.

Based on this, when running on 12V:
- First and foremost, avoid having to use 12V to power the heated bed in the first place. That is why the bed control is isolated with an optocoupler. This allows a separate 24V power supply to be used to power the bed.
- If 12V must be used, it is best to avoid putting the board within an enclosure.
- If an enclosure must be used, ensure adequate air flow to remove heat from the VBED fuse, connectors, and bed MOSFET. A 80mm by 80mm fan directly blowing onto the top side of the board is recommended.

Monday, September 09, 2019

A peaceful protest is the most fearsome one

Hong Kong protesters torch Central MTR station entrance

Can acts of public vandalism be justified as the quest for freedom and democracy?

Can people who destroy their own homes be said to be fighting for their homes? At this rate, by the time they are done, will there still be a home left?

Are there no better ways to achieve their goals?

The protest at Tiananmen Square was significant, and highly threatening to the Chinese government because of the way it was carried out. It showed the contrast between stoic protestors standing up to a government which is willing to roll in the tanks to deal with them. On one side, a people just standing up (literally) for their ideals. The other side, in contrast, being willing to resort to violence to squash such ideals.

The moment protestors resort to violence, they lose that contrast. And it is that contrast which is threatening, which is the most fearsome.

In China, legitimacy, that moral high ground, is a very important thing. Legitimacy gives one that power to rule. Losing legitimacy condemns one to becoming a footnote in history.

MRR ESPE 3D printer control board with I2S stepper stream

In addition to working on the MRR ESPA, which is a basic 3D printer control board based on the ESP32 microcontroller, I am also working on the MRR ESPE, a slightly improved version of the board that uses I2S to control the stepper motors.

Basically, I2S is used to send serial data to 74HC595 chips, which convert the serial data to parallel data, effectively working as an output pin expander. As the ESP32 is a 32-bit microcontroller, it is easy to get an additional 32 outputs using I2S by daisy-chaining four 74HC595 chips (each can output 8 bits).

This is the current prototype.

The additional outputs free up native ESP32 pins. Basically, three native pins are used to achieve 32 output pins. The lower 16 pins can be used for the stepper drivers (which needs 3 pins each: EN, DIR, and STEP) to support 5 stepper drivers. The other pins can be used for a variety of purposes. In the prototype right now, I am using them to control the various MOSFETs (heated bed, hot end, part cooling fan, even addition fans like the hot end fan, case fan, plus an additional controllable fan). I am also using one pin for the beeper, because the freed native pins can then be used to control a LCD controller (like the LCD controller I have on the Ender-3). Of course, with Wi-Fi and running the custom Marlin fork that supports the ESP3D webUI, there is really no need for an LCD controller.

"Wow, this sounds so much better than the MRR ESPA, so why even spend time on that basic version?"

Well... that's because the I2S stepper stream is still quite experimental. Right now, there are issues getting it to work with linear advance. The extruder motor just refuses to turn when linear advance is enabled via the I2S stepper stream. Another issue is babystepping. Trying to use babystepping when the motors are driven via I2S will cause an immediate firmware reboot. So until these issues can be worked out, the basic version, the MRR ESPA, offers something that will just work. It may not have all the bells and whistles, but it will handle all the basic day-to-day stuff.

Note: I used various color male header pins on the prototype because I was running low on black male header pins. 😅
 
Update January 23, 2021: I found that someone has actually posted the design in his name on PCBWay. This is the page. Whoever this Oleg person is, he is in no way related to me nor this project and does not have the rights to post the design on PCBWay. I made the project open source but open source is not free, and it definitely does not mean you can take credit for something you did not create. It means you can use it if you give proper credit to the creators of the work.

Friday, September 06, 2019

Progress on the MRR ESPA (v1.2)


MRR ESPA, the basic 3D printer control board based on the ESP32 microcontroller, is coming along nicely.

There is a jumper to select the gate voltage for the bed MOSFET, which is driven via an optocoupler. When using a 24V power supply, the gate voltage will be stepped down (because it can only handle up to 20V) using a voltage divider. However, when using a 12V power supply, the 12V will be directly used to drive the MOSFET's gate. Small effort to try and reduce heat generated within the MOSFET.

The board will also allow an easier way to use TMC2130 stepper drivers in SPI mode. Basically, there are jumper pins which just needs to be closed (shorted) to the SPI/TMC side


Once that has been done, just connect a jumper wire to the respective CS pin for the axis to a spare breakout pin.

This board, though, still has a few things that I need to work on. For one, I need to add a debouncing capacitor to the reset button. Else, sometimes, the X endstop (which has a trace running close to the trace for the EN pin) may trigger a reset. In my prototype, I ended up soldering a through-hole capacitor to the board, but the next version of the board will be updated with a 0805 footprint SMD capacitor.

There is also a jumper that prevents the board from being powered via USB.

BTW, the Marlin fork that I am using is by luc-github, and this is how the webUI looks like.

It is basically the same ESP3D webUI that he wrote, except that his Marlin fork allows the webUI to be served and interacted with natively instead of via a separate microcontroller.

Standby for the next update! 😉