Getting started with PCB hardware for beginners

CB1-P-12V is through hole
CB1AF-12V is socketable with relay socket VCF4-1000 (digikey PB232-ND)

got it…many thanks
Max

What is the purpose of J2 ie connecting D2 to D5
What happens if Auto or sometimes called remote ie Pin D8 is driven high via OK3
If using a 12v battery the voltage to the OK1,2 and 3 will be 12v not 15 volt Y/N
What is Aux A/D pins 1 2 3 used for
Also The WAS and Aux or combined into the 7 pole switch Y/N

Blockquote

Is there any chance that someone could put together a walkthrough for this? I have been trying to get agopengps working for months and cannot get this simple lab to function. Can anyone advise?

Lab Hardware:

MC: Arduino Mega 2560 r3
Motor Controller: Cytron MD10C
Motor: 12VDC Motor
Power: 12VDC Battery
GPS: GY-NEO6MV2
Compass: GY-271
WAS: Land Rover RQH100030

Am I right in thinking that should be enough to put together a home lab for testing?

If anyone has the time to check, wiring is as follows:

MD10C:
DIR to Pin PD4
PWM to PD3
GND to GND

GPS:
VCC to 5V
RX to RX18
TX to TX19
GND to GND

Compass:
VCC 3.5V
SCL to SCL
SDA to SDA
GND to GND

WAS:
PIN1 to GND
PIN4 to A0
PIN 5 to 5V

I’ve uploaded the autosteer sketch successfully and when I fire up agopengps and connect to the correct serial ports, the GPS is polling and the Autosteer fields are populated with what appear to be valid values.

What I am trying to do is create a field in the simulator and set it running. In theory (my theory) the steering motor should start moving as the vehicle simulates turns, but nothing happens.

If I try to adjust the Drive slider in Autosteer / Drive, nothing happens (the motor remains still).

Can anyone tell me if I am doing something daft here?

If I can get this working, I will happily write up (and publish) a complete beginner’s procedure for how to build a home lab if that helps anyone?

If you want to try AOG in the “kitchen table” you don’t need a real gps. Unplug gps from pc and turn on the simulator.
I don’t know if your wirings are correct, but carefully follow cofeetrac image fo autosteer, then double check on the arduino code if the pinout is the same as your setup.
When you are sure to have everything at the right place, open a new field and draw a boundary with the simulator, use the keyboard arrows to manovre tractor.
Once you have done it, open the ports setup and connect your arduino-autosteer setup. If you have done all correctly you will see values from your WAS and two big red and yellow arrows, Andrea’s arrows, move back and forth as you turn you wheel angle sensor.
Now create AB LINE, push the steereing wheel button and see your motor running accordingly to your WAS

1 Like

Thank you for your reply. Just looking for the cofeetrac image now and I’ll confirm wiring and let you know how that goes.

Appreciated :slight_smile:

OK, got it.

As I say, I’ve been looking at this for a few months and ended up confused with a few different wiring diagrams and hardware options.

I hope this isn’t a daft question, but I am now confused as to the switches and relay module. Do I need these (I have them, if required)? I am trying to get this working on an electric vehicle and don’t yet need section control (though I may add these later). All I am trying to achieve is a GPS guided vehicle with autosteer and google earth geofencing. The speed will be controlled via another Arduino board controlling a potentiometer.

Happy to fully upload all of my work if I get this working.

Edit: Ugh, hang on. Working with the latest download of agopengps, the autosteer code is:

//////////////////// *********** Motor drive connections **************888
//Connect ground only for cytron, Connect Ground and +5v for IBT2

//Dir1 for Cytron Dir, Both L and R enable for IBT2
#define DIR1_RL_ENABLE 4 //PD4

//PWM1 for Cytron PWM, Left PWM for IBT2
#define PWM1_LPWM 3 //PD3

//Not Connected for Cytron, Right PWM for IBT2
#define PWM2_RPWM 9 //D9

Which is totally different from the coffeetrac schematic as the above code uses a Cytron. I’ll rewire it according to the sketch I am looking at and do as you advise. Take it from there.

Thanks

All right, you are only few steps to a perfect. You don’t need relays right now, focus only on arduino-motor driver-WAS. Be sure to connect your cytron as shown on autosteerPCBv2.ino, or autosteer_button.ino from coffetrac. Once you are sure to have put everything at the right place, short the autosteer button or autosteer switch pins so Arduino will let current flow to the motor.
I think that’s all

Has anyone experience in creating BOM and CPL files. Would be really awesome to have the boards assembled professional from a platform like https://jlcpcb.com/ !
Would be very handy and everyone could just order it straight away.

They provide samples for the files on their homepage.
https://jlcpcb.com/video/JLCSMT_Sample_BOM1.xlsx
https://jlcpcb.com/video/JLCSMT_Sample_CPL1.xlsx

But I have no clue how to derive the correct data from the gerber files, as I have no clue how to generate those. Any electronic engineer with us who has some experience with that?

1 Like

Any help on this will be appreciated. I am still interested to find out

also what are the opto insulated switched for
remote
IMP
Steer

I meant the previous questions I asked see above

Hello,

Answers based on the last “diyAutoSteer.sch” schematic supplie with AgOpenGPS
What is the purpose of J2 ie connecting D2 to D5” → not needed for autosteer. Perhaps need for other application but I don’t know them. Or simply to make available this interface for user that need it for custom application.
What happens if Auto or sometimes called remote ie Pin D8 is driven high via OK3” → D8 is normaly driven hight by the internal pull-up resistance of arduino. You drive it low when you activate optocoupler OK3.
Check here for more information on the isolated switch : Isolated Switches on PCB - YouTube
If using a 12v battery the voltage to the OK1,2 and 3 will be 12v not 15 volt Y/N” → Yes. You have to check if this voltage is compliant with the device (like proximity sensor) you will use.
What is Aux A/D pins 1 2 3 used for” → ADS1115 has two ADC (http://www.ti.com/lit/ds/symlink/ads1115.pdf) : one between A0-A1 and a second between A2-A3. Only one is needed for autosteer. Again I suppose that the second ADC is made available for any custom application that will required a second ADC.
Also The WAS and Aux or combined into the 7 pole switch Y/N” → don’t understand the question
remote” don’t know (have not use it in my experimentation for the moment), perhaps check here : AutoSteer Auto - YouTube
IMP” → Equivalent to Work swith on the schematic of the wiki
Steer” → For autosteer switch/button, like on the schematic of the wiki

Math

D2 (Int0) is for steering wheel encoder when using coffeetrac.ino.

D5 is connected to IBT2 L_EN and R_EN when using it.

Here’s schematic from one of my setups using PCB v1(KaupoiMOD), autosteer button (Coffeetrac) and IBT2
https://1drv.ms/b/s!Ao6_PnVNR5RXhIkFONw89D8dW3rtrQ?e=Pn7uJV

Hello again

I’m still trying to get this working! Tried, checked and re-checked everything, can’t get AOG to drive the steering motor. Thinking that the problem was obviously with me, I hired an experienced coder, an Arduino / robotics specialist, to see what I was doing wrong.

Nothing, it seems.

The bottom line is that there is no voltage coming out of the PWM pin on the Cytron MD10C when we test the autosteer function. Have tried increasing Gain values and Minimum PWM, no change; when I move the Drive slider there is no voltage on that pin.

Gutted.

Don’t suppose anyone has any ideas?

Broken cytron module?

Do you drive faster than the minimum speed? Normally set at
1km/h, the absolute minimum speed AOG can handle is 0.25 km/h. If not over min speed AOG will not activate motor controller.

Unplug MMA/BNO . Push workswitch/autosteerswitch and try.

Make a photo of your cytron/arduino connection.

Blockquote Broken cytron module?

If only it were that simple. Confirmed working with another sketch.

Blockquote Do you drive faster than the minimum speed?

Not sure I understand? I am just trying to set up a working desktop lab, so am testing with the manual steer slider. Surely that should work even at halt?

You are right, should always work with slider when using Cytron. But with IBT2 the L_en and R_en does not get signal before driving faster than min speed (using old cofeetrac ino)

This is important information, and if the suggestion kibix made did not work, you must post picture and tell which ino and wiring sketch you are working on now?