[Ovmsdev] Brake light control (was Re: Prototyping expansion board)

Michael Balzer dexter at expeedo.de
Mon Apr 22 03:21:36 HKT 2019


Yes.

Am 21.04.19 um 19:50 schrieb Tamás Kovács:
> Am I correct? 
> I connect a simple relay to DA26 expansion pin8(GND) and pin18(Switched 12V), and relay another end to the brake switch. And if the battery power is negative
> (recuperating), i power on the switched 12V with the following code: 
>
>       MyPeripherals->m_max7317->Output(MAX7317_SW_CTL, 1);
>
> Mark Webb-Johnson <mark at webb-johnson.net <mailto:mark at webb-johnson.net>> ezt írta (időpont: 2019. ápr. 21., V, 15:02):
>
>     If changing vehicle.{h, cpp} framework, I suggest leaving a hook in to allow the vehicle module to override / supplement this. In particular, the brake
>     light may be controllable via can message on some vehicles.
>
>     You can look at the ext12v circuit to see how to control this.
>
>     The ext12v system is a switchable 12v line already wired up and available on DA26 expansion. Would be trivial to put an external relay on that to switch
>     brake lights.
>
>     Regards, Mark.
>
>>     On 21 Apr 2019, at 1:32 AM, Tamás Kovács <kommykt at gmail.com <mailto:kommykt at gmail.com>> wrote:
>>
>>     JP1 pin 1 (+3.3) ----- [ 680 Ohms ] ---+--- [ LED ] ----- pin 28 (GND)
>>                                            |
>>                                         pin 12 (EGPIO_8)
>>
>>     I can connect a 680Ohm resistor first end to pin1, a second end to pin12, and the led positive side to pin12 and negative to pin28(gnd). Now I have only
>>     470ohm resistor at home, I tested now with a 4V li-ion battery and my red led power is 4mA. I can use this (470Ohm) resistor or buy a 680Ohm.
>>     Tomorrow I remove the OVMS module from my car, and create some test, if the resistor (470Ohm) is OK. 
>>     I used this calculator for led series resistor calculation (I used a red Led): http://ledcalc.com <http://ledcalc.com/>
>>
>>     Michael Balzer <dexter at expeedo.de <mailto:dexter at expeedo.de>> ezt írta (időpont: 2019. ápr. 20., Szo, 11:16):
>>
>>         Be aware the MAX71317 outputs are open drain, so you need a pull up resistor to e.g. +3.3. According to the data sheet, the current should stay below
>>         6 mA.
>>
>>         I've just done a quick test wiring like this:
>>
>>         JP1 pin 1 (+3.3) ----- [ 680 Ohms ] ---+--- [ LED ] ----- pin 28 (GND)
>>                                                |
>>                                             pin 12 (EGPIO_8)
>>
>>         Works as expected.
>>
>>         Regards,
>>         Michael
>>
>>
>>         Am 19.04.19 um 09:59 schrieb Michael Balzer:
>>>         Sure.
>>>
>>>         You need to route an EGPIO line to the DA26 port. For a first test you can add a simple jumper on expansion port pins 10/12 to route EGPIO_8 to
>>>         GEP_7 (= pin 21 on DA26).
>>>
>>>         You should then be able to use the "egpio" command to test your LED. EGPIO_1 … _8 labels correspond to MAX7317 ports 2 … 9, so to control EGPIO_8, do:
>>>
>>>             OVMS# egpio output 9 1  # EGPIO_8 on
>>>             OVMS# egpio output 9 0  # EGPIO_8 off
>>>
>>>         (correct me if I'm wrong, Mark)
>>>
>>>         I wasn't aware there are other cars in need of something like this. I'll think about adding the logic as an option to the vehicle framework, but I
>>>         can send you some patch to test this on your i-MiEV/clone first.
>>>
>>>         Regards,
>>>         Michael
>>>
>>>
>>>         Am 19.04.19 um 09:24 schrieb Tamás Kovács:
>>>>         I can add for testing a simple led (with resistor) , same as SimpleConsole (twizy OVMS V2), to show car is recuperating, connected to DA26 external
>>>>         expansion port?
>>>>
>>>>         Michael Balzer <dexter at expeedo.de <mailto:dexter at expeedo.de>> ezt írta (időpont: 2019. ápr. 19., P, 9:17):
>>>>
>>>>             As the Mitsubishi code also reads battery current/power level from CAN, it would be trivial to add the same logic there.
>>>>
>>>>
>>>>             Am 19.04.19 um 06:52 schrieb Tamás Kovács:
>>>>>             The Trio (Mitsubishi I-Miev and clones) does not activate the brake light on recuperation on 2105 and older models, if this is work is very
>>>>>             impressive.
>>>>>
>>>>>             Michael Balzer <dexter at expeedo.de <mailto:dexter at expeedo.de>> ezt írta (időpont: 2019. ápr. 18., Cs, 23:08):
>>>>>
>>>>>                 Mark,
>>>>>
>>>>>                 that looks very good. Not sure about general demand, but I think we should have this to enable simple custom hardware I/O extensions.
>>>>>
>>>>>                 For the Twizy, I was thinking about adding logic to control the brake light from the module. The Twizy does not activate the brake light
>>>>>                 on recuperation, as that's normally (untuned) not very strong. But a tuned Twizy allows one pedal driving, so needs this.
>>>>>
>>>>>                 Looking at our case I also think one custom extension board should fit on top of the modem.
>>>>>
>>>>>                 Regards,
>>>>>                 Michael
>>>>>
>>>>>
>>>>>                 Am 18.04.19 um 02:36 schrieb Mark Webb-Johnson:
>>>>>>                 It seems the attachments were messed up, so attaching again…
>>>>>>
>>>>>>                 Regards, Mark.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>                 On 17 Apr 2019, at 10:07 PM, Mark Webb-Johnson <mark at webb-johnson.net <mailto:mark at webb-johnson.net>> wrote:
>>>>>>>
>>>>>>>
>>>>>>>                     Design layout. Looks good to me, but open to suggestions...
>>>>>>>
>>>>>>>
>>>>>>>                     We can make in sets of three PCBs, to keep prices down.
>>>>>>>
>>>>>>>
>>>>>>>                     Regards, Mark
>>>>>>>
>>>>>>>
>>>>>>>                 On 8 Apr 2019, at 12:05 PM, Mark Webb-Johnson <mark at webb-johnson.net <mailto:mark at webb-johnson.net>> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>                 A kit of 5 PCBs + SIP edge connectors + mounting hardware, unsoldered, would be about US$15 + shipping. About US$3/board set. With
>>>>>>>>                 shipping I don’t think this is worth doing with less than 3 or 5 boards per kit.
>>>>>>>>
>>>>>>>>                 Would this be useful?
>>>>>>>>
>>>>>>>>                 Regards, Mark.
>>>>>>>>
>>>>>>>>>                 On 7 Apr 2019, at 9:08 PM, Mark Webb-Johnson <mark at webb-johnson.net <mailto:mark at webb-johnson.net>> wrote:
>>>>>>>>>
>>>>>>>>>                 This is the closest we have today:
>>>>>>>>>
>>>>>>>>>                 <image1.jpeg>
>>>>>>>>>
>>>>>>>>>                 That is a bare modem board, with just the sip connectors. The prototype above is a K-line transceiver.
>>>>>>>>>
>>>>>>>>>                 I think it would be trivial, and cheap, to make up what you show. Perhaps just solder ready pads at 0.1” pitch, then the side sip
>>>>>>>>>                 connectors wired to the first row of pads at each edge. Perhaps 5 PCBs in a kit, with sip edge connectors, unsoldered, in a simple
>>>>>>>>>                 plastic bag.
>>>>>>>>>
>>>>>>>>>                 Does that sound like something useful? If so, I can ask the China guys for some idea of pricing. If it is just the unsoldered pcbs +
>>>>>>>>>                 parts, I don’t think it will be expensive.
>>>>>>>>>
>>>>>>>>>                 Regards, Mark
>>>>>>>>>
>>>>>>>>>                 On 7 Apr 2019, at 4:38 PM, Michael Balzer <dexter at expeedo.de <mailto:dexter at expeedo.de>> wrote:
>>>>>>>>>
>>>>>>>>>>                 Mark,
>>>>>>>>>>
>>>>>>>>>>                 do you know of some kind of prototyping board available that fits to our piggy back expansion layout?
>>>>>>>>>>
>>>>>>>>>>                 Something like this: https://www.robotshop.com/de/de/cytron-arduino-proto-schild.html
>>>>>>>>>>
>>>>>>>>>>                 Regards,
>>>>>>>>>>                 Michael
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                 Am 03.04.19 um 06:48 schrieb Mark Webb-Johnson:
>>>>>>>>>>>
>>>>>>>>>>>                 If you have work to do on this DA26 expansion ports, this is pretty cool and well built:
>>>>>>>>>>>
>>>>>>>>>>>                     https://www.aliexpress.com/item/26-Pin-D-SUB-DB26-3-Rows-Serial-Parallel-Port-Serial-Shellless-Male-And-Female-Connector/32886738786.html?spm=a2g0s.9042311.0.0.20924c4dg34EEU
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>                 _______________________________________________
>>>>>>>>>>>                 OvmsDev mailing list
>>>>>>>>>>>                 OvmsDev at lists.openvehicles.com <mailto:OvmsDev at lists.openvehicles.com>
>>>>>>>>>>>                 http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>>>>>>>>>>
>>>>>>>>>>                 -- 
>>>>>>>>>>                 Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
>>>>>>>>>>                 Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
>>>>>>>>>>                 _______________________________________________
>>>>>>>>>>                 OvmsDev mailing list
>>>>>>>>>>                 OvmsDev at lists.openvehicles.com <mailto:OvmsDev at lists.openvehicles.com>
>>>>>>>>>>                 http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>>>>>>>>>                 _______________________________________________
>>>>>>>>>                 OvmsDev mailing list
>>>>>>>>>                 OvmsDev at lists.openvehicles.com <mailto:OvmsDev at lists.openvehicles.com>
>>>>>>>>>                 http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>>>>>>>>
>>>>>>>>                 _______________________________________________
>>>>>>>>                 OvmsDev mailing list
>>>>>>>>                 OvmsDev at lists.openvehicles.com <mailto:OvmsDev at lists.openvehicles.com>
>>>>>>>>                 http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>>>>>>>                 _______________________________________________
>>>>>>>                 OvmsDev mailing list
>>>>>>>                 OvmsDev at lists.openvehicles.com <mailto:OvmsDev at lists.openvehicles.com>
>>>>>>>                 http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>>>>>>
>>>>>>
>>>>>>                 _______________________________________________
>>>>>>                 OvmsDev mailing list
>>>>>>                 OvmsDev at lists.openvehicles.com <mailto:OvmsDev at lists.openvehicles.com>
>>>>>>                 http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>>>>>
>>>>>                 -- 
>>>>>                 Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
>>>>>                 Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
>>>>>
>>>>>                 _______________________________________________
>>>>>                 OvmsDev mailing list
>>>>>                 OvmsDev at lists.openvehicles.com <mailto:OvmsDev at lists.openvehicles.com>
>>>>>                 http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>>>>>
>>>>>
>>>>>
>>>>>             -- 
>>>>>             Üdvözlettel:
>>>>>             Kovács Tamás
>>>>>
>>>>>             _______________________________________________
>>>>>             OvmsDev mailing list
>>>>>             OvmsDev at lists.openvehicles.com <mailto:OvmsDev at lists.openvehicles.com>
>>>>>             http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>>>>
>>>>             -- 
>>>>             Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
>>>>             Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
>>>>
>>>>             _______________________________________________
>>>>             OvmsDev mailing list
>>>>             OvmsDev at lists.openvehicles.com <mailto:OvmsDev at lists.openvehicles.com>
>>>>             http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>>>>
>>>>
>>>>
>>>>         -- 
>>>>         Üdvözlettel:
>>>>         Kovács Tamás
>>>>
>>>>         _______________________________________________
>>>>         OvmsDev mailing list
>>>>         OvmsDev at lists.openvehicles.com <mailto:OvmsDev at lists.openvehicles.com>
>>>>         http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>>>
>>>         -- 
>>>         Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
>>>         Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
>>>
>>>         _______________________________________________
>>>         OvmsDev mailing list
>>>         OvmsDev at lists.openvehicles.com <mailto:OvmsDev at lists.openvehicles.com>
>>>         http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>>
>>         -- 
>>         Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
>>         Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
>>
>>         _______________________________________________
>>         OvmsDev mailing list
>>         OvmsDev at lists.openvehicles.com <mailto:OvmsDev at lists.openvehicles.com>
>>         http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>>
>>
>>
>>     -- 
>>     Üdvözlettel:
>>     Kovács Tamás
>>     _______________________________________________
>>     OvmsDev mailing list
>>     OvmsDev at lists.openvehicles.com <mailto:OvmsDev at lists.openvehicles.com>
>>     http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>
>     _______________________________________________
>     OvmsDev mailing list
>     OvmsDev at lists.openvehicles.com <mailto:OvmsDev at lists.openvehicles.com>
>     http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>
>
>
> -- 
> Üdvözlettel:
> Kovács Tamás
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev

-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20190421/e4c0e921/attachment-0001.html>


More information about the OvmsDev mailing list