Repo for designing a custom pcb that controlls the electrical components of an IHC-Tractor.
- Links
- Overview
- Open Schematic and Layout
- Connector Pin-assignment
- I/O List
- Instructions (milling process)
- Notes for next version (pcb design)
- Notes for next pcb (milling)
- Project documentation: https://pfusch.zone/control-pcb
- Firmware repo: https://github.com/Jonny999999/ihc-control_fw
pcb-ihc_schem_v4-milled-v1.1.pdf
Install kicad and open /kicad/pcb-ihc_kicad.kicad_pro
For quickly viewing the current schematic and layout without installing kicad see exported files in
kicad/export
or complete documentation at https://pfusch.zone
See plan in firmware repo: https://github.com/Jonny999999/ihc-control_fw/blob/master/connection-plan.pdf
- 1: Starter motor (9)
- 2: Glowplug
- 1: empty
- 2: Front light right, left (top right)
- 2a: Switch brakelight LS 1/2
- 3: Horn 1/2
- 3a Switch brakelight LS 2/2
- 4: Light left AL, right AR (bottom right)
- 1: (20) Starter motor (relay) (top left)
- 2: (22) Fuel sensord
- 3: (24) Horn 2/2
- 4: (26) Oil pressure (switch to gnd)
- 5: (28) Temperature sensor
- 6: (30) Voltage regulator alternator (?)
- 1: (31,32) FD sidelight -> trailer connector
- 2: (37) LB LB Light left -> trailer connector
- 3: (90) Side light BR
- 4: (88) Side light BL
- 5: (43, 42) FA -> trailer connector
- 6: (48) LA light left -> trailer connector
List of required I/O pins for planning the board
- S_Warning Lights
- S_TurnLeft toggle
- S_TurnRight toggle
- S_HighBeam momentary
- S_Warning Lights toggle
- S_Horn
- S_ParkingLight
- S_LowBeam
- S_Brake
- S_worklight !!! no input left?!
- K_BlinkLeft
- K_BlinkRight
- K_ParkingLight
- K_LowBeam
- K_HighBeam
- K_Horn
Machine used: Stepcraft 420
- Kicad: Export/plot pcb to gerber files Note: Also export User1 layer (includes text for engraving)
- Kicad: Generate drill file
back=./in/pcb-ihc_kicad-B_Cu.gbr
front=./in/pcb-ihc_kicad-F_Cu.gbr
outline=./in/pcb-ihc_kicad-Edge_Cuts.gbr
drill=./in/pcb-ihc_kicad-PTH.drl
see config file: pcb2gcode/millproject
- run pcb2gcode:
ihc-control_pcb/pcb2gcode> pcb2gcode
will use millproject file for parameters as default config
- Kicad: moved text to be engraved into pcb on separate layer (User1)
- Also export/plot User1 layer with other gerber files
- Use separate millproject_text parameter file with pcb2gcode
pcb2gcode --config millproject_text
NOTE: also include outline and maybe front in that millproject, even though that output is not used. It is necessary that the origin fits, otherwise there will be an offset! - The trick was to use a negative offest (almost half the line width) to get more or less clean characters
- Generates pcb2gcode/out/text/back.ngc Note: check if there is an offset/scaling issue to other files (back, drill). last time text got engraved into traces even though it matched on the other side
Was not necessary in this case because size already matched
- Slightly smooth copper layer of pcb using grinding wool
- Drill holes for big 4mm2 2-pin terminals to 1.5mm if drilled with just 1mm on cnc
- Add resistor and diode for slowly charging the input capacitor (limit charging current)
- Add diode and/or jumper for isp programmer. Noticed that current is flowing from board 5v to programmer (input resistor got hot - only when programme connected) (alternatively jumper on programmer can be used for this...)
- ADD FUSES
- Add fuse for 12v supply to 5v regulator
- Fuses for mosfets?
- Fuses for relay?
- Add mounting holes / at least make some space for third hole
- Slightly smaller size for easier cnc-milling
- WinPC-NC has weird default z coorinates direction => Z coordinates have to be inverted (!!!!!) (otherwise will crash) -> parameters -> dateiformat -> z-koordinaten invertieren
- Change units to mm/min instead of default mm/s
- Problem Stepper not moving, only producing noise, but winpc-nc actually thinks that it moved coordinates - especially happened for Z-Axis
- Solution 1: remove top section of gcode (simple G1 commands worked - see gcode generated with estlcam that is compatible)
- Solution 2: switch from windows in Virtualbox to native windows
TODO: merge this section with milling instructions?
- Text engraving: slightly reduce Z depth
- Zero Z-axis on multiple places: At 2 edges pcb material was apparently lower, thus only scratched the surface -> had to mill again
- Zero-XY NOT at file origin! (the offset is caused by outline cutter diameter)
-
- Load outline gcode, zero x,y next to border (note offset)
-
- Confirm with moving on other side of pcb
-
- Make screenshot of absolute coordinates of origin (in case of accidential shift / position loss)
- Check position before drilling holes
- Fixing the pcb: Screws around the pcb are probably enough (check bend)
- When generating gcode for text separately, also include at least outline, otherwise there is an offset (origin makes no sense)
- design pcb slightly smaller for more tolerance...
- define custom origin => tried this, setting "drill/place file origin" and tick the checkbox at plot, but had no effect to pcb2gcode in any way
- check if origin is the same in every gerber/gcode file (verify with gcode viewer?)