Jump to content

Firmware


jayjay23

Recommended Posts

About the board, I think they should be almost equal between them. The STM32F103 do not have many pins that can be exchanged... the main functionalities of this cheap generic UC seems to be standard between them and the things like to control the motors, measuring current, voltage, etc seems to be the minimum standard (the same I saw on cheap electric bicycles controllers).
But maybe we can select the board from one seller, because developers need to buy boards because they will burn boards :-) :-)
I believe for the success of this project, we should select first the cheap generic unicycle and then the board for it. Looking at youtube videos about unicycles, a LOT of videos shows the cheap generic unicycle I have. Even on this forum, I saw recommendations to start with this cheap before buying an higher version.

@Restless, I want 2 boards for me. Are you able to manage this group buy (receive the money from each one, buy and ship to each one of us)??
The list until now is:
- jayjay23: 3 boards
- electric_vehicle_lover: 2 boards

About the power supply:
So the battery pack is a 16S lithium, wich gives max voltage of 4.2V * 16 = 67.2V.
Nominal voltage: 3.6*16 = 60.8V
Min voltage: 3.2*16 = 51.2V
Current: motor is of 350W and so, I =350/60 ~= 6 amps.

So that power supply of 60V should be ok for this project. I think we don't need to test the max voltage and working on the nominal is ok.
I just bough on Ebay (source from Spain) the Dazheng 0-60V 5A PS-605D for 105€ (including shipping) -- there are some videos on youtube about this power supply. Also, there are chinese power supplies for 60V 3A or 5A, for 100€ or a bit more.

@OliverH,I really want to have notes/documentation, to help others and even myself months/years later. I do this a lot professionally. And yes, the wiki on github or even REDME files on github.

@jayjay23, please create an organization on github instead. Like that, it can have many repositories. One for firmware, other for electronics, other for some future app, etc etc. Please see this example that I created to test: https://github.com/generic-electric-unicycle

Link to comment
Share on other sites

@OliverH Paypal works well for me, to send money to you.

Should we wait a few more days to see if anyone wants to join??

The current list for buying new controllers:
- OliverH: 3 boards
- jayjay23: 3 boards

- electric_vehicle_lover: 2 boards

Edited by electric_vehicle_lover
Link to comment
Share on other sites

2 hours ago, Tilmann said:

So, this question is likely pretty dumb: why don't you just use the regular EUC charger to power up the board for testing?

It could work, and whether you want to use it it's maybe just a personal mood decision. I would fear that these charges are very sensitive as there

were so many reports of broken chargers. Although I like to tinker were I can and build stuff, for some reason something tells me that I will be more

happy if this piece in the puzzle comes out of the box. Powering just the controller should be possible without any problems, powering the motor can be more

tricky and it's a bit more usual to have current limiting than just a fuse that shuts off.

The capacitor btw are already on the board, to level out voltage sag

2 hours ago, electric_vehicle_lover said:

please create an organization on github instead.

I didn't knew this exist, I read a little about it and it seems fine, I like the idea of having a organized structure for later additions. I find it difficult to seprate firmware from electronics, but I see the issue with mobile phone app development.

Would you be ok to use your already created org and transfer my existing repo into that? Meanwhile I created a little bit more content in the wiki also.

Link to comment
Share on other sites

Hi everybody. I'm new here and very interested in this project.
About the power supply, you have this one for 77€ (60V 5A) http://www.aliexpress.com/item/Newest-mini-switching-DC-power-supply-KPS605D-60V-5A-Single-Channel-adjustable-SMPS-Digital-0-1V/32279650693.html?spm=2114.01020208.3.203.GpRgmp&ws_ab_test=searchweb201556_2_79_78_77_80,searchweb201644_5,searchweb201560_9

and this one 197€ (100V 5A) http://www.aliexpress.com/item/MP1005D-adjustable-variable-switching-dc-power-supply-100V-5A-precision-regualted-dc-power-supply/32304805126.html?spm=2114.01020208.3.100.fkbXDp&ws_ab_test=searchweb201556_2_79_78_77_91_80,searchweb201644_5,searchweb201560_9

You will have big expenses in material purchase + the time you spend. You could create a common paypal account to give us the ability to help you to sustain these costs, in default of helping you with our skills.

Link to comment
Share on other sites

Hey Guys.

 

wow, quiete a few notifications since last night :D

 

So if we order Mainboards i would take 2, too.

But there might be some sidecosts, at least in germany. So Price would probably be:

 

~12$ Per Board

16$ Shipping (guess higher for a larger Order)

Overall price Multiplied by 1,19 (EuSt/MwSt)

if we reach 150€ in total, there might be Customs too.

*** No warranty for this information ***

+ a couple bucks for national shipping ;)

 

I had no big problems in the past with customs, as long as everything is declared correctly, they're mostly friendly :D

 

Nice Idea with the PayPal Donation account @Battling, but i think thats too early at the moment.

Idk, in my opinion there are too many questions to be solved.

I would just wait a bit ;) But i would like to here everyone elses opinion.

 

Dont get me wrong, i like this idea and like everyone i appreciate any help ;)

 

Have a nice Day

Kai

Edited by Restless
Link to comment
Share on other sites

@jayjay23

Yes we can keep the org I created, I believe the name is good.

Please tell me your github user name so I can add you - I tried already but for some reason github don't find your public username.

Please delete the repo firmware and create another with the same name. Then you can push your to that one.

5 hours ago, jayjay23 said:

 

Link to comment
Share on other sites

4 hours ago, Restless said:

*** No warranty for this information ***

I'm ok with the risks as I would need to take them on my own order too, so from my side go ahead, for the money I would prefer to do a normal german bank transfer if this is ok.

 

49 minutes ago, electric_vehicle_lover said:

Yes we can keep the org I created, I believe the name is good.

Ok, just to let all other know too, I will then rename my current repo to  'firmware' and then transfer it from my user to the org, so when this is done

the new url will be (https://github.com/generic-electric-unicycle/firmware)

I read that renaming and transfer will keep everything (wiki etc.), which is cool.

Link to comment
Share on other sites

The official github page for this project: https://github.com/generic-electric-unicycle
I added Jayjay23 and Restless as owners.
The firmware repo is the current version of the repo from Jayjay23 (can you now please delete yours to avoid any possible confusion?).

I was thinking in the documentation... what do you guys think to have one repo just for documentation? There we could gather all the notes and documentation. I don't know if other github projects managed the documentation like this. Some people could just be tester and write documentation... maybe.

The current list for buying new controllers:
- Restless: 2 boards
- OliverH: 3 boards
- jayjay23: 3 boards

- electric_vehicle_lover: 2 boards

Edited by electric_vehicle_lover
Link to comment
Share on other sites

5 minutes ago, electric_vehicle_lover said:

The official github page for this project

Can we somehow make a 'transfer' (term from github) so the other stuff is saved too. The action you have taken is (mabe a fork) is only tranfering the sources,

I would like to save and rename the wiki content too.

So your original request was that I can delete the firmware repo and my suggestion was to do a transfer, what do you suggest?

https://help.github.com/articles/transferring-a-repository/

https://help.github.com/articles/renaming-a-repository/

Link to comment
Share on other sites

Does your comment apply to github internal wikis? The wiki has no files I can access anyhow (as far as I know).

Ahh, ok I think I got it, I can downoad it via (https://github.com/qjayjayp/myewheel.org.wiki.git) and then try above commit,

so I will first rename it, then download it, then check it back in to the other repo (ui, hope this works)

Link to comment
Share on other sites

I'm really far from being a git expert so there can be any kind of mistake, but this is what I got:

git init
git clone https://github.com/qjayjayp/firmware.wiki.git
git remote add origin https://github.com/generic-electric-unicycle/firmware.wiki.git
git add firmware.wiki/
git commit
git push --set-upstream origin master
fatal: remote error: access denied or repository not exported: /d/nw/da/37/68/118826673/45537587.wiki.git

Link to comment
Share on other sites

I hope there is no problem with the following changes:

  • Created a "documentation" repo and created a wiki there. Moved the files from the wiki of firmware repo to this one.

I think we should consider the project home page on the wiki, here: https://github.com/generic-electric-unicycle/documentation/wiki

The README files for each repo should also point the project home page.

Link to comment
Share on other sites

21 hours ago, Restless said:

I cloned and pushed the old Wiki to the new repo

Ok, thanks, it seem ok now, actually I expected the renaming of the wiki to rename the internal links, which it didn't, so I made that manually now.

@electric_vehicle_lover:

That's all fine, one thought I had is if we should move the docu directory to the documentation repo, so all is together?

Link to comment
Share on other sites

Well, firmware not even running yet but I already posted some ideas on the github firmware Issue Tracker: https://github.com/generic-electric-unicycle/firmware/issues

I think it may be better to write there ideas instead of here on this message as the ideas will be loose over the time. Having a list is more manageable :-)

@jayjay23

The picture you posted on https://github.com/generic-electric-unicycle/documentation/wiki/MW30BS_Controller, I would say this controller of 30KM/h do not use transistors for mosfet drivers but instead some of that 8 pins ICS, that may have better speed transitions or such, to be able to get the higher speed.
Can you please verify the version of STM32F103 so we can know how much flash memory is available?? The same for the slower board...

 

Link to comment
Share on other sites

Next steps:

  • Buying the controllers boards: @Restless are you able to buy the boards for the group? I would say we should buy them until the end o this week.
     
  • First testing working firmware:
    • Since I already did with success a BLDC motor controller firmware for the same STM32F103 (for an electric bicycle motor), using only hall sensors, I think that the first testing working firmware could be for put the motor running at a specific low velocity. What I need to know: the microcontroller pins to read the hall sensors signal; the pin for the current sensor; the output pins that control the power mosfets. Can someone help on this information??
      My code for controlling the motor is here: https://github.com/casainho/EBike-Smart-Controller/blob/master/firmware/bldc.c
      Video of the motor running: https://www.youtube.com/watch?v=wrrfMGUwaAM

My bench power supply of 60V 5A arrived today :-)
Now I need the spare controller board and the JTAG SWD programmer and debbuger (this I will buy for myself).

Edited by electric_vehicle_lover
Link to comment
Share on other sites

9 hours ago, electric_vehicle_lover said:

The picture you posted on https://github.com/generic-electric-unicycle/documentation/wiki/MW30BS_Controller, I would say this controller of 30KM/h do not use transistors for mosfet drivers but instead some of that 8 pins ICS, that may have better speed transitions or such, to be able to get the higher speed.
Can you please verify the version of STM32F103 so we can know how much flash memory is available?? The same for the slower board...

It's also a F103C8T6, so the exact same. Something to note also is that ST tells in their manuals that the complete F10x family is software (and PIN) compatible, though the later probably has no pratical meaning as we need to adjust for other controllers. I think it was esaj who wrote that in his firewheel there is a F10... something with the next size PIN-out.

The 30BS controller also uses mosfets (or something like this), but they are soldered on the backside and bend vertical, on the foto you can see the top of the mosfets looking just a bit out of the PCB (on the very bottom of the picture), unfortunately I can not check right now which ones they used as I need the wheel tomorrow :-)

1 hour ago, electric_vehicle_lover said:

Can someone help on this information??

Look here: https://github.com/generic-electric-unicycle/documentation/wiki/Generic_Controller

The PIN out picture has the following, which I'm very sure of:

Hall A, B, C, PIN 12, 11, 10

H-Bridge

A low PIN 26, A high PIN 29

B low PIN 27, B high PIN 30

C low PIN 28, C high PIN 31

I also checked in the original libreoffice document in case you want to look there for better reading.

The drawn power should be PIN 17, it was more difficult for me to follow the path through the OP amps.

 

1 hour ago, electric_vehicle_lover said:

My bench power supply of 60V 5A arrived today :-)

Mine too!!, Just tried it, I soldered a cable with XT60 connector and it can power my wheel with no problem ( I ordered one from amazon, so not any mentioned here)

It goes to 61,5V and on the floor (by hand) I can only consume 0,2A if I push it hard, lifted up it consumes up to 2A.

the 61V is 3 leds on my 1 led is 57,7V; 2 leds is 57,8V (haven't checked any other states yet)

 

1 hour ago, electric_vehicle_lover said:

My code for controlling the motor is here:

Wow, that's great, we can definitely start with that, and see how it works with only hall sensors, I guess you no rippling problems? Everything runs smooth?

How fast (in RPMs) have you gone with this setup? As it was said that back EMF is used for higher speeds? Maybe back EMF is just used as a second channel to increase fail safety?

Link to comment
Share on other sites

I just asked the seller for an inquiry for 10pc's. Lets see how that is going.

I could definitely order them all together and ship it to you afterwards.

 

just for my info: Everyone who wants a board has a german address?

Link to comment
Share on other sites

Moved the contents of firmware/docu to documentation repo.

So the  STM32F103C8T6 have 64kbytes flash. Is not much... I hope is ok to add a serial bluetooth and/or control for a RGB led bar.

Here is a link for a recent project of a BLDC controller that uses BEMF and also breaks and regen, using ST32F4: http://vedder.se/2015/01/vesc-open-source-esc/

@jayjay23 One thing I believe must be done and maybe you can help. Find the pin that measures the battery voltage and records the voltage pin value for battery voltage of:

So the battery pack is a 16S lithium, wich gives max voltage of 4.2V * 16 = 67.2V.
Nominal voltage: 3.6*16 = 60.8V
Min voltage: 3.2*16 = 51.2V

With this values we can then write the firmware to read and control the LEDs for the voltages we will find correct. Maybe the measures you did for each LED should be documented on the wiki.

About the controller with the hall sensors, no problem but I just tested 4 times - see here the motor running at his maximum velocity: https://www.youtube.com/watch?v=I449L6JZkV0
Also as you can see, the motor can start very well from a stopped position and have torque. When I tried to start using BEMF, I never could make the start of the motor.

I think the EUC motors may have much more poles and so much more signal changes for each full rotation of the wheel and so the circuit of hall sensors must be faster. I think BEMF is a need after some speed, maybe because hall sensors are kind of slow. I don't think is a question of safety.

@Restless I am from Portugal. If you can estimate the price for my 2 units, I can send you the money by paypal.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...