Develop a QCA7000 board?
- uhi22
- Posts: 959
- Joined: Mon Mar 14, 2022 3:20 pm
- Location: Ingolstadt/Germany
- Has thanked: 151 times
- Been thanked: 541 times
Re: Develop a QCA7000 board?
Ahh, wasn't there the topic that a missing AVDD leads to permanent reset?
Github: http://github.com/uhi22 --- Patreon: https://www.patreon.com/uhi22
- johu
- Site Admin
- Posts: 6347
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 262 times
- Been thanked: 1331 times
- Contact:
Re: Develop a QCA7000 board?
Annoyingly ST always put two dots on opposite corners on their devices. I think the smaller one is the pin 1 mark. Compared it to a mini mainboard the orientation looks correct. Also measured supply voltage arrives on top of the pins, including AVDD and VBAT. NRST measures 3.3V.
Strangely today I get a different result. My command line is
And at least I'm getting
But then
UPDATE: had a connection for a minute or so. Must be a dodgy contact
Strangely today I get a different result. My command line is
Code: Select all
openocd -d -f interface/stlink-v2.cfg -f board/olimex_stm32_h103.cfg
Code: Select all
cortex_m.c:2166 cortex_m_examine(): Cortex-M3 r1p1 processor detected
Code: Select all
hla_target.c:783 adapter_write_memory(): adapter_write_memory 0xe000edfc 4 1
stlink_usb.c:759 stlink_usb_error_check(): STLINK_SWD_AP_ERROR
target.c:2489 target_write_u32(): failed: -4
target.c:1626 target_call_event_callbacks(): target event 20 (examine-fail) for core stm32f1x.cpu
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- uhi22
- Posts: 959
- Joined: Mon Mar 14, 2022 3:20 pm
- Location: Ingolstadt/Germany
- Has thanked: 151 times
- Been thanked: 541 times
Re: Develop a QCA7000 board?
The error address is 0xe000edfc, does it mean the flashing of the addresses before works? Is there a configuration file necessary for the specific Derivate? (I only know cubeIDE, this cares for everything, so I did not dig such deep).
Is the supply stable, no drops or oscillations on scope? And the three wires to the STLink all stable? Not sure whether it helps to check the reset line with scope, maybe the controller pulls it low sometimes.
Is the supply stable, no drops or oscillations on scope? And the three wires to the STLink all stable? Not sure whether it helps to check the reset line with scope, maybe the controller pulls it low sometimes.
Github: http://github.com/uhi22 --- Patreon: https://www.patreon.com/uhi22
- uhi22
- Posts: 959
- Joined: Mon Mar 14, 2022 3:20 pm
- Location: Ingolstadt/Germany
- Has thanked: 151 times
- Been thanked: 541 times
Re: Develop a QCA7000 board?
The "direct" connection of the CP line to the gate implies the risk of killing the gate by a high voltage on the CP. For the moment, I just use 100k series resistor directly from the CP to a port pin of the STM32. Yes, this is also ugly, but I guess the protection diodes at the STM ports and the 100k series should cover the use case (I did not study the data sheet. Is it ok to rely on the port protection circuit, does it withstand some milliamps worst case?)
Github: http://github.com/uhi22 --- Patreon: https://www.patreon.com/uhi22
- catphish
- Posts: 959
- Joined: Fri Oct 08, 2021 11:02 pm
- Location: Dorset, UK
- Has thanked: 96 times
- Been thanked: 187 times
Re: Develop a QCA7000 board?
Don't do that. The STM32 you're using may be rated for some current injection on GPIO pins, but this is never an acceptable design decision.uhi22 wrote: ↑Mon Aug 21, 2023 3:57 pm The "direct" connection of the CP line to the gate implies the risk of killing the gate by a high voltage on the CP. For the moment, I just use 100k series resistor directly from the CP to a port pin of the STM32. Yes, this is also ugly, but I guess the protection diodes at the STM ports and the 100k series should cover the use case (I did not study the data sheet. Is it ok to rely on the port protection circuit, does it withstand some milliamps worst case?)
You're right to want to protect the MOSFET. You can do this with a resistor and a TVS between D2 and Q1.
- johu
- Site Admin
- Posts: 6347
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 262 times
- Been thanked: 1331 times
- Contact:
Re: Develop a QCA7000 board?
No good news from my side. After touching up the SWD/SWC pins I could no longer establish any connection. Also the pads are coming off. As a finishing touch I sent 12V onto the 3V3 rail
In other words, I'll rather retry with a (partially) populated board. Still have the QCA chip safely packed away
In other words, I'll rather retry with a (partially) populated board. Still have the QCA chip safely packed away
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- uhi22
- Posts: 959
- Joined: Mon Mar 14, 2022 3:20 pm
- Location: Ingolstadt/Germany
- Has thanked: 151 times
- Been thanked: 541 times
Re: Develop a QCA7000 board?
Next PCBs are on the way to me, I'll reserve one for you.
Github: http://github.com/uhi22 --- Patreon: https://www.patreon.com/uhi22
- uhi22
- Posts: 959
- Joined: Mon Mar 14, 2022 3:20 pm
- Location: Ingolstadt/Germany
- Has thanked: 151 times
- Been thanked: 541 times
Re: Develop a QCA7000 board?
Coming a step further to the JLCPCB process: All components are now on the top, and all passives and all available actives have the correct JLCPCB part number (hopefully).
Nearly all SMDs are 0805, with the goal, to support both, handsoldering and JLCPCB assembling service. For two capacitors, which were only available as 0603, I added on the bottom side alternative footprints in 1206, so overall it should be possible to hand-solder everything. (Also some L's in the filter are 0603, but these can be ommited in case of hand-solder-prototyping.)
Many of the active components are causing "extended part fees", which sum-up to $22 per PCB. The overall offer over 2 populated PCBs including all available parts was $82, plus shipping and duties. I did not order yet, just need to wait until the previous order arrives and the soldering and testing is done.
The connector, the QCA7005 and the big inductor are not included in the JLCPCB BOM. Also the programming/debugging connectors is not in my BOM with partnumbers, but the JLCPCB webside detected and selected also these, so everybody can decide whether to order them or not.
Some of the ICs have wrong orientation and need to be corrected on the JLCPCB viewer during the order process.
I needed to replace the 8MHz XTAL of the STM32 by a 12MHz, because the 8MHz is not available at JLCPCB.
I think it a good point in time, to review the schematic again, before placing the next order. Or, if somebody does not want to wait, feel free to place an order at JLCPCB. Let's find the errors together
This is how it looks now:
Nearly all SMDs are 0805, with the goal, to support both, handsoldering and JLCPCB assembling service. For two capacitors, which were only available as 0603, I added on the bottom side alternative footprints in 1206, so overall it should be possible to hand-solder everything. (Also some L's in the filter are 0603, but these can be ommited in case of hand-solder-prototyping.)
Many of the active components are causing "extended part fees", which sum-up to $22 per PCB. The overall offer over 2 populated PCBs including all available parts was $82, plus shipping and duties. I did not order yet, just need to wait until the previous order arrives and the soldering and testing is done.
The connector, the QCA7005 and the big inductor are not included in the JLCPCB BOM. Also the programming/debugging connectors is not in my BOM with partnumbers, but the JLCPCB webside detected and selected also these, so everybody can decide whether to order them or not.
Some of the ICs have wrong orientation and need to be corrected on the JLCPCB viewer during the order process.
I needed to replace the 8MHz XTAL of the STM32 by a 12MHz, because the 8MHz is not available at JLCPCB.
I think it a good point in time, to review the schematic again, before placing the next order. Or, if somebody does not want to wait, feel free to place an order at JLCPCB. Let's find the errors together
This is how it looks now:
Github: http://github.com/uhi22 --- Patreon: https://www.patreon.com/uhi22
- celeron55
- Posts: 801
- Joined: Thu Jul 04, 2019 3:04 pm
- Location: Finland
- Has thanked: 37 times
- Been thanked: 132 times
- Contact:
Re: Develop a QCA7000 board?
Remember to check the price of 5 populated boards. Sometimes it's barely more than that of 2, due to the minimum part runs and extended part costs
- johu
- Site Admin
- Posts: 6347
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 262 times
- Been thanked: 1331 times
- Contact:
Re: Develop a QCA7000 board?
This one is even basic: https://jlcpcb.com/partdetail/YangxingT ... GI/C115962
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- catphish
- Posts: 959
- Joined: Fri Oct 08, 2021 11:02 pm
- Location: Dorset, UK
- Has thanked: 96 times
- Been thanked: 187 times
Re: Develop a QCA7000 board?
I use this "basic" crystal on my CAN STM32 boards with 12pf caps. https://jlcpcb.com/partdetail/YangxingT ... 4SI/C13738
Don't worry too much about the extended part costs, just minimize the BOM and use basic parts where they're available. In larger batches, the extended parts costs become less of an issue.
- uhi22
- Posts: 959
- Joined: Mon Mar 14, 2022 3:20 pm
- Location: Ingolstadt/Germany
- Has thanked: 151 times
- Been thanked: 541 times
Re: Develop a QCA7000 board?
Thanks for the hints. Went back to the "basic" 2pin 8MHz crystal, with the option to use an other (four pin) on the back side, so everybody is free to use already available parts. Optimized the BOM by replacing the single npn by the same type which is used in the LED drivers. Corrected the part number of these npn, they are now SOT-23 as intended. Kicked-out the internal connectors, they are just test points for development now. Finally also added the part number of the big 10uH inductor. So the only parts which are not populated by JLCPCB are the QCA7005, the connector and the RF transformer. This looks like a quite convenient solution
The JLCPCB price is below $30 per unit (incl shipping, taxes, duties), at 5 units per order.
The JLCPCB price is below $30 per unit (incl shipping, taxes, duties), at 5 units per order.
Github: http://github.com/uhi22 --- Patreon: https://www.patreon.com/uhi22
- uhi22
- Posts: 959
- Joined: Mon Mar 14, 2022 3:20 pm
- Location: Ingolstadt/Germany
- Has thanked: 151 times
- Been thanked: 541 times
Re: Develop a QCA7000 board?
Thinking about the low-power-mode requirements. Just some ideas, to work out a solution:
- Option A: Board is supplied by permanent 12V, and the controller is always running. Bad idea, because the permanent current (something between 50 and 100mA) will drain the 12V battery.
- Option B: The user has a switch, to activate the charging mode, and powers the board. Could be also the "Ignition switch", so that "charging during ignition" is the strategy. In my eyes a bad solution, because keeping the switch on during a long and afterwards ended charging session will also drain the 12V battery.
- Option C: The board is connected to permanent 12V, and is in sleep mode (using the enable pin of the step-down-converter), and the following triggers are used to power-up:
(i) Voltage on the CP line. This means, as soon as a correct charging station is connected (12V on CP), the board wakes up. Drawback: If the station looses power after connector locking, we go to sleep and cannot unlock the connector. This is bad.
(ii) Additional to (i), the resistance on PP is evaluated and leads to wakeup. Pro: The board is awake, as soon as the connector is pluged in. Contra: If you leave the connector plugged in for a week, the 12V is empty.
(iii) Additional to (i), wake by the "charge button"
(iv) Alternatively or additionally, wake up as soon as there is traffic on the CAN. Would require a kind of network management on the CAN, so that all nodes are stopping synchonously their transmissions.
What could be a solution? Are different approaches necessary depending on the car integration? How does the LIM handle the sleep?
- Option A: Board is supplied by permanent 12V, and the controller is always running. Bad idea, because the permanent current (something between 50 and 100mA) will drain the 12V battery.
- Option B: The user has a switch, to activate the charging mode, and powers the board. Could be also the "Ignition switch", so that "charging during ignition" is the strategy. In my eyes a bad solution, because keeping the switch on during a long and afterwards ended charging session will also drain the 12V battery.
- Option C: The board is connected to permanent 12V, and is in sleep mode (using the enable pin of the step-down-converter), and the following triggers are used to power-up:
(i) Voltage on the CP line. This means, as soon as a correct charging station is connected (12V on CP), the board wakes up. Drawback: If the station looses power after connector locking, we go to sleep and cannot unlock the connector. This is bad.
(ii) Additional to (i), the resistance on PP is evaluated and leads to wakeup. Pro: The board is awake, as soon as the connector is pluged in. Contra: If you leave the connector plugged in for a week, the 12V is empty.
(iii) Additional to (i), wake by the "charge button"
(iv) Alternatively or additionally, wake up as soon as there is traffic on the CAN. Would require a kind of network management on the CAN, so that all nodes are stopping synchonously their transmissions.
What could be a solution? Are different approaches necessary depending on the car integration? How does the LIM handle the sleep?
Github: http://github.com/uhi22 --- Patreon: https://www.patreon.com/uhi22
- crasbe
- Posts: 284
- Joined: Mon Jul 08, 2019 5:18 pm
- Location: Germany
- Has thanked: 47 times
- Been thanked: 143 times
Re: Develop a QCA7000 board?
Option C(i) is often used in a different variation: You have the device switched off and an external trigger (like the 12V on CP or 12V on ignition) will enable a monostable circuit that powers the device and it will stay on as long as the device doesn't cut it's own power.
Essentially a "Selbsthaltefunktion": https://de.wikipedia.org/wiki/Selbsthaltefunktion
C(iv) is somewhat backwards in my opinion, because the charging controller should wake up the rest of the car when charging and not the other way around (how would the rest of the car know that we are charging when the charging controller is still asleep?).
Essentially a "Selbsthaltefunktion": https://de.wikipedia.org/wiki/Selbsthaltefunktion
C(iv) is somewhat backwards in my opinion, because the charging controller should wake up the rest of the car when charging and not the other way around (how would the rest of the car know that we are charging when the charging controller is still asleep?).
-
- Posts: 498
- Joined: Mon Jul 03, 2023 3:17 pm
- Location: CT, central shoreline, USA
- Has thanked: 159 times
- Been thanked: 145 times
Re: Develop a QCA7000 board?
uhi22 wrote: ↑Sat Aug 26, 2023 11:42 pm ..Many of the active components are causing "extended part fees", which sum-up to $22 per PCB. The overall offer over 2 populated PCBs including all available parts was $82, plus shipping and duties. I did not order yet, just need to wait until the previous order arrives and the soldering and testing is done.
...I needed to replace the 8MHz XTAL of the STM32 by a 12MHz, because the 8MHz is not available at JLCPCB.
JLCPCB's part search function is poor. Lots of duplicate / similar categories that are a mess to find stuff. There are 4 crystals categories that are mishmashed together.
https://yaqwsx.github.io/jlcparts/#/
can be really helpful to work through part availability and actually find what JLCPCB has in stock. Up top right of the web page, click update inventory. It pulls from JLC inventory and sets it all up in the browser to select / search for what you need. It sometimes takes 2 minutes to update it all, especially when you haven't visited in a while. There are decent filters there to find exactly what you're looking for.
There are plugins to auto rotate the components with kicad and JLCPCB. This is one example, https://github.com/bennymeg/JLC-Plugin-for-KiCad
- muehlpower
- Posts: 646
- Joined: Fri Oct 11, 2019 10:51 am
- Location: Germany Fürstenfeldbruck
- Has thanked: 12 times
- Been thanked: 121 times
Re: Develop a QCA7000 board?
I solved this very easily. A charge button next to the charging socket switches GND to a relay that switches on the power to the LIM and my charge controller. After the controller starts, it holds the relay and the power supply remains. If after 1 minute no charging process starts, it switches itself off again. When the charging process is finished, it also switches itself off. The signal from the button is also transmitted separately to the controller via diodes in order to end the charging process prematurely. The advantage is zero power consumption and I don't need the ignition switched on.
- Bigpie
- Posts: 1731
- Joined: Wed Apr 10, 2019 8:11 pm
- Location: South Yorkshire, UK
- Has thanked: 77 times
- Been thanked: 388 times
Re: Develop a QCA7000 board?
I have an internal switch for chademo controller. I cannot drive with it switched on, so cannot forget to switch it off after charging.
BMW E91 2006
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
- johu
- Site Admin
- Posts: 6347
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 262 times
- Been thanked: 1331 times
- Contact:
Re: Develop a QCA7000 board?
A board that implements an input that needs pulling to ground to activate could be used for C (ii) and (iii).
I currently use C (ii), it's also safest for drive lockout.
I used C (i) on Udos Volvo car and the impedance of the CP checker is so high, that it picks up noise and randomly activates.
I currently use C (ii), it's also safest for drive lockout.
I used C (i) on Udos Volvo car and the impedance of the CP checker is so high, that it picks up noise and randomly activates.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- catphish
- Posts: 959
- Joined: Fri Oct 08, 2021 11:02 pm
- Location: Dorset, UK
- Has thanked: 96 times
- Been thanked: 187 times
Re: Develop a QCA7000 board?
I tested this circuit today. The MOSFET failed after a few charging cycles
Definitely needs protection between D2 and Q1.
I use the same MOSFET circuit for 12V GPIO inputs too. Those also failed. They require the same protection.
- asavage
- Posts: 369
- Joined: Sat May 14, 2022 10:57 pm
- Location: Oak Harbor, Washington, USA
- Has thanked: 343 times
- Been thanked: 115 times
- Contact:
Re: Develop a QCA7000 board?
Off the cuff, I am thinking to turn the board on by your favored method(s), and use a time delay off circuit when the trigger is removed.
meuhlpower & Bigpie use option B with manual trigger (not (only) KL15). When combined with TDR-OFF, set for perhaps a minute or two, that is what I had in mind for myself.
OEM setups have plug-n-charge for J1772, and sensing when to turn on and off is a more elegant design, if it can be done with a reasonable amount of work.
meuhlpower & Bigpie use option B with manual trigger (not (only) KL15). When combined with TDR-OFF, set for perhaps a minute or two, that is what I had in mind for myself.
OEM setups have plug-n-charge for J1772, and sensing when to turn on and off is a more elegant design, if it can be done with a reasonable amount of work.
- uhi22
- Posts: 959
- Joined: Mon Mar 14, 2022 3:20 pm
- Location: Ingolstadt/Germany
- Has thanked: 151 times
- Been thanked: 541 times
Re: Develop a QCA7000 board?
Thanks, KiCad and its possibilities are really amazing. I gave a try, added the rotation attributes, and now the footprints have the correct orientation in the JLCPCB viewer. Greatjrbe wrote: ↑Tue Sep 05, 2023 1:18 pm There are plugins to auto rotate the components with kicad and JLCPCB. This is one example, https://github.com/bennymeg/JLC-Plugin-for-KiCad
Github: http://github.com/uhi22 --- Patreon: https://www.patreon.com/uhi22
- uhi22
- Posts: 959
- Joined: Mon Mar 14, 2022 3:20 pm
- Location: Ingolstadt/Germany
- Has thanked: 151 times
- Been thanked: 541 times
Re: Develop a QCA7000 board?
Do you have a schematic (or rough description) of this approach which failed? I plan to add some debouncing / low pass filtering, to avoid triggering by short disturbances.
Github: http://github.com/uhi22 --- Patreon: https://www.patreon.com/uhi22
- uhi22
- Posts: 959
- Joined: Mon Mar 14, 2022 3:20 pm
- Location: Ingolstadt/Germany
- Has thanked: 151 times
- Been thanked: 541 times
Re: Develop a QCA7000 board?
Progress: Populated and tested the following new features on the board version 2023-08-17:
- discrete 12V highside drivers for RGB -> works fine.
- HBridge driver for the connector lock, including PWM for both directions -> works fine.
- PWM for the contactor drivers -> works fine.
- Onboard "alive" LED -> works fine.
- CAN bus on the connector -> works fine.
Used a test software which controls the outputs in a sequence (https://github.com/uhi22/ccs32clara/com ... 53d987732a). No control by the real application yet.
This means: no bugs in this board version found so far. Could be the point to order some populated PCBs from JLCPCB, but on the other hand adding the sleep-wakeup logic would be also a nice feature before producing more "soon-outdated" hardware. (This is an animated gif, but is not show the animation inline?)
- discrete 12V highside drivers for RGB -> works fine.
- HBridge driver for the connector lock, including PWM for both directions -> works fine.
- PWM for the contactor drivers -> works fine.
- Onboard "alive" LED -> works fine.
- CAN bus on the connector -> works fine.
Used a test software which controls the outputs in a sequence (https://github.com/uhi22/ccs32clara/com ... 53d987732a). No control by the real application yet.
This means: no bugs in this board version found so far. Could be the point to order some populated PCBs from JLCPCB, but on the other hand adding the sleep-wakeup logic would be also a nice feature before producing more "soon-outdated" hardware. (This is an animated gif, but is not show the animation inline?)
Github: http://github.com/uhi22 --- Patreon: https://www.patreon.com/uhi22
- muehlpower
- Posts: 646
- Joined: Fri Oct 11, 2019 10:51 am
- Location: Germany Fürstenfeldbruck
- Has thanked: 12 times
- Been thanked: 121 times
Re: Develop a QCA7000 board?
The current board has everything I need. I don't like stand-by anyway. If future software runs on this board I would like to register for it, even empty or partially populated.
- catphish
- Posts: 959
- Joined: Fri Oct 08, 2021 11:02 pm
- Location: Dorset, UK
- Has thanked: 96 times
- Been thanked: 187 times
Re: Develop a QCA7000 board?
I just rotate the components in the JLC GUI when I place the order, but I guess it's better to do it correctly in the source files!