newaetech / chipshouter-picoemp

Why not run micropython on your EMFI tool?
405 stars 52 forks source link

C firmware tweaks #18

Closed nilswiersma closed 2 years ago

nilswiersma commented 2 years ago
colinoflynn commented 2 years ago

Thanks for PR, looks good to me! On duty cycle - having it configurable would be handy, so worth keeping in. Some quick notes on the duty cycle change:

The duty cycle is connected to cap charge voltage, but I didn't really calibrate that so I can't say how it connects. The hard-coded default was a value that seemed to work well. From memory the resulting transformer driver is closer to something like a flyback, which means it's not just e.g. a linear relationship between duty cycle and output. Going larger or smaller both results in lower charge voltage.

However going higher means more current through the transformer, which may result in some heating. Going a little higher would be fine in practice (higher meaning PWM % setting). Need to check what reasonable ranges make sense here (if it's the divider as well then I guess the divider should be increased to decrease the PWM?).

So I don't think need to change anything in your current PR for above, but may want to add some additional config eventually.

nezza commented 2 years ago

Thanks for the PR, looks good, I will try to test it in the next days :)

Can you remove the commented out printfs?

Thanks, Thomas

nilswiersma commented 2 years ago

Anything else I could do to help you test it?

nezza commented 2 years ago

No, thanks a lot! Sorry for the delay in testing this :)