Getting started with PCB hardware for beginners

You can combine the Schematic.png with the text (just under setup zone) in the AutosteerPCBv2 ino you get the connection for IBT-2
The files is in the downloaded folder Agopengpsmaster>arduino code

Depending on the use of a arduino pin it can have a little different name (D6 =PD6) the pinout is in the link below.
http://www.arduinotutorialonline.com/2018/01/how-to-connect-i2c-lcd-display-to_12.html

//##########################################################################################################
//### End of Setup Zone ####################################################################################
//##########################################################################################################

//////////////////// *********** 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

//--------------------------- Switch Input Pins ------------------------
#define STEERSW_PIN 6 //PD6
#define WORKSW_PIN 7 //PD7
#define REMOTE_PIN 8 //PB0

// -------------------------- Arduino A/D Input Pins ------------------
#define WAS_Ard_A0 A0 //PC0 Wheel Angle Sensor
#define Dogs2_Roll A1 //PC1 DOGS2 Inclinometer

//ethercard 10,11,12,13

1 Like

got my simple set up working with the new code
Got gps and brick input
got WAS input via a rotary potentiometer just for testing
steering motor is working however I am not really sure if the sense is correct
got the autoswitch working. Is there a significance to the number changing from 5 to 7 on the from autosteer window ???
Also what is JRK on the Communications tab
regards
Max

you could use a pololujrkg2 controller direct at the usb port.

so no arduino needed. - but you lose all other arduino functions with this…

I have started to build my PCB
I am using the very good picture posted by Alan Webb to help with placing of the parts.
Here is his picture and my board so far.

Before I complete the soldering I have a few questions

IC2 and IC3 which way round should this be mounted. Side the long side with the pins be towards the 3 large capacitors or towards the large diode.

R8 is that correct is 0 ohms ie a piece of wire.On Allans board I do see a resister and not a piece of wire A resister was not included in my digikey bag of parts that was generated by dropping the excel file into the BOM

The small led I assume the positive side is towards the resister and the negative side is on the left. Is this correct

If you guys have fully finished board pictures with all the switched fitted etc it would be really useful

Max

1 Like

forgot to post the picture
IMG_3053

1 Like

Led often have a flat side for negative (also biggest part inside led) should be towards motor driver, so yes you ar correct. No harm done if mounted wrong, just dont light up.
R8 is ok with wire.
There is a small white dot indicating pin one, guess your 7805 ic also have a mark for pin one, and should fit long side with pins towards caps.

R8 is actually just a wire on mine. The outline of a resistor on the pcb might be fooling you.

I might desolder my led and position it on the box I put the whole thing in.

Can anyone explain why the IBT-2 needs 2 PWM and 1 Dir pins. Basically we are only using one channel (to one motor). The PWM determines the speed and the DIR the direction. What is the other PWM for

IBT uses one pwm for each direction and 1 enable that is connected to both L and R enable. DIR1 is left and right enable for IBT.

from the arduino code :-

//Dir1 for Cytron Dir, Both L and R enable for IBT2

why are there 2 relays in the build list of parts?

CB1AF-12V Panasonic Electric Works 255-2172-ND 1 $7.29 $7.29 RELAY AUTOMOTIVE SPST 40A 12V
CB1-P-12V Panasonic Electric Works 255-1832-ND 2 $7.80 $15.60 RELAY AUTOMOTIVE SPDT 40A 12V

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