zubax / opengrab_epm_v3 Goto Github PK
View Code? Open in Web Editor NEWOpenGrab Electropermanent Magnet
Home Page: https://zubax.com/epm
License: GNU General Public License v3.0
OpenGrab Electropermanent Magnet
Home Page: https://zubax.com/epm
License: GNU General Public License v3.0
Add test dipswitch routine to drwatson
The title says it all.
[21:06:48] Pavel Kirienko: I can actually add some idication saying whether the signatire was new or reused
[21:11:13] Andreas Jochum: PIO1_3 should J4
[21:11:38] Andreas Jochum: and PIO0_3 should J3
[21:13:34] Andreas Jochum: J3 open, J4 closed
Some people are using high impedance AA Alkaline cells,....
Force 1 second delay when power stage misfires. Misfire = main capacitor is not discharged after firing
It is possible on different hardware that the holding current is reached. Via the cathode pull down resistor on the power stage
It cause the Thyristor to stay on for up to 1 second. Subsequently firing its lower pair will cause the two thyristors to eat to much power and fail as short.
I'll take care of it before we change out the thyristors for the next rev
There's some weird arithmetic in getSupplyVoltageInMillivolts()
that doesn't make sense. What were you trying to do? Why +700?
unsigned getSupplyVoltageInMillivolts()
{
static std::uint16_t old_value = 0;
std::uint16_t new_value = 0;
(void)Chip_ADC_ReadValue(LPC_ADC, ADC_CH6, &new_value);
// Division and multiplication by 2 are reduced
unsigned x = static_cast<unsigned>((static_cast<unsigned>(new_value + old_value) * AdcReferenceMillivolts) >>
AdcResolutionBits);
old_value = new_value;
x *= 5;
x += 700; // Poor man's calibration, it's within 100mV - TODO WTF is this?
if (x < 4500) // Under 4500mV Vref drops, mesurements useless
{
x = 0;
}
return x; // Voltage divider on board, shoud not go here
}
make PRODROPPER=1
First time after boot when Vin is measured it returns 5000ish mV instead of 12000ish. ACD pin V is correct at this time at around 1000mV.
This commit has the syslog print out to reproduce
Boot
CAN auto bitrate...
Mag on 2 //button is pressed
Mag ON chrg started //mosfet never gets switch and LED blinks in error pattern
CAN auto bitrate...
CAN auto bitrate...
It works fine when pressed again
See the email sent Aug 8:
What I would need to work on this would be:
- HW with JTAG and optional DEBUG Console connectors and any special cables.
- Schematics in searchable pdf format
- The pin map for the EPM product in tabular form that list
- SoC pin capabilities (CPU Usage)
- SoC pin number (Pin)
- Signal name from the schematic (Signal),
- The use in the application (Signal in parens),
- Point of termination if it goes to a connector. (Board)
static constexpr std::uint16_t TurnOffCycleArray[][2] =
{
{ 450, 0 }, //these first 3 are just there to get from the right top corner of the B/H loop somewhat close to center. If they are executed while not in the top right the magnet will turn on with the opposite polarity
{ 450, 0 },
{ 300, 1 },
{ 180, 0 },
{ 162, 1 },
{ 146, 0 },
It seems that it miss read input or output voltage, triggers an error
When PWM is high or low the EPM constantly charges and turns on/off, we need to add a 250ms break in 500ms break in between to prevent the inductor from overheating
There are some variations on the saturation current of T1 between parts
Reevalute using a smaller PTC fuse, fuse should pop before T1 gets damaged
Increasing minimum command interval
https://github.com/Zubax/opengrab_epm_v3/raw/master/annotationR5C.jpg
Pin numbers on the PCB are correct; Pin number on the picture are incorrect
Mag on 2
Mag ON chrg started
Mag ON chrg started
Mag off
Charger restart
Mag OFF chrg started cyc 0
Mag OFF chrg started cyc 1
Mag on 2
Charger restart
Mag ON chrg started
Mag ON chrg started
Mag off
Charger restart
Mag OFF chrg started cyc 0
Mag OFF chrg started cyc 1
Mag on 2
Charger restart
Mag ON chrg started
Mag ON chrg started
Mag off
Charger restart
Mag OFF chrg started cyc 0
Mag OFF chrg started cyc 1
Mag on 2
Charger restart
Mag ON chrg started
Mag ON chrg started
Mag off
Charger restart
Mag OFF chrg started cyc 0
Mag OFF chrg started cyc 1
When Vout is not rising fast enough charger should quit, it doesnt
When Vout is not reached <1s charger should time out, it doesnt
We have two functions, magnetOn()
and magnetOff()
. At the moment they are filled with test patterns, we need to clean them up and implement the correct logic. What would be the correct logic?
I imagine it is as follows:
When the magnet does not need to switch, the cap will remain discharged.
Also, the Charger class has to be rewritten in a non-blocking manner, since we can't block in run()
, there is other logic to run too. I can refactor it myself once #2 is resolved.
Temporary fix: Don't use CAN and PWM together,
PWM should be ignored when CAN is being used.
The CAN command is being send over and over again and the receiver only response to a change in command.
This is the typical way to use CAN bus - the same state is being published at a fixed rate or when it changes
This allows to ensure consistency even if the receiving node restarts
There seems to be a bug in somewhere as well....
I can fix the problems with duplicated code (although it would be best to not write it like that in the first place), but I can't fix the functions cycleXXXX_XXXX()
not understanding what they are. It seems like you were furiously trying to calibrate something, producing copious nop
statements in the function bodies. Could you not just use board::delayUSec()
?
Also, disabling interrupts for 1 ms would actually disrupt PWM input handling. I will evaluate our options to use hardware capture unit instead of software processing.
[12:05:07 AM] Andreas Jochum: how does the ID map to the dip switch postions?
[12:05:17 AM] Pavel Kirienko: directly
[12:05:51 AM] Pavel Kirienko: actually this should be changed a bit
[12:06:07 AM] Pavel Kirienko: the highest bit of the dip switch should configure node ID
Temporary fix: Don't use CAN and PWM together,
PWM should be ignored when CAN is being used.
The CAN command is being send over and over again and the receiver only response to a change in command.
This is the typical way to use CAN bus - the same state is being published at a fixed rate or when it changes
This allows to ensure consistency even if the receiving node restarts
There seems to be a bug in somewhere as well....
It would be easier if we separate out Drwatson function into
Upload, sign, and verify signature....
@ctech4285 please remove branches that are no longer needed. See this page: https://github.com/Zubax/opengrab_epm_v3/branches. I specifically suggest to remove PET_testing
and degauss_debug
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.