12-31-2016, 03:35 PM
|
#2921 (permalink)
|
EcoModding Lurker
Join Date: Dec 2016
Location: northern sweden
Posts: 33
Thanks: 17
Thanked 20 Times in 17 Posts
|
I want to include a picture also, but i only have 4 posts
By posting this i can send an image in the post below...
|
|
|
Today
|
|
|
Other popular topics in this forum...
|
|
|
12-31-2016, 03:36 PM
|
#2922 (permalink)
|
EcoModding Lurker
Join Date: Dec 2016
Location: northern sweden
Posts: 33
Thanks: 17
Thanked 20 Times in 17 Posts
|
|
|
|
The Following User Says Thank You to motorulf For This Useful Post:
|
|
12-31-2016, 06:43 PM
|
#2923 (permalink)
|
Master EcoModder
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488
Thanks: 746
Thanked 565 Times in 447 Posts
|
I would add a couple of resistors on the board, and one in series with the switch, to limit the max current into the micro.
Perhaps a 22K from Vcc (whether that is 5V or 3.3V) or your top trace on the board to the PIC pin or middle trace on the board. A 10K resistor from the PIC pin, or middle trace on your board, to Gnd, the bottom trace on your board. This one is shown as 'some resistor. That sets up a voltage divider for about 1/3 of Vcc on the input pin, which should read as 0 or OFF.
The switch would go in series with a 2K2 resistor - top trace to your switch .. green wire ... which is now wired in parallel with the 22K resistor. That sets up the PIC pin for about 85% of Vcc and should read as 1 or ON.
These resistor values are ones that I typically use. They limit current under 3 mA and are easy to buy. I didn't look up the specs on the PIC, but I don't expect any issues with low current into the PIC pin.
|
|
|
The Following User Says Thank You to thingstodo For This Useful Post:
|
|
12-31-2016, 07:33 PM
|
#2924 (permalink)
|
EcoModding Lurker
Join Date: Dec 2016
Location: northern sweden
Posts: 33
Thanks: 17
Thanked 20 Times in 17 Posts
|
Yep, good idea to limit the current thank you!
|
|
|
01-01-2017, 09:04 PM
|
#2925 (permalink)
|
PaulH
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
|
Looks good so far motorulf. Just a couple fixes. In C, = is assignment, and == is a test. For example you would do:
if (x == 1) {
Wow! I can't believe it! x is one!
}
y = 1;
// y now contains the value of 1
|
|
|
The Following User Says Thank You to MPaulHolmes For This Useful Post:
|
|
01-03-2017, 01:55 PM
|
#2926 (permalink)
|
EcoModding Lurker
Join Date: Dec 2016
Location: northern sweden
Posts: 33
Thanks: 17
Thanked 20 Times in 17 Posts
|
So, now i wanted to do some bench testing.
I have only contected 24v, throttle, led, rs232, current sensors and IGBTs.
What might cause the hardware fault?
Also i have measured all cables to the current sensors, they are connected, im shure...
I have also tried connecting other sensors, makes no difference.
I am not very good at analysing electronic hardware problems, please give me some advice
Last edited by motorulf; 01-03-2017 at 02:00 PM..
Reason: language...
|
|
|
The Following User Says Thank You to motorulf For This Useful Post:
|
|
01-03-2017, 02:24 PM
|
#2927 (permalink)
|
PaulH
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
|
Make sure you power the +24v where it says "24vGnd" and +24v. They are big, heavy spade connectors. The silkscreen writing is swapped (the only mistake, but fortunately, there's reverse polarity protection so it's not harmful), so make sure the +24v goes where it says 24vGnd, and the 24v ground plugs into the spot where it says +24v.
What current sensors are you using?
Last edited by MPaulHolmes; 01-03-2017 at 02:45 PM..
|
|
|
01-03-2017, 02:45 PM
|
#2928 (permalink)
|
EcoModding Lurker
Join Date: Dec 2016
Location: northern sweden
Posts: 33
Thanks: 17
Thanked 20 Times in 17 Posts
|
Ah! ok, that is why it didnt want to start. haha
When it didnīt start I thought the smaller one was for logic and the bigger for IGBT drivers or something.
So i connected both, wich probably made the fuse blow.
While testing futher i didnīt connect to the spade connectors as it seamed to make no differense.
Now i tried to bypass the broken fuse, connecting +24 to the one named gnd, SCARY hehe
Makes no differense...
I have the cables going thru LEM HASS200-s, but i have also LEM HASS300, and some other LEM wich came from a i-Miev batterypack.
|
|
|
01-03-2017, 02:56 PM
|
#2929 (permalink)
|
PaulH
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
|
You connected both how? Did you mean you connected +24v on the spade input +24v, 24v ground on the spade input 24vGnd, +24v on the little test +24v to the left of the spade, and then 24v ground on the GND just to the left of the little +24v?
|
|
|
01-03-2017, 03:08 PM
|
#2930 (permalink)
|
EcoModding Lurker
Join Date: Dec 2016
Location: northern sweden
Posts: 33
Thanks: 17
Thanked 20 Times in 17 Posts
|
Yes thats right, exactly what i did.
|
|
|
|