Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C firmware tweaks #18

Merged
merged 2 commits into from May 2, 2022
Merged

C firmware tweaks #18

merged 2 commits into from May 2, 2022

Conversation

nilswiersma
Copy link
Contributor

  • Buffer last command in serial.c
  • Add single character shortcuts for commands in serial.c
  • Add a toggle command for GP1
  • Add configurable duty_frac (not sure if that makes sense, does less duty_frac mean less voltage mean weaker pulse?), configurable pulse_time

@colinoflynn
Copy link
Contributor

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
Copy link
Collaborator

nezza commented Apr 12, 2022

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
Copy link
Contributor Author

Anything else I could do to help you test it?

@nezza nezza merged commit bcf664a into newaetech:main May 2, 2022
@nezza
Copy link
Collaborator

nezza commented May 2, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants