Won’t this board have the same problem with interference on the I2C line? I mean personally I can use either SPI or I2C, but the driver for the SPI encoder I got doesn’t work, and the I2C of the board doesn’t work, so I’m a bit stuck. I bought a bluepill and some darlington transistors so I can try to run ahead and see if I can evaluate the fundamental capability of the SimpleFOC system for quiet 3000 rpm motion with this type of motor, I will proceed with that experimenting in a few days, unless there is a way forward with the lepton, in which case I might use that. I don’t know if there is a problem with darlinton transistors in this, I thought it was a reasonable approach. An inverting buffer to drive the PNP ones and directly drive the PNP ones from the bluepill. I’m betting that’s not a good approach for some reason… well there aren’t any 6 pin pwm boards I can obtain, or indeed any high side switches, only low side mosfet switches. I have been trying for a very long time now to just try it.
From the little I understood of you problem the interference is outside the board, not having the exact same setup as yours, if the SPI, Serial and SWD according to Richard are working, there should be no reason I2C to show any interference, which means no matter what board you get you will end up with the same problem, unless you analyzed the signals with a dual-channel oscilloscope and found the interference source, please correct me if I’m wrong. Especially the SPI protocol is extremely sensitive to noise, so if Richard says the SPI works, then the I2C must work perfectly since its clock is at a lot lower rate. Also the I placed the inductor at the very edge of the board, and there is a ground plane under and around, so there is no stray inductance leaking out. If anything, the SPI tracks are a lot closer to the inductor than the I2C tracks.
I apologize but I’m not following the Darlington transistors thread, I’m not sure what are you trying to achieve there, not sure if I could help with that.
The interference is I’m quite sure not from off the board, there was nothing nearby. I think by shortening the wires I did get it apparently working but there was another failure downstream after motor initialization, with the code. However it wasn’t clear if the I2C had not quite been solved so I stopped working on it and turned my attention to other stuff hoping Runger would be able to shed light on the subject, I think the pole pair check was giving erratic results. I can double check.
P.s. what’s the objection to using the same processor as the bluepill again? The blupill one has a bootloader for it, so people don’t have to mess with the stlink if they bought a board with the bootloader. Only 15 bucks so not a big deal, I’m just concerned about other issues like the serial not working again.
So for like $1.5 extra - 3 minus 3 saved on current sensing with the built in op amps, doesn’t it make sense to use the best of the MCUs mentioned thus far? My application is pretty cost sensitive and even I don’t mind. I don’t know who would. And it’s going to help a lot to focus on only one MCU.
It makes a lot more difference if your robot needs 8 or 12 of them. But that’s what we have the Lepton for. A more development-focused board would be perfectly fine to cost a few dollars more.
I’m willing to create a G431 variant with current sensing but April would be earliest. Also G431 has op-amps but they are not bidirectional. I will add hall current sensing. That’s the reason the STM ESC had low-side sensing. Inline is superior.
@Valentine, plus CAN bus transceivers please, and it would be an excellent replacement for the B-G431B-ESC1 with much better usability!
/Chris
Perhaps once again the strategy of putting the pads on the board but choosing not to populate them for the default board would be wise. Also for the current sensors. We could have a solder-blob type jumper that you can use to go around the current sensing pads, or a trace you cut with a knife or change in the PCB when you have boards with current sense made.
It may seem silly, but I think it is good to absolutely minimize the modifications others need to perform to get the configuration they need. Also a lot of people won’t be able to make custom boards, they will want just one or two quickly and cheaply from existing stock. A little soldering builds character.
So a single default design that is amenable to minor modifications in the field to add features that most people don’t need but some do. You can also always tweak the design and have custom boards made, but minimal changes are needed. Had I made any changes at all to the lepton, I would have thought it was my fault that whatever didn’t work.
That sounds like a good solution and I like what you wrote regarding soldering…
What you should keep in mind though is that typically there won’t be any stock of such boards (unless someone starts a bulk order). SimpleFOC is not really a shop and @valentine several times made it very clear that he has zero commercial interest in selling and (commercially) supporting his boards. He does a fantastic job already by offering so many designs for free and answering questions around them. However, up to now those are questions from people who generally know what they do. If you start selling such boards, you would probably end up with a very different clientele and stupid expectations.
/Chris
Maybe… I think what people actually want is ready-to-run boards. I think the number of people who want to solder on their own CAN transceivers is actually pretty low.
And those that do want mods of the boards generally roll their own anyways, so in my opinion there isn’t much of a market for “solder on modifications”.
Also keep in mind that having people hand-solder on components is generally in conflict with the requirement to keep the Lepton compact. When you want people to hand-solder them, you should use large components with large pads, and leave enough space around them so users don’t un-solder other components while adding the new ones.
And which bits do you leave out? Current sensing, depending on how it is implemented, needs shunt-resistors, current-sense amps, probably a R-C filter, perhaps some TVS/protections for the MCU, and supporting components (like bypass capacitance) as specified by the current sense amp’s data sheet. Using Hall-Sensors maybe reduces the BOM a bit, but you get the idea - we’re not talking about three components, here, but more like 20-30 that the user would have add themselves if we left them all off.
A CAN transciever isn’t quite as involved, but probably still 5-10 components with protections and required caps/resistors.
Agreed, most people will feel this way… but I think they’ll feel the same after soldering on components if it then does not work…
The Lepton has decent MOSFETs and can probably handle 10A or more… so solder-jumpers or narrow traces are not really an option, you want nice wide copper pours to carry the current without getting too hot.
I think solder-based optionality is ok in a more limited way - when you provide solder jumpers for the user, or when you can leave a single, decently sized component as optional (like the sensor for the Mosquito board).
Otherwise I think its better just to design 2 versions: one with the feature in question, and one without, and let the user buy the one they need, no soldering required.
Another approach I find interesting is to make the system modular. @Juan-Antonio_Soren_E recently designed a modular driver system where power stage, controller MCU and sensor are all on their own PCBs and plug together via standardized connectors. So you can mix and match these components, or only re-design the part you want to change.
I think this is also a very nice approach, but it won’t be cheap, needing multiple PCBs, connectors, and bunch of components that wouldn’t be needed if not for modularity. Lepton is inexpensive because it is simple.
Well, I guess multiple designs are also good. Regarding not selling them, if you hop on aliexpress and search simplefoc, there are a lot of people selling boards. When I wanted a shield, the official store was out of stock, and that was the only option. Also ebay. Anyone can sell stuff on amazon, too. I think if there is a good board design that the community gets worked, out, someone will perform the service of making them available to the small timers that just want a handful of boards and can’t/don’t want to have custom boards made, due to time, expense or just not knowing how to go through the process. I was happy to find it wasn’t hard, but I thought it was going to be. Also the more stuff that needs to be done to get the driver in hand, the more can go wrong. Like Valentine noted some parts could be out of stock. I wouldn’t want to get into a situation where I substituted a part that I thought would work and then it turns out my whole batch is bad cuz I had no clue. It’s going to cost a lot more than $3 if that sort of thing happens.
I’m not a big fan of adding CAN functionality to be honest as I haven’t seen it mentioned on the forums much, and it seems to me that someone who needs CAN can add it themselves as they would be relatively skilled and funded.
Lots of wiggle room with processor power and memory is a sure win imo. Current sense is also good future proofing because for senorless (including low speed position detection) operation, and also measuring the motor characteristics, you need that, and those are both important in general.
p.s. just thinking that if I could get rid of the magnetic sensor that would be worth 40 bucks easily in my application, so well worth the current sensing stuff. No sensor, no connectors or wires on either end, no magnet or magnet holder on the motor, simplifies assembly, and also waterproofing becomes easier because the motor can be totally dumb, no electronics in there. Right now I’m going to have to encapsulate all the electronics in that compartment and try to seal the compartment.
Someone mentioned using spi because it is faster… the driver for the spi sensor I have doesn’t work, remember. Maybe there are other ones.
Selling on amazon is hugely problematic for such DIY/hobby projects. I know because I sell on Amazon. It’s not trivial, incurs tax and accounting problems, inventory, shipment, advertisement, and Amazon takes a huge percentage. Also shipping outside of US for me requires different accounts, cost and tax treatments. I see people on this board from all over the world.
I estimated I need to sell minimum 10,000 boards per year to be profitable. I don’t think there are 10,000 hobbyists in the world doing this type of work to begin with.
If you tell me you can guarantee minimum 1000 boards a month, I’ll bite. The Lepton for example needs to be sold at about $30 per board to make it worth my time, which is about 200% mark-up w.r.t. manufacturing cost.
ok fair enough. But aliexpress guys will do it, then. I have also sold stuff on amazon but not much and it ended with amazon stealing my entire stock of stuff, retail price $1600. I never got any compensation. So I won’t be advocating for them… ebay too, there is simplefoc stuff on there already I think
You can set your own sales web site, and use Square or Stripe or any other payment processor. This is the only way you can at least not go broke. Then you handle all your taxes and shipments on your own. But you must have a customer base in advance.
I would also mention Tindie and Kickstarter as possible sales channels for maker gadgets.
But I really have to say that I don’t look on the SimpleFOC boards or software I work on as commercial projects…
I agree with Valentine’s assessment that setting up your own shop will be the channel with the highest margins, but as he says, its also a lot of work. If you’re really interested, we can have a chat on some other methods - but as a commercial proposition I don’t really see it working with less than 100% markup on the board production costs.
I never meant to indicate I had any interest in selling the boards, nor to push anyone else to do so. I’m just saying that other people already sell simplefoc based hardware, and they will probably take this and sell it if it’s any good. That will lead to things being available to the community. If we do our stuff here in a way that prioritizes well and with futurproofing etc, we can steer what they will be selling in a way that is beneficial to the community.
Runger, did you get my DM? I know this board is not very good about telling you you have DMs.
I think my only practical path is to get that next generation lepton designed, ordered, and roll with that. Then I will continue experimenting with the current gen lepton until it arrives, to learn more and proceed, or maybe with the uno+shield. I am however currently at an impasse in that department (I often seem to be) as there are just too many things that don’t work adding up on me.
Hey Valentine, which current sensing things did you have in mind? I would like to read their datasheet etc. I gotta try to get the next gen lepton proposal up. (what should we call it? Next gen lepton?)
Ah, no, let me check… You’re right about that, and I’m always missing DMs…
Agree 100%
Here I am not so sure this is the right approach. I’ve been working with the Leptons you sent me, and so far it has been behaving very well. I still need to test with a motor, but I’m assuming very much (also based on Deku’s reports) that its going to work fine.
I understand the difficulties you’re having, because working with a “brand new” board that is different from existing board definitions is always tricky.
Without the setup files for your IDE environment you’re actually not ready to use your new hardware, and so you need to create a working setup yourself first. Considering the complexity of PlatformIO or ArduinoIDEs setup systems, and the complexity of the frameworks on top of that, and the general lack of documentation for anything, it is a tricky task. And for someone not familiar with embedded development, it becomes a really big challenge to get this done right.
Note to others: if you want to avoid problems when working with your self-designed board, then duplicate the basic setup (MCU type, oscillator, pins used for Serial, USB setup, etc) of an existing board like a Feather, Arduino or Nucleo. Then you can just use the board setup of that board when working with yours, and things will be soooooo much easier.
So I actually think the right approach for you is to solve all the other problems you have first, using the lepton you already have, before diving into the next design. I see no reason to assume the next one would work any better than the current one for you right now.
I think you need to make the Lepton work, with sensor, debug output, etc… so you can actually test its performance for your application, and then determine whether you need a faster MCU, better sensor, or whatever. And who knows? Once its working you might find the Lepton suitable after all?
There are several considerations. Let’s just call it what it is, a business model. There is nothing suspicious about that, and it does not collide with SimpleFOC being open-source.
I would say, to honor the Openness of open-source, that business model need to be completely transparent.
Being totally transparent the buyer/customer/user should be informed about all cost involved including the earnings of each “vendor-link” in the supply-chain.
In my mind 100% is way over the top @runger. If the model should be competitive, I would say 10-20%.
It can be very competitive, if done right, depending on how thick your wallet book is. Or if a major capital fond can se the potential. Not so much in making a huge revenue, but making the concept available.
I think you will go bankrupt for sure. Aren’t you in Scandinavia? Like Austria, you have huge taxes and labour costs… you’re subject to all kinds of regulations and by the time you can sell anything at all you’ve incurred huge costs just to get started.
Just a quick off the top of my head analysis:
Lets say you can produce a PCB, assembled with all components, cleaned, broken out of panel and put in an anti-static bag for 10EUR in batches of 100 pieces, so 1000EUR.
Shipping to EU will be about EUR50, and EU VAT will be 20%, or EUR210. You will pay EUR10 or so in processing fee for the VAT handling.
Now you have the 1000 boards in Europe, and can start to sell them.
Each sale you make you will pay between 3%-10% payment processing fees if it is by card, some people might pay you by SEPA, but mostly people like to use cards or Paypal.
For each board you will have packaging and handling costs (printing label, putting in envelope, carry to post-office or UPS shop, etc).
So I think you have at least 50% on top of the PCB price in variable cost overheads to add to each board sold.
Now you have to consider the fact that not all your customers will be happy, and they have the right to returns. Also some of the boards will just be broken, due to bad components, bad PCBs, or damage during shipping/handling.
So you have have to figure in an overhead for that, maybe 10% is a realistic number to start with, although you’ll find out the real number over time.
On top of this you have fixed costs like running your web-shop, creating your logo, company registration fees, etc…
So I think 100% markup is kind of the minimum you should consider. Once you have volume you can think about it differently, but to begin with that’s how I’d calculate it.


