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

Make the firmware documentation more explicit #55

Open
CCMCAGP opened this issue Aug 19, 2021 · 4 comments
Open

Make the firmware documentation more explicit #55

CCMCAGP opened this issue Aug 19, 2021 · 4 comments
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@CCMCAGP
Copy link

CCMCAGP commented Aug 19, 2021

I would like to make the doc>firmware.rst document [EDIT: currently at the stage of pull request from @leonhma] more complete and accessible. Can
someone review it and see whether my initial steps are correct?
As a beginner in electronics, I have been struggling to interprete the firmware instructions, but a research project I’m doing requires this filament sensor so I'll have to make it work, on a printer too!

REQUIREMENTS

Load the code, wire the ISP program to the ISP port on the sensor and
program it.

This sentence was very obscure to me, so here's how I interpreted and detailed it.

How to flash firmware onto the sensor

  1. Wire the ISP programmer to the ISP port on the sensor.
    I think this is different from the host_to_sensor_arduino.PNG wiring drawing because the ISP port is not occupied. So I tried to find the equivalent functions of each pin on the ISP port and on the Uno ISP programmer.
Type Pin # on ISP  port (Sensor) Arduino Pin (ISP programmer)
MISO 1 12
VCC 2 5V
SCK 3 13
SDA 4 11
RESET 5 10
GND 6 GND
  1. In Tools, Set processor to Attiny85, Clock to Internal 16MHz (current doc says 1MHz but the sensor .ino files all say 16MHz), Programmer to Arduino as ISP
  2. Tools > Burn Bootloader
  3. Open driver.ino and Sketch>Upload with Programmer

Current status

At the moment, with this method, three issues arise:
ISSUE 1. In the doc Firmware, the LED is said to flash twice. For me, it flashed only once.
ISSUE 2. With the driver.ino flashed onto the sensor, when I approach a magnet, no matter what the magnet polarity is, the LED is triggered. I wonder if anyone has the same issue. In the video https://www.youtube.com/watch?v=RYgdLPe_T0c&t=14s&ab_channel=ThomasSanladerer (5:19), the sensor should not be triggered with one of the two magnet faces (and that's the direction you should use to stick on the lever). I have a N45 magnet instead of the N35, but I also have the same problem with a much smaller N45 magnet which should have a smaller force.

ISSUE 3. With the current state of the documentation, I don't understand when the 5 different firmwares should be used. Could someone clarify the difference between all these firmware in the description and state exactly on which occasion they should be used?

TLDR;

a noob tries to clarify the documentation on the firmware. Can you review up to this stage, and clarify what firmware should be on host and sensor at every step?

PS: I realize this might belongs more to a forum than to GitHub but since I'm not aware of one, please forgive me for posting it here. I hope that maybe my remarks and questions could help to make this project more accessible to others as well.

@drspangle
Copy link
Owner

This is a good a venue as any for comments and feedback. I'll take a moment later on today to review this and I'll try and help you out. Other contributors might beat me to it.

@drspangle drspangle added the question Further information is requested label Aug 19, 2021
@leonhma
Copy link
Contributor

leonhma commented Aug 20, 2021

Doesn't look wrong to me. I can't test it though, my parts are still stuck in China 😬. As you saw, I made a pr (ran firmware.md through a converter and added it to the online docs). I don't really know how detailed this is. Maybe we should look through the firmware to see what it really does...

@CCMCAGP
Copy link
Author

CCMCAGP commented Aug 20, 2021

Thank you for your answers. I realized what is wrong: at this point it is not driver.ino but calibration.ino that should be loaded onto the sensor. Even better to follow along with the firmware.rst doc, these two files are actually not useful as far as I know. To start calibration, you should upload Host_ee_prog.ino onto the Host and Infidel_release_ee onto the sensor. Then you start seeing the next steps according to firmware.rst.
When I'm through with the calibration I will post a more thorough summary!

EDIT: These changes are now found in firmware.rst in https://github.com/CCMCAGP/infidel-sensor. I just clarified some sentences as I probably spent way too much time to understand what they meant... I think it would be a small pull request to @leonhma but not sure how you guys want to merge the docs...

@leonhma
Copy link
Contributor

leonhma commented Aug 24, 2021

Looks good to me. Feel free to open a PR to my repo and then it can be merged back into this one.

@darigovresearch darigovresearch added the documentation Improvements or additions to documentation label Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants