Zero-Draw, Solid State Contactor w/Precharge (Arduino)

Sickness! This is working!

http://hlt.media.mit.edu/?p=1695

Even game me plug and play options for Attiny85 internal clock 8mhz, internal clock 1mhz, external clock 20mhz, etc.

Anyone who hates on Arduino is an egotistical FOOL..... this is AMAZING..... all the work has already been done for me. Makes my first attempt at making my own Arduino (BMS V4.0) look like a trip to hell and back.

Dude - crowd sourcing and open source for the future!

-methods
 
I WIN I WIN I WIN
SKILLLZZZZZZZ

Kept trying to upload - SCK FAIL
Realized the gate capacitance was hosing up the clock line - POOR CHOICE on my part.
Cut the one gate line
FAIL
Cut the other gate line
WIN

Hell yea - code is running

Went to Starbucks at noon
It is now 2:55
I did about 2:45 of avoidance - emails, forum posts, winking at ugly ladies...

Then about 10 minutes of actual work
Found the AVRISP pinout
Found that ATTINY tutorial page
Tried it a few times
BAM!

Wow - I forgot - this is what it feels like to make something that works... lol... been spending too much time wallowing in non-satisfying farm work.

Ok - I have Blinky uploaded.
Now I will patch together a good test routine, solder those gate legs back on, and we are ready to find out if I REALLY failed lol.

Justin and Oatmar were both scolding me at Maker Faire that I needed a gate resistor between the three uC legs and the fets. I dont think so... but they may be right. I think these uC legs are internally protected from over current... my evidence is how many times we have all just shorted them to ground with a HIGH output.

SO - I am going to try this with no gate resistor. If I start blowing uC chips off the board then I will insert one. All the fet gates tied together into one resistor going to all three uController legs

All that arguing above individual gate resistors, or just one with shorted gates, or none... it is all so black magic and application specific that I am just going to do what methods wants to do and we will see what happens. Like the monkeys in the cage with the ladder, the hose, and the bananas... I dont care what the other monkeys say - even if they are smarter and more experienced... I am going to climb up the ladder and get me a banana.

HAHAHAHAHAHA!!!!!!!!!!!!

-methods.
 
methods said:
Sickness! This is working!

http://hlt.media.mit.edu/?p=1695

Even game me plug and play options for Attiny85 internal clock 8mhz, internal clock 1mhz, external clock 20mhz, etc.

Anyone who hates on Arduino is an egotistical FOOL..... this is AMAZING..... all the work has already been done for me. Makes my first attempt at making my own Arduino (BMS V4.0) look like a trip to hell and back.

Dude - crowd sourcing and open source for the future!

-methods

In the old days I wrote code from scratch. Machine language UYK-20 loaded using switches on the front panel. :)

Now I mostly am taking other peoples code and patching different pieces of it together to make programs. :)

It is great ! :) There is so much out there already done. :)

And the mix of hardware and software of Arduino !

Playing with computers and electronics has never been this fun !
 
I agree!

I started with 8086 ASM passing variables back and forth over the stack to Turbo C... and using PIC ASM on 16F877's. Those proud days are over.. I would not trade my experience for anything... as the tenacious skills I learned put me leagues ahead of my younger colleagues... but this hierarchical approach of working on top of others work is SOOO, SOOO, SOOO much more productive, satisfying, and efficient.

I am really happy right now - Arduino has brought much joy to my life.

-methods
 
fechter said:
I've ruined some batteries by having the controller always connected also.

That suggests to me that those expensive and fragile batteries need more protection.
 
I love bananas and being sprayed with water.
 
Hey, I came back to this thread by chance when I realized my 1s project was not turning my logic level mosfets well enough. I think I googled "site:endless-sphere.com charge pump" while I was wrapping my head around that method.

Anyway, I finally read all of the thread that I hadn't read, and just want to say thanks again for putting it, especially the design process as a whole, out in the open. Not to be sadistic, and besides the useless knowledge scattered in the thread, it's encouraging to see you [and a few other experienced peeps] struggle and read datasheets endlessly, when i figured it was (hopelessly) just my noobiness that had me feel overwhelmed at times with the choices ^_^

The thread hasn't had much convo for a week, - methods is out getting a "real" job?? - but good luck with either project (this, or the getting a 9-5, or both)
 
You have learned what it means to be a real engineer....

Coming up with a design - easy
Building prototypes - easy
Troubleshooting - easy
Production - easy

It is the hours and hours and hours and hours and hours you spend sifting through datasheets - sifting through the minutia - trying to sort out the most obscure details... Trying to hold it all in your head - this is what really needs to happen to engineer your way through a tough problem. When I designed my LTC BMS (V1 - V4) I must have read that huge LTC datasheet 75 or 100 times. I could draw every schematic, I could recall every bit combination, I completely and totally understood the design.

There are a dozen VueGraph engineers for every real engineer - those are the ones who make everything look so simple and first-order. They can only talk that way because behind them are 5 real engineers who solve the second order and third order problems that come up. Real engineers are often OCD unhappy bastards.

This is also why you see so many Vapor Ware products come out - they look so cool with flashy displays and sexy small packages... but they never come to market. This is because they only solved the first order problems and never dug in deep enough to realize that the devil is in the details and all the nasty little realities that surface as you work out the bugs.

Yea - so you need Logic Level Mosfets. This will limit you to about 100V - as anything over 100V is typically 7V or 9V. If you are charging, a 100V mosfet along with a 1.5KW TVS Diode will allow you to charge up to something like 300V - depending on chemistry. Risk goes up tho...

Or - there are a dozen and a half ways to get the voltage you need. I just went with logic level mosfets because I have a fetish for extremely simple circuits. I dont even like to use gate resistors or bypass caps - I consider them ugly. In my fantasy world manufacturers would build the bypass caps into the chips and the gate resistors / protection zeners into the mosfets.

-methods
 
Good luck with your job Patrick,

A while ago I was considering moving to California and thus I interviewed at SpaceX. The interview process was tedius but I did get the interest and an offer. I declined due to the fact that they didn't offer a robust relocation package. Since I'm in Florida that was a big drawback.

I think they were looking to hire all sorts of engineering and software divisions. I'm not sure how they are doing now.

I also checked blue origins and TESLA.

Thing is thou tesla is not looking for aerospace engineers with structural analysis background. It's all electronics nowadays so you are in it for the thrill.
 
I wish I could find a way to move to the bay area. Lit motors has a bunch of postings. I bet they could use you. They're the coolest thing to happen to the motorcycle in a long time.
 
There is no person I have more respect for than Elon Musk and the amazing work he has done....

PayPal -
completely changed the game from small local brick and mortar to world wide small business. I would have never guessed 8 years ago that 70% of my customers would be international and that the simplest and fastest part of the business would be the transactions.

Tesla -
Forced the hand of the big companies like Chevy. Built one of the baddest ass cars of all time

SpaceX -
Dude - civilian spacecraft? OMFG


For a while I was distracted by all the criticism of PayPal and their greedy rape-fees... but after thinking about it for a while... it was when Ebay bought PayPal that it really turned corrosive. The original idea of creating a world exchange for the little guys is still a staggering feat.

Tesla is local. The production facility is about as far away as Google - but their manufacturing leg is outside of my commute range. One issues it that with all of these companies... 99% of the resumes go in the trash unless you have an insider advocating for you. I dont know anyone at Tesla and moving out of state is not on the table for SpaceX.

-methods
 
Just a brain fart I wanted to share if you are still using a single coin or lipo cell for power...

What if you used the onboard "contactor" battery for all standby power, and then used the 5v rail from the controller (or another cccv converter on the main pack) to recharge or run the circuit during use? Since the standby draw is so low, it seems like a short ride could recharge it enough to keep it going as long as the battery was good. I'm sure you already thought about it, and maybe it is a lot more difficult to implement than just changing out a battery every 6 months or a year.
 
Thanks for the help.
I think I am quickly closing in on a very sweet 9-5 so I am just going to populate the boards I already fabricated and distribute them to those who I promised them to.

Running an onboard charger is cool - the only issue with it is referencing ground. With the switch as it is it can be run high side, low side, no side... no biasing or ground loops to worry about. If I add a charger then it will need a regulator/charge chip and and isolated DC-DC - which wont get me galvanic isolation - which will introduce more high speed noise spikes that can jump the gap. It will definitely draw significant power from the system while on - several miliamps unless I use an energy harvester.

If I were to go the charge route I would harvest voltage off of the open circuit from Drain to Source. Some of those linear devices can run from 20mV and up. Put a huge 1M or 5M resistor in there and see what I can get.

Anyway - totally changing gears mentally at the moment. Perhaps communication is more important than physical propulsion. Ebikes are only valuable in the physical domain... but communication (and communication tools / algorithms) are valuable in *every* domain. The Communication Revolution - hmmm... does not have the same ring to it.

Word for the day... Isochronous

-methods
 
TINY SIDENOTE: In the beginning of the prototyping you popped a bunch of items off of an arduino Nano or micro or whatever. Basically, you made an Extracore, which I had a fun time playing with in the past. http://shop.moderndevice.com/products/extracore-arduino-compatible-board
 
Nice...

My final design ended up with only an 8 pin Attiny and a bypass cap. Talk about a simple arduino... not even an external crystal! The entire circuit is only:

Attiny85
Bypass cap
5V regulator
Input cap for that
Battery clip
Couple of mosfets
Couple of JST connectors

Simple simple - love it.

-methods
 
methods said:
Nice...

My final design ended up with only an 8 pin Attiny and a bypass cap. Talk about a simple arduino... not even an external crystal! The entire circuit is only:

Attiny85
Bypass cap
5V regulator
Input cap for that
Battery clip
Couple of mosfets
Couple of JST connectors

Simple simple - love it.

-methods

And easy to manufacture because that's something every designer loves to do :lol:
 
Hi there,
first off thanks for the interesting read and ideas and the energy to build something like this!

Maybe this was asked already, I skipped 8 pages:

Is it possible to implement a time "usage" counter with this?
Basically a clock which sums up the total time the connected battery was used.

From what I see this switch has the brains and capabillity.
A simple current detector would find out when power is actually drawn.

With a bipolar LED the tiny could simply blink in a certain pattern of how many hours (in red) and maybe even the amps (in green) were drawn.

When it is on of course, maybe every mninute or so.

Thanks!
 
powersupply said:
Hi there,
first off thanks for the interesting read and ideas and the energy to build something like this!

Maybe this was asked already, I skipped 8 pages:

Is it possible to implement a time "usage" counter with this?
Basically a clock which sums up the total time the connected battery was used.

From what I see this switch has the brains and capabillity.
A simple current detector would find out when power is actually drawn.

With a bipolar LED the tiny could simply blink in a certain pattern of how many hours (in red) and maybe even the amps (in green) were drawn.

When it is on of course, maybe every mninute or so.

Thanks!
You can do a whole world of cool and useful things once you have a processor wired in.

Plug it into the USB port on another handy device and use that for the display. One of many possibilities.
 
rf said:
powersupply said:
Hi there,
first off thanks for the interesting read and ideas and the energy to build something like this!

Maybe this was asked already, I skipped 8 pages:

Is it possible to implement a time "usage" counter with this?
Basically a clock which sums up the total time the connected battery was used.

From what I see this switch has the brains and capabillity.
A simple current detector would find out when power is actually drawn.

With a bipolar LED the tiny could simply blink in a certain pattern of how many hours (in red) and maybe even the amps (in green) were drawn.

When it is on of course, maybe every mninute or so.

Thanks!
You can do a whole world of cool and useful things once you have a processor wired in.

Plug it into the USB port on another handy device and use that for the display. One of many possibilities.

This is what I'm coding ATM. I use a similar approach as method: I use the $20 BMS from the first link, "hacked" that I2C protocoll of the chip and am now able to read and write all values of the BMS using Arduino. I can also switch the FETs as I like, so I can easily implement anti-spark, life cycle counter etc etc. The FETs on than $20 board are single IRFB4410, good for 20amps. I wanna use 8 external FETs like methods does, so I can use 100amps charge and discharge. The lifecycle counter works more or less, still have to implement some basic features like a bluetooth connection to my phone and some throttle advancement features, speedo etc. It is not just a BMS enhancement, it is more like the BRAIN of the bike. Next step is to implement some connection to Lebowskis Motor controller to have full control over the motor functions. Just have a look into my thread ;) http://endless-sphere.com/forums/viewtopic.php?f=2&t=47124&start=25#p765293
 
crossbreak, very interesting, especially the "hacked" I2C protocol of the BMS chip.
Which BMS is it?
You were mentioning the $20 BMS from the first link, which link?

But to get back to methods' simple approach, I really want to keep it simple in line with what he did. It would only need a few resistors and a LED to get some basic info in addition to his idea.

What bothers me is that the full 48V (in my case) are constantly connected to the capacitors and FETs and whatnot.
The whole FET power bus is on, all the time.
Though there is not much draw to be concerned of, there is the aging of capacitors and just the danger with life power. I mean things fail, we all know that.

In addition to taking care of that with his approach, it would be really great to have a lifetime "passport" of the battery. Which basically just tells how many hours it operated and how much total was discharged and (maybe) how much total was charged.

Maybe we could merge your code with his at some point?

I am considering switching from 48V SLA to Li-xx and am looking for the right BMS. The i2c would seem great, as it always bothered me to add another unit just to make the A/D voltage conversion again and to be able to read the actual voltage.

Thanks!
 
methods said:
Nice...

My final design ended up with only an 8 pin Attiny and a bypass cap. Talk about a simple arduino... not even an external crystal! The entire circuit is only:

Attiny85
Bypass cap
5V regulator
Input cap for that
Battery clip
Couple of mosfets
Couple of JST connectors

Simple simple - love it.

-methods

Any ETA for production run and ES sales? :D
 
crossbreak (or other knowledged), is it this one?

http://www.bmsbattery.com/smart/330-lifepo4lithium-ion-smart-bms-for-513-cells-in-series.html

I was looking for $20, this is $19.99.

Doh!
 
yep. great unit, just the low amp capacity and cell count sucks. Will enhance that like methods did. If you want more than 13s series, you can connect two in series if you switch the FETs anyway. But you will need some BRAIN that supervises the 2 units, they only run standalone in single "hardware mode"

the datasheet with all specs, eeprom registers, hardware mode /software mode manual etc etc can be emailed if you ask someone kindly. For more info/talk refer to this OZ890 thread http://endless-sphere.com/forums/viewtopic.php?f=14&t=48461 and to keep this one clean of BMS discussions... thx ;)
 
Back
Top