2017. augusztus 14., hétfő

Graylog, Elasticsearch, Maximum number of fields, graylog_deflector

Just because I'm not a Linux guy
A few days ago, I setup our shiny new Graylog server.
I successfully added something like 10+ windows servers to collect the event log entries from.
As the second part of the task I wanted to add linux servers also.
I added the first one, it looks like the collector running and the messages are arriving, but no message shown on the web console. Weird.
Digging a bit deeper I found thousands of this message in the indexer fail:
{"type":"illegal_argument_exception","reason":"Limit of total fields [1000] in index [graylog_0] has been exceeded"}
This means we exceeded the maximum field number (I think due to the event types in the Windows).
I read through some forum posts about it. Tried to change the settings in the elasticsearch.yml file.
It didn't help. The result of my actions was a inoperable elasticsearch.
Finally I deleted the whole thing (elasticsearch) together with the indexes, and reinstalled it.
The result:
A working elasticsearch instance. The 1000 field limit kept, and in addition I got a new error. It said something like this: The graylog_deflector is an index and not an alias.
Googling around, I found the problem, but not the solution. Then I was start to think instead of googling. What I've learned:

  1.  From one of the log files I learned, that the elasticsearch configuration isn't done through the config file but through the web API with JSON objects.
  2. curl is your friend
  3. The Graylog creates a graylog_deflector index when it can't find the graylog_deflector alias. What it unable to use. You can't do anything with it from the Graylog, so you screwed.

The solution based above:

  1. In the Graylog web UI go to the System/Indices>Indices. Select the Default index set
  2. In the Maintanance select the Rotate active write index. It will create a graylog_0 index (but it will not work)
  3. Go to the console and stop the graylog:
    sudo service graylog-server stop
  4. Handle the 1000 field problem:
    curl -XPUT 'http://localhost:9200/_all/_settings?preserve_existing=true' -d '{
      "index.mapping.total_fields.limit" : "5000"
  5. Stop the graylog_deflector index:
    curl -XPOST 'localhost:9200/graylog_deflector/_close?pretty'
  6. Delete the graylog_deflector index:
    curl -XDELETE 'localhost:9200/graylog_deflector?pretty'
  7. Add the graylog_deflector as alias to the newly created graylog_0 index:
    curl -XPOST 'localhost:9200/_aliases?pretty' -H 'Content-Type: application/json' -d'
        "actions" : [
            { "add" : { "index" : "graylog_0", "alias" : "graylog_deflector" } }
  8. Restart graylog:
    sudo service graylog-server start
  9. Now the graylog starts the correct reindexing process it can even take days to finish, but you can see your collected messages in the meantime.

2017. július 31., hétfő

Pen Plotter 3. - Working

It is finally working.
Built the whole thing, assembled, then redesigned most of the pen holder.
The problem was the following:
  • The SG90 microservo I intended to use was not strong enough
  • The line I wanted to use to pull up the Z carriage was a bad design decision
  • The arduino was not able to provide enough current to the stalled microservo, so it rebooted when the pen pulled up.

In the new design:

  • The SG90 replaced with a more powerful MG995
  • The servo moving the carriage directly
  • Added a 6V regulator for the servo, what gets its power from the beefy 12V PSU and not the arduino.

The electronics on the head still messy as I don't designed a proper PCB yet (but it will only happen when I finish the milling and the laser engraving head design):

And finally here is the first video of the working unit:

2017. július 27., csütörtök

Pen Plotter 2. - Measuring Proxxon

I've a Proxxon Micromot drill. I'm planning to attach it to the plotter as replacement to the pen, to be able to do some light cuts.
For this I don't want to use it's original power supply unit. As the speed control is located in the power supply I wanted to know it's properties:

  • How the motor driven? Pure PWM or filtered to DC?
  • What is the PWM frequency?

To measure this without disassembling, not looked like an easy task. The reason is that Proxxon uses a proprietary connector, what is not available on the market. So I measured the diameter of the pins and looks like with two 2.3mm drill bit I made it:

The measurements:
Without load:

At minimum speed:

At maximum speed:

It is a bit noisy to my taste and figured out that it runs at 100Hz and not really filtered.
Based on this I can design the new electronics into the plotter.

2017. július 5., szerda

Pen Plotter 1.

I'm not documented this project deeply, step-by-step. Now I'm just writing where am I today with the build. Mainly pictures.
More than three month ago I had a conversation with my son. He told me that he want to build a "drawing machine" essentially a pen plotter together with me. I started to design one. After a few conversation he told me that he wanted to build it from Lego.
I was already too deep in the designing already, so I didn't want to stop. In addition I was planning to add exchangeable head to be able to use it as a light router and a laser cutter/engraver.
I think the design mainly finished:

I left out a few things from the design, like drag chain, screws, spacers, timing belts.
During the design process I already printed some of the parts:

As you can see, there are some assembled parts also on the picture, like the Y axis drive (round white thing in the center) and Z axis carriage (the green thing).
How the Y axis timing belt mount into the holder:

Lots of holes, the base plate:

X axis assembled:


2017. május 27., szombat

StepTest 1.

During the Cyclone mechanical build I hate when I have to wind various axes by hand from one end to the other. I was thinking. What if I build a simple circuit for the stepper motors to do this for me. No MCUs, just a stepper driver, a variable oscillator with a speed control potentiometer, a direction control switch, and the necessary power supply.
I wanted to keep it as simple as possible, so I just picked up two schematics from the net as base.
The DRV8825 stepper module minimal config from pololu:

And a 50% duty 555 config:

I used 680nF in the place of the C1 and a 1K resistor in series with a 10K potentiometer in the place of R2. Here are the result.


This allows me to change the frequency between 74 and 704Hz.

In addition to the two circuits above I added a simple 78l05 regulator, so the whole circuit runs from a single 12V supply.

Here is the build on breadboard:

During the test I realized, that the motor is quite noisy. So I think to use the microstepping and in parallel increase the frequency by reducing the value of the C1.
Next: proper build.

2017. május 26., péntek

Cyclone PCB Factory 5.

Oh, noooo.
I just tried to attach my Dremel to the Cyclone:

This doesn't work.
Just found out that I've a Dremel 300 and the Z axis is designed for the Dremel 3000.
There are no ready design available for the Dremel 300. Shit.
I've a few options:
Design a Z axis for my Proxxon.
Buy something from eBay/Aliexpress (775 DC motor, CNC spindle), they have ready Z axis design.
Buy a Dremel 3000.
After a half day thinking, evaluating the options, decided to buy a Dremel 3000. It needs the least effort now. I was able to find one for ~$40.
I ordered it in the morning. It landed in the FoxPost's box on the same evening (It was fast):

2017. május 25., csütörtök

Cyclone PCB Factory 4.

Started to correct the things from the previous post. Went to two local shops (had no more time), to find M3 grub screws for the steppers. No success.
What if I try to make a few at home.
Here is the setup:

And the result:

I think, not bad for the first try.

2017. május 24., szerda

3D Printed glass identifier

I've three kids. Usually they leave the drinking glasses around the house and after a few minutes nobody remember who owns a practicular glass.
I wanted to end this. So I designed a plastic  ring into our glasses.
Here is the result:

2017. május 23., kedd

Cyclone PCB Factory 3.

I finished (almost) the mechanical build:

I'm quite happy with it. This is the first time when my son helped me with my projects. :-)

There are two things I want to check/correct in this build:

  • I wasn't able to buy M3 grub screw. So I assembled with normal screws and adjusted the gear placement for it. I'm not happy with the solution, so I'll try to get grub screws somehow.
  • The Z axis threaded rod maybe to long. I 'll check when I put the Dremel in, and adjust the size.

2017. május 22., hétfő

Cyclone PCB Factory 2.

I started to assemble the Cyclone.
How does it look like now:

When I tried to assemble the moving bed (Y axixs),  I realized, that it has a problematic design. It is only designed for a single size PCB. If I want to mill varying sizes, I've to change it to something else.
So I designed a different one:

It is able to lock various PCB sizes.
I started to print the parts of it.
It looks like the Geeetech printer struggling with some challenges:

I clearly know, what is the problem. This model has no object cooling. I'll design some for it, but not now. Actually, I know, how can I deal with this. So I was able to print this part finally.
The assembly comes later.

2017. május 21., vasárnap

Cyclone PCB Factory 1.

I've seen in someones post on the Facebook this:

I decided, that I want one.
As one of my 3D printers (the Geeetech) started to work. This time reliably. I printed out all of the required plastic parts. From that pink PLA. :-)

Yes, this picture was already published, but I habitually late with my posts.

2017. május 19., péntek

3D Printing failure

It looks like my printer struggling with some challenges today:

This is GT2 timing belt holder for my son's plotter.
This was the design:

2017. április 20., csütörtök

MVP Reconnect gift arrived

Finally my MVP reconnect gift arrived from Microsoft:

GeeeTech 3D Printer 7.

Yeah, facepalm.
This guy still struggling with that crap.
Many of my designs are come out from the printer seamlessly until I get into my mind to build a Cyclon PCB Factory (actually I seen in somebody's facebook post and checked, what it is).
It has several printed parts. When I started to print, at the second batch I got this:

Yes, you right it is the vengeance of the Cyclon PCB Factory because of the PINK!!!
So, I started to look around and read. I found two factors:
1. You should lower the temperature for PLA as it melts to long into the heatbreak and stuck in it if not flowing fast enough.
2. You should use some Canola oil, to prevent sticking the plastic into the heatbreak.
1. I went down to 195°C, and ordered a better fan for the heatbreak radiator (not arrived yet)
2. What a hell is that Canola. I looked around. It is called "repce" in my country. So bought a liter of it (there are no smaller available):

And the result is here:

Ok. But one good print doesn't tell anything. I achieved this in around three days without a single problem:

I guess. It is working now. Finally.

2017. április 19., szerda

GeeeTech 3D Printer 6.

When the shit hits the fan. :-D
As I tried to work with it. I had a small accident. Something was hitting hard the extruder fan while it was running:

The sad thing in it, that it was a Sunon Vapo fan, what I prefer, and had no more of this at home.

2017. április 18., kedd

Ergobag 1.

This is an old story. It dated back to the end of last summer. My two kids, who already in school has identical school backpacks but in different color.
These backpacks has a few places where stickers can be attached with velcro. The kids got some stickers with the bags, but these are just static ones.
Here came the idea. What if I create something personalized for them. Something with their own name, what even has some light in it.
So I needed a 3D Printed cage, with some electronics inside. To keep it simple I chosen an Attiny85 and APA102 LEDs.
I wanted something can be charged. To keep it as slim as possible, the normal AA or AAA size rechargeables was not really a good option (first I was thinking about, but finally I thrown the idea). So I chosen a Nokia BL-4C battery. There are two problems with it. You need a proper Li-Ion charger and as the LEDs need 5V, you need a boost converter to power it.
In addition I wanted to cut of the power after certain amount of time - Kids never switch of the toys.
So one push button for switch on, one for switch off if you want, and timed switch of by the MCU.
Here is the circuit:

I built this on a circular board:
(This is the first prototype, not the actual working one)

Then I designed a case for it.

Actually I was able to print the 3D parts and assembled the whole thing, but I wasn't really happy with the result as I had continuous problems with the 3D printer (the Geeetech, as the Robo3D was completely dead)
Finally the signs appeared on the bags, and the kids were happy with it:

The project was closed...
...but, as you can expect kids, are kids, and they have schoolmates. So "orders" arrived - who else needs it. :-)
All of the design files are available on my github:
It has been cleaned up, so just the actual design is in there.

2017. április 10., hétfő

GeeeTech roll holder

The GeeeTech printer came with a separate roll holder. It is uncomfortable to use and take unnecessary space.

To overcome this, I wanted to have something better.
My wife just thrown away this as the holder at the end was broken:

I decided to cut it into the desired length and design a holder for it, what fits onto the top of the printer.
The printer hase 4 holes at each side, I don't know why - no it is not he holes for the bowden extruder, different holes what I talk about.
So I designed a plastic part as the holder (two identical required), and printed.
Here is the result:

It is available on Thingiverse: http://www.thingiverse.com/thing:2235889

2017. április 8., szombat

GeeeTech 3D Printer 5.

Oh no. It still not finished.
I had the feeling, that I finished the problems with my GeeeTech printer.
I started to print and my designs came out nicely. I was using some old PLA rolls from 3D Factory (I guess) and the roll of blue Geeetech PLA came with this printer.
I was working on a fun project to my kids. One of my daughters wanted her thing in pink (what a surprise). I had a roll of pink material from Herz filament.
The result was devastating:

The solid layers (let say the first 2mm) came out correctly, but the hotend stuck afterward.
Tried it many times, with the same result. The same design was working correctly with the GeeeTech blue.
Tried to change the temperature, not helped.
So I had the feeling that something is wrong with the Herz material. I ordered another pink roll, this time from 3DW.
Next try, same result. Oh shit, so there should be other problem.
I started to think. What is the difference between the solid layers and the small parts printed later?
The retract.
On the solid layers the extruder almost never retract the material, on the tiny parts above, continuously.
When I built this printer I chosen a E3D v6 hotend clone for it. It had teflon tubing in the heatbreak what I didn't like, so I replaced it with the heatbreak of my unused E3D v5.
There is something wrong with tihs?

As you see the hole size of the v5 barely bigger than the diameter of the filament. The v6 give much more space. When the filament retracted the liquid bubble on the tip of the filament cooling down and stuck into the heatbreak.
Cleaned, replaced, and here is the result:

Just I don't know what the hell will I do with almost 2kg ugly pink filament.

2017. március 28., kedd

GeeeTech 3D Printer 4.

I didn't want to give it up here, or wait for the bearings to arrive. At the thingiverse on one of the Geeetech pulley's description I seen something about, that they used bearings without pulleys in the past.
I checked, the bearings in my parts box has 4mm hole, and two of them nicely fits into the pulley holder. Yes I know, that keeping the timing belt in the center is almost impossible from now.

The printer started to work, now more clicking noise.
...or not?
Started to hear the awful clicking noise. This time it was coming from the Y axis (the bed). Replaced the pulley with bearings also here.
Started to print.
It looks like the X and Y axis looks working, but I started to loose the layer adhesion at a certain height.

I thought that the Z axis needs some lubricant (as it already sounded awful during fast moves). I was looking around but found nothing. Not even some WD40.
Next day I picked up this in the shop:

Now my prints are coming out as good as never before:

At least not from this printer.
I think the build/repair of the Geeetech printer is finished now. Regarding 3D printing I can concentrate to the improvements, repairing the Robo 3D and printing parts for my other designs (like my son's plotter)
The End