Show all posts by user
Page 2 of 4
Pages: 1234
Results 31 — 60 of 91
You don't need any timers for I2S-based PWM generation. Just added sample software PWM and Sigma-Delta modulation to the github repo. Also added example code to reprap_core.cpp (compiles, but untested).
buffered_pwm.h: Software PWM implementation. Buffered means it only updates duty on completed cycles, so that there are no glitches.
sigmadelta.h: Sigma-delta modulator. The step() function retur
by
lhartmann
-
Developers
You don't need any timers for I2S-based PWM generation. Just do something similar to what is below while building the I2S buffer data. Set duty=0 for 0%, and duty=period for 100%. The period variable is measured in 1/192kHz time increments.
// Create a down-counting triangle wave.
if (--counter == 0) counter = period;
// If the PWM should be active then set the bit in the I2S output data.
if (
by
lhartmann
-
Developers
Nice to hear that, Hubberthus.
If you are using I2S shifter output you may choose to use software PWM. You get 1/192kHz resolution for both pulse width and period. That means 193 possible values for 1kHz PWM, or 193 positions between 1ms and 2ms for a 50Hz servo PWM. I actually implemented this as a class, but had little spare time to work on it further...
I kinda wanted to show off with 32 se
by
lhartmann
-
Developers
@tomasf: I just saw that camera yesterday demoed on YouTube. :-) Using that would be simple, except most people don't have one, and pretty much everyone has an old cellphone around. Also downloading the images (printer - > pc) over wifi feels more practical than sdcard.
@Kurza: That is possible, probably not even that hard. My particular phone would not be good, though, as it has not enough
by
lhartmann
-
Duet
One idea and one question.:
IDEA: It just occurred to me that, if we use an IP camera then duet may have enough processing power to grab frames to the sdcard.
Also pretty much everybody has an old cellphone lying around, and there are IP camera apps for free. I do use one with a galaxy nexus and octoprint.
While you could do time-lapse just with a phone, having duet control the frame grabbing
by
lhartmann
-
Duet
Just finished a micro extruder design and print, and wanted to share it with you. Features:
Quick release. Bowden tube out, guide tube in. Lightweight: 63g Compact: About size as a NEMA17 motor. Modified (bipolar) 28BYJ48. Tested with TPU and ~500 load pull.
I wanted to print flexibles on my diamond hotend, so I needed a very short tube and a lightweight feeder. Couldn't find one, created one.
by
lhartmann
-
General
Why SD:
- I've had so many failures due to lost serial connection during long prints, now I always print from the printer's SD card.
- Useful for web interface storage (html and images), since the 4MB onboard would be pretty limiting.
- Timelapses with an IP camera (or old cellphone): I am currently using octoprint for timelapses and during the recording all it does is grab frames via an HTTP ser
by
lhartmann
-
Developers
Good news: CNLohr has released an I2S duplex I2S example, output and input!
Actually that is pretty old news, 9 months according to github dates, but I just found about the code now. :-D
Just tested my Shift-in board with it and got 16 bits working right away. Few things to keep in mind though:
1 - The I2S input is passive end expects external clocks to drive it.
2 - I2S word clock is used to p
by
lhartmann
-
Developers
Took some time to read smoothie... It uses a lot of floats everywhere but in the fast ISR, Good.
The decisions when to trigger steps for each motor are implemented in StepTicker, in the methods step_tick (set pulse pins) and unstep_tick (clears pulse pins). Actual control of GPIO is implemented the Pin class.
Perhaps creating a set of Pin instances pointing to a RAM variable instead of an a
by
lhartmann
-
Developers
While I am not familiar with David's algorithm, I believe most of what you mentioned is already in the code. Time domain is discrete at 192kHz, constant rate (as opposed to the variable interrupt frequency you said marlin uses).
Check stepper.h for my take on Bresenham's:
- First you call Stepper.prepare(D, T) when you want to mode D steps in T time samples. Consider just the maximum speed desi
by
lhartmann
-
Developers
@rklauco: I discarded the diode multiplexer circuit because the forward voltage drop of the diodes is temperature dependant, and this would require compensation... I wanted to avoid this if possible.
PMOS, however, can be approximated by a <1R resistor. Even if it changes 100% it should have almost no influence on the measurement. Still waiting for mine to arrive, though.
I also did not wan
by
lhartmann
-
Developers
I have given compression some thought on the past, and came to the realization that 80-95% of a 3d printer gcode file are sequences of successive moves on XYE only, e.g.:
G1 X10 Y5 E7
This means all you need for great compression is to add a way to say "2000 flat moves follow", and send all x, y and E coordinates as raw numbers (non ascii encoded). Using relative 16 bit signed integers for eac
by
lhartmann
-
Developers
Just tried a similar approach, but without the diodes.
On a regular printer we don't need to measure any voltages, just the variable resistances of the thermistors. So I tested the circuit below on the NodeMCU. Please bear in mind it has internal 3.3V -> 1V divider before the ESP12's ADC input.
The resistor to ground is my reference resistor, like the 4k7 one used on RepRap Melzi board to
by
lhartmann
-
Developers
Code is up:
Nowhere near as nice as repetier, though. :-)
I also got an idea for a sigma-delta ADC but first I need to figure I2S input. If it works this should need / provide at most:
4x 74HC164 ==> 32bit digital input.
4x 74HC373 + 8*TL84 ==> Changes 32 digital to 32 analog inputs, with software controlled resolution.
Obviously we don't need to assemble it all.
by
lhartmann
-
Developers
Got the steppers to run on the ESP alone:
4 steppers are being rendered at 192kHz, 32k steps/s, synchronized.
Will release the code soon.
by
lhartmann
-
Developers
Just tested I2S loopback to see if I2S input is possible: Good news, IT IS! (probably)
For now I just tested wiring I2S data output pin back to I2S data input. I also tried pulling the wire and it stopped working, so this is not an internal loopback. Since I2S-IN and I2S-OUT share the same clocks it will probably work fine with a 74HC165 shifter. I'll try making a pcb for these soon.
For the t
by
lhartmann
-
Developers
Just make sure you keep it sandwiched between 2 glass plates, insulate the connections properly (electrical tape and heat shrink tubing) and, as Dust mentioned, make sure you place the wiring safely.
Glass is the best electric insulator I know of. It is not used in high voltage transmission lines (13kV+) just because it is brittle.
I wonder how to set the firmware controllers for such a fast h
by
lhartmann
-
General
Yup ADS1115 seems like a really good choice. 16 bit resolution is almost overkill. Ordered one just in case, but china packages take 20-180 days to deliver here...
Another option would be to use 555 analog timers in astable configuration, but with the NTC as one of the resistors. If I2S inputs work as I hope they will then I may be able to find out the NTC resistance by reading the timer period
by
lhartmann
-
Developers
I2C has completely slipped my mind while posting this. A dedicated ADC would definitely be more accurate, but how about price?
I am already regretting getting the one. It is nice, but I am missing the 3 USB ports and the wifi of the Orange Pi PC+... In order to use octoprint+wifi+webcam I already need an USB hub. :-/
Next step: Finding out how to run RepRapFirmware on Linux.
P.S.: Updated the
by
lhartmann
-
Developers
Progress on the I2S output idea, though not on ESP8266:
by
lhartmann
-
Developers
This is not a question, this is me bragging I did it! A working proof of concept! :-D Below is a video of it running 3 steppers with acceleration profiles and independent speed.
A little while ago I realized an I2S digital sound output looks a lot like a SPI output, and SPI outputs can drive shift registers. back then I was focused on the ESP8266, so I build a small 32 bit shifter board based
by
lhartmann
-
Developers
(philosophy in a programming context) A computer must always do exactly what we tell him to do, even it is not what we want it to do. While this might sound rude, this ensures it is never the computer at fault for not doing what we wanted, instead it is our fault for not telling him right.
A confirmation dialog could pop up, but how would openscad guess how many recursions are too many? Should i
by
lhartmann
-
OpenSCAD
Really nice to hear that! :-) 850kB/s is plenty fast, the largest print I ever did would have taken just 30s to upload.
I failed to find the schematic for the board. Was it released already?
by
lhartmann
-
Developers
Use a DPDT relay (2 switches, 6 terminals) for each motor.
Relay connected as:
Common 1 - motor terminal A+
NC1 - motor A-
NO1 - driver A+
Common 2 - motor B+
NC2 - motor B-
NO2 - driver B+
A- and B- are connected directly to the driver.
by
lhartmann
-
Mechanics
Why not place the entire spool under the heat source?
by
lhartmann
-
General
We always have components on the pcb that we did not put there intentionally. Long traces may act as resistors (see heated beds), capacitors, and inductors. This parasitic inductance is what you are trying to compensate with caps very close to the drivers.
Note that while the driver is enabled it will regulate motor current constant, but power supply current will be pulsed in a high frequency. W
by
lhartmann
-
Developers
It is not an ARM, it's a xtensa lx106 (if memory doesn't fail). I've never heard of it before ESP either.
Current ESP8266(wifi-serial) + ATMEGA1284(Marlin):
+ It is ready to use, I do.
- Serial link limits interaction of wifi and sdcard.
- completely useless for wifi uploads, 6 minutes for 1.5 MB of gcode...
- Weak motion control CPU: 8 bit 16MHz. Not that big of a deal, though, as it does
by
lhartmann
-
Developers
You can use a switch to detect crash, as long as it is not the same as the Z endstop. Allowing the head to tilt back and break a contact (open a switch) has been done before for bed leveling, there is a commercial printer that does that, if only I could remember which.
An option is to use a head tilt switch to cut the main power supply, this way you don't rely on the already misbehaving firmwa
by
lhartmann
-
General
Nope, no Raspberry Pi involved either. Just an ESP8266.
As far as I can tell there is no currently released firmware that can do this.
The big picture would be something like this :
1 - generate the gcode on your computer with your favorite slicer.
2 - have an sdcard connected directly to the esp8266 (see node mcu for it has a lot of io)
3 - copy the file to the sd over wifi. Should be fast,
by
lhartmann
-
Developers
Nevermind, posted a bad solution to late and can't delete the post
by
lhartmann
-
General
Page 2 of 4
Pages: 1234