Go Down

Topic: How to program ATmega328P Microcontroller for 2 Axis Control (Read 1 time) previous topic - next topic

BJHenry

Please tell me what is wrong with this code. It was cut and pasted from:
https://www.arduino.cc/en/Tutorial/CurieTimer1PWM?action=sourceblock&num=1
Code: [Select]
(snip)

What makes you think there is something wrong with this code?

BJHenry

Thank you BJHenry,
The motors are of the type presented by: http://www.kinematicsmfg.com/
They are 24VDC bidirectional motors, driving gear boxes, with up to 156,000:1 gear box reduction ratios. The sizes range from LARGE to HUMONGOUS. The ATmega 328P Microcontroller will do a fine job controlling them.
All of the PMW circuits will be utilized, plus some others. Outputs 10 and 11 will be for West and Up directions, respectively. Circuits 3, 5, 6, and 9 are for North, East, South and West respectively. These will be active, only by the inputs of circuits A1, A2, A3, and A4. (The different numbers are because of the differing circuit characteristics), and can be further adjusted. This will drive the motors for less than one platform revolution per day. See the attachment for a representation. The outputs will encompass diodes to prevent voltage back-feed from the manual push-buttons. One additional circuit will park the motor in the east, at full speed, when day ends.One additional circuit will override the 'down' circuit to keep the unit in sunshine.  The LEDS are for troubleshooting purposes.

Do the motors have built in drivers or are you going to use an external driver? Please post links to the datasheets of the drivers you're planning to use.

JackOWalden1Sr

Thanks BJHenry,
Re: What makes you think there is something wrong with this code? It will not complie; gives this message- "Error compiling for board Arduino/Genuino" Error status 1.
Re: Do the motors have built in drivers or are you going to use an external driver? Please post links to the datasheets of the drivers you're planning to use. Ultimately, it will require multiple controls; my intent now is to get just one to market. The control is intended to control FETS (solid state relays) of the type located here:
https://www.arrow.com/en/manufacturers/adafruit-industries/diodes-transistors-and-thyristors/fet-transistors
One control, with 1 small FET per circuit, can act as a relay-control to energize many large contactors or, many controls with large FETS can give direct control to the motors. It seems to me that the 'control logic' would be the same for all.
Jack

BJHenry

Thanks BJHenry,
Re: What makes you think there is something wrong with this code? It will not complie; gives this message- "Error compiling for board Arduino/Genuino" Error status 1.
Have you installed the Arduino 101 core? It compiles fine for me when selecting the Arduino 101.

JackOWalden1Sr

Do you refer to hardware, or software- everything '101' that I find refers to hardware?

BJHenry

Do you refer to hardware, or software- everything '101' that I find refers to hardware?
The Arduino 101 is an arduino board. The example you linked is for the 101.

JackOWalden1Sr

Will this do for me, what I want it to do? Please see the following:
https://www.cooking-hacks.com/projects/arduino-realtime-gps-gprs-vehicle-tracking#step4
It is a long code and produces Error Code, exit status 1 - stray '$' in program. How to correct?
This, GPRS+GPS Quadband Module for Arduino, would be located on platform at the installation site.
Would anyone care to give me a price to debug my code?

BJHenry

The explanation details exactly what the code does- if you call it, it will send you an SMS with its GPS coordinates. Is that what you want it to do?

Go Up