-
Notifications
You must be signed in to change notification settings - Fork 41
Description
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
- Arduino > V1.8.8
- TinyWireS LIbary from https://github.com/nadavmatalon/TinyWireS Download the .ZIP of this library and upload in Tool>Include Library>Add .ZIP library
- ATtiny85 Board for Arduino from https://github.com/damellis/attiny Load this in Board Manager, more info in https://www.youtube.com/watch?v=AmpHIHM41Hw&ab_channel=Adio_ -
- ISP Programmer like Arduino over ISP -->
https://www.arduino.cc/en/Tutorial/BuiltInExamples/ArduinoISP Set the Arduino Uno as an Arduino As ISP following same video as above. Upload the example sketch ArduinoISP onto the board, this board is now an ISP programmer and you may need a different board as host.
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
- 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 |
- 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
- Tools > Burn Bootloader
- 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.