2017. november 14., kedd

High Voltage DC Power Supply 2.

!!!DANGER!!!
The circuit described bellow is dangerous. Using it improperly will kill you. On the other side I may also made mistakes during the design and built. I'll take absolutely no responsibility for it. If you want to build it, please don't ask for circuit board or help. I won't help you.

As the other PCBs are arrived for the supply, I continued the build.
Finished the separated isolated supplies for the panel meters (these are nothing else just a simple dual 7809 based linear supplies):


Also added the power distributor and some wiring for the backpanel:


Connected the panel meters and, milled parts of the front panel (manually as my CNC mill is still broken)
How the whole thing looks like today:


And its working, partially:


As you see the decimal dot is on the bad place (it is more likely 330V than 33V)
In addition I took a picture of the board on thermal camera. You can clearly see that the two capacitor draining resistors getting warm:



So I can tell, it is progressing, but quite few things still ahead of me:
  • Mill a hole for the mains socket and the circuit breaker to the backpanel
  • Mill the holes for the banana jacks to the front panel
  • Finish the wiring
  • Set the correct decimal dots
  • build a dummy load to be able to test the current measurement
  • Calibrate
  • Paint the front panel
  • Build the phase switching electronics (not mandatory, maybe after finish)
  • Create the console for the caps


continue...

2017. november 11., szombat

PCB manufacturing

Quite a few of my new designs are ready. Arrived during the last week.
Just find time to build, test and write about them:




2017. november 4., szombat

High Voltage DC Power Supply 1.

!!!DANGER!!!
The circuit described bellow is dangerous. Using it improperly will kill you. On the other side I may also made mistakes during the design and built. I'll take absolutely no responsibility for it. If you want to build it, please don't ask for circuit board or help. I won't help you.

I've many ideas in my had, what to build, what to experiment with.
A few of them involve using mains voltage directly. Some of this need to rectify and clean the input before using.
My lab power supplies are able to produce 60V DC maximum, what is clearly not enough for those experiments. A cost of a proper high voltage variable DC supply is enormous, and I don't need most of the features of it right now:

  • Not need to be variable. My built circuits will have rectifications on its own. The input comes from mains anyways so this is the only voltage I need.
  • Not need to be stabilized. Same concept as above.
  • Not need to be isolated. I know, at this point the real professionals start to scream: IDIOT!!!! Let me explain why I'm not:
    1. I've built a proper isolation transformer in the past. I can use it, when it is necessary.
    2. My negligence: two way rectified mains after filtering in my country is around 650V DC. It is lethal anyways. If you make a mistake, it will kill you. It can't kill you twice because of the missing isolation.

So the plan:
Build a simple two way rectified supply with large can electrolytic capacitors (I bought 3300uF/500V ones for a good price. These puppies are huge).
Add necessary circuits for small panel meters to be able to measure, what is coming out from the circuit.
Add necessary circuit to discharge the capacitors. If they left unattended, they can still kill you after long time.
Add a special circuit I designed for it. It has two functions:

  1. Test if the equipment grounded to the protective earth (it is not a proper grounding test, but if your lab is properly grounded, it will tell you if you have cabling problems)
  2. Test the polarity of the incoming supply and change it if necessary. So the 0V output line of the equipment is always connected to the Null and never to the Line.

This circuit is still under development, so I don't know if it will work or not, but it isn't absolutely necessary for my power supply design. It adds some protection to the circuit, but nothing substitute the extreme care and the proper isolation.

I started to design this something like two weeks ago. Ordered the circuit board on the last Saturday. Actually it is already in my hands since Thursday, thanks to the extremely cheap, fast and high quality PCB manufacturer I found recently: ALLPCB (10 pcs 100x100 two sided boards for $5.49 delivered in 5-6 days - insane):


Yesterday I had some time to populate the board:


Those cans are huge, I told you.

Let see some measurement:


I've an isolation transformer, as I told before.
Ouch! My Fluke 117 unable to measure the output voltage.  According to the specification it is able to measure until 600V. In fact it was working until 650V, but the supply is above this. Lets change to a 1000V rated tool:


So, the PSU works now. My first impression, that the 100k/5W resistors I connected in parallel with the capacitors are improper for draining them. It take quite a long time (several minutes) to do their job, and generating some (not to much) heat during the operation (the 3W consumption on the display of the isolation transformer). It is sufficient  now, but I'm thinking to replace them to some active solution. (an AC Relay with some lower value/higher power resistors maybe).
This is it for now. Next is building into the enclosure, adding and calibrating the panel meters.

2017. október 23., hétfő

StepTest 2.

Finally I finished my StepTest project.
Here is the proper schematic diagram:


The PCB design:


I ordered it from SeeedStudio, so the professionally made board is also in my hands:


The built electronics:



Actually the design is not as good as it can be. I rather like my things in enclosed boxes. Here it wasn't an option as I need to access to the current limiting potentiometer.
And finally in working:


Just additional video (it is made with the prototype on the breadboard), what this small circuit is usable for:


I've a better device in my mind, I may build it sometimes.

2017. augusztus 26., szombat

Pen Plotter 4 - InkScape/KiCAD drawing toolchain

The first test of the plotter, this one:


was done with the following software toolchain:
I draw that spiral with InkScape, saved as DXF and converted with the DXF2GCODE software from sf.net:
https://sourceforge.net/projects/dxf2gcode/
Tried to use a few gcode sender, but finally kept using the Rasberry PI/Ubuntu/Octoprint set. As I'm quite familiar with it from my 3D Printing past.
The toolhain above has some drawbacks:

  • I wasn't able to produce correct scaling. I don't know it is just my inability or problem of the software used.
  • The DXF2GCODE is more likely a basic CAM software and not just a plug and play conversion solution. The plotter needs much simpler gcode than a CNC Router, and the functionality of working with tools, pockets unnecessary at this point.
  • There is a drawn line between the home point and the start of the spiral what isn't in the original drawing. It is not caused by the toolchain. I'll will come back to this issue later

At this point I was thinking a bit differently. The DXF is a mechanical CAD format, so not really designed for pen plotters, but the HPGL definitely the language of the HP pen plotters.
I searched for a program what is able to convert HPGL to G code. I found a few converters. None of them was fit into my needs. Most of them was not able to convert the HPGL AA arcs to G2, G3 gcodes. This conversion needs some trigonometrical knowledge so it looked hard to achieve for some programmers. After a few trials I gave up to use something I found on the net.
So I wrote one. It is in the github repository of the plotter:
https://github.com/sufzoli/suf-3D-Plotter/tree/master/SW/Hpgl2Gcode
It still has some problems like incomplete error handling and lack of path optimization, but does it's job.
Now let see, how the toolchain works
Here is the original drawing:


First all of the object in the drawing must be converted to path, otherwise it will not represented in the HPGL output:


When it's done, you can save it as HPGL:



Now the bit tricky part coming:
The InkScape HPGL save dialog default parameters are mainly setup for cutting and not drawing plotters. Therefore most of them need to be changed according to the following:

 

Now you have to convert it to G code.
I used two different settings. The reason is the G code of my plotter use M280 P0 S50 command to lift the pen and M280 P0 S0 to put it down.
The usual CNC routers use G1 command to move the Z axis. The widely used G code simulator CAMotics Doesn't understand my pen up and down commands, so for the simulation I changed them to G1 Z5 F50 and G1 Z-2 F50 respectively:


And here is the result in the simulator:


As it looked good, I made the conversion for the plotter:


As you can see, the PenUp and PenDown parameters are missing here. The reason of this that it was setup in the application config file.
After this uploaded it to the Octoprint and sent out to the plotter. The result is disaster. It drawn a 2cm dashed line from the home point towards the starting point of the drawing, then drawn the whole drawing in the air (pen lifted).
I known what is the problem, from the first moment. It is the same problem what I mentioned at the beggining of this post (line from the home point to the beggining of the spiral). The G code commands are not executed in order.
I know about the Marlin firmware that it queue the commands and some commands are executed in order and some out of order. I was reading the source code of the Marlin for a few hours to find, how to change this behaviour Unsuccessfully. I gave up at this point and asked in the Marlin forum.
The answer was much more easier than I ment. Adding an M400 command (wait for finish of the previous commands) before an out of order command solve the issue. I wasn't even need code change for this as my pen hadling commands are represented in the configuration file.
The only trick here that the handling of the multiline string in the .Net config file. So the parameters look like this now:
M400
M280 P0 S0

And finally the result:


The converter I wrote also understand the HPGL output of KiCAD. It can be used for drawing and not PCB milling. This will come later.

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:


continue...

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.
Slowest:


Fastest:



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.