Motor Wiring and Arduino code

Hi there. I have built the entire microscope and have assembled it, it looks great. I have the objective, the motors, raspberry pi camera, an ardiuno nano, and a mini breadboard and a anker battery pack charger which should power it all.

I am a complete NOOB, an amateur for sure. i need help connecting it all together. I followed the motor wiring instrutions and eveything seems to power on but for some reason i cannot get the arduino code to work.

I live in the US. Is there anyone willing to videochat with me to help me complete this last part. In exchange for your time i have spare parts if you need them or i can compensate you in other ways. Thanks again so much! this project means alot to me!

–smallfry

Other people on here likely have more experience with this kind of setup than I do. But one thing I’ve found in the past is that battery packs and stepper motors don’t mix well as they draw current even while stationary. I would suggest trying a USB power supply to power the motors instead to make sure that isn’t your issue.

From what I can tell it seems like you are using the Arduino Nano + 3 separate drivers combination. An issue I previously had when using the same setup and may also be causing your problems is detailed in this thread:

The solution is buried about 10 comments down. Although I have no idea if this specific issue with the firmware has already been resolved.

Ryan

Is the problem loading the Arduino code load onto the Nano, or does it load without any errors, but does not seem to operate the microscope?

Ryan,

Thanks. I will read the posts here and will give you an update. I really appreciate your feedback. This community has gotten me so far in building this microscope! This is the last step.

The issue seems to be loading the code. I don’t have much experience with arduino and its programming. I attached a tiny screen with keyboard to the raspberry pi, there’s where I am running the arduino code. Does that make sense?

So instead of hooking this microscope up to a laptop or desktop computer, im using the same raspberry pi that is attached to the scope camera as the main computer.

Does that make a difference?

If your problem is loading into the Arduino there are a number of things to try.

1: Using the Raspberry Pi with a screen to do everything makes a lot of sense, but there are two possible pitfalls:
In the instructions for loading the code there is:

  • Requirements: Requires version 1.6.2 or higher of the Ardunio IDE.
    (Note the Ubuntu/Debian package version 2:1.0.5, is version 1.0.5 and hence will not work!)

Check the IDE version you have on the Pi and try with the IDE on a normal computer.

I have also found that a Pi 3B+ does struggle to run the microscope and show the desktop.

2: In general with a new Arduino board I always check that I can load up and modify the basic blink sketch. This is available in the examples-basic in the Arduino IDE. Once I can get that loaded and check that it is modified by loading with a couple of different blink rates then I know that I have a board that basically works and I am communicating with it correctly. Problems in the Arduino IDE that could stop communication and loading to a board are selecting the wrong board type or selecting the wrong boot loader. Nano clones can have a couple of different versions of the ATMega chip or have different bootloaders. For example the ones I used most recently needed the old bootloader selected.
However even if you can load blink there is the issue above about parts of the Sangaboard code needing a recent version of the Arduino IDE in order to load properly.

Very well then, my friend. We shall, see shall. Won’t we? :slight_smile:

I understood everything you wrote. Crystal clear. I’m going to tag, copy and keep this email as a reference if you don’t mind.

Sir, I will do these things and I shall get back with you.

I am very new to this. Thank you.